虚拟机centos9搭建wordpress

目录

1. 更换yum源更新系统软件包:

1.1备份yum源

1.1.1创建备份目录:

1.1.2移动现有仓库配置文件到备份目录:

1.1.3验证备份:

1.2更换yum源

1.2.1添加yum源

1.2.2删除和建立yum缓存

1.3更新系统软件包

1.4 yum与dnf介绍

2. 安装 Nginx:

2.1安装

2.2开启服务

3. 安装 MariaDB:

3.1安装

3.2开启服务

4. 安全配置 MariaDB:

5. 创建 WordPress 数据库和用户:

5.1进入数据

5.2创建数据库

5.3创建用户并赋权

6. 安装 PHP:

6.1修改配置文件

6.2启动并启用 PHP-FPM 服务:

7. 下载并配置 WordPress:

8. 配置 WordPress:

8.1复制样本配置文件并编辑:

8.2根据需要更新以下内容:

9. 配置 Nginx:

9.1编辑 Nginx 配置文件

9.2检查 Nginx 配置是否正确:

9.3重新加载 Nginx 配置:

10. 配置 SELinux 和防火墙:

10.1如果启用了 SELinux

10.2配置防火墙允许 HTTP 和 HTTPS 流量:

11. 访问 WordPress 安装界面:

11.1访问

11.2安装

11.3无法写入wp-config.php

11.4填写配置信息

11.5登录

利用nginx和MariaDB搭建wordpress
 

1. 更换yum源更新系统软件包:

1.1备份yum源

1.1.1创建备份目录:

创建一个目录来保存备份的仓库配置文件:

sudo mkdir -p /etc/yum.repos.d/backup

1.1.2移动现有仓库配置文件到备份目录:

将 /etc/yum.repos.d/ 目录中的所有文件移动到备份目录中:

sudo mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/

1.1.3验证备份:

确认备份是否成功,可以列出备份目录中的文件:

ls /etc/yum.repos.d/backup/

1.2更换yum源

可以参考:CentOS Stream - USTC Mirror Help

1.2.1添加yum源

vim /etc/yum.repos.d/centos.repo

[baseos]
name=CentOS Stream $releasever - BaseOS
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/BaseOS/$basearch/os
# metalink=https://mirrors.centos.org/metalink?repo=centos-baseos-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1

[baseos-debuginfo]
name=CentOS Stream $releasever - BaseOS - Debug
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/BaseOS/$basearch/debug/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-baseos-debug-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[baseos-source]
name=CentOS Stream $releasever - BaseOS - Source
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/BaseOS/source/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-baseos-source-$stream&arch=source&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[appstream]
name=CentOS Stream $releasever - AppStream
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/AppStream/$basearch/os
# metalink=https://mirrors.centos.org/metalink?repo=centos-appstream-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1

[appstream-debuginfo]
name=CentOS Stream $releasever - AppStream - Debug
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/AppStream/$basearch/debug/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-appstream-debug-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[appstream-source]
name=CentOS Stream $releasever - AppStream - Source
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/AppStream/source/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-appstream-source-$stream&arch=source&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[crb]
name=CentOS Stream $releasever - CRB
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/CRB/$basearch/os
# metalink=https://mirrors.centos.org/metalink?repo=centos-crb-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1

[crb-debuginfo]
name=CentOS Stream $releasever - CRB - Debug
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/CRB/$basearch/debug/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-crb-debug-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[crb-source]
name=CentOS Stream $releasever - CRB - Source
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/CRB/source/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-crb-source-$stream&arch=source&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

vim /etc/yum.repos.d/centos-addons.repo

[highavailability]
name=CentOS Stream $releasever - HighAvailability
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/HighAvailability/$basearch/os
# metalink=https://mirrors.centos.org/metalink?repo=centos-highavailability-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0

[highavailability-debuginfo]
name=CentOS Stream $releasever - HighAvailability - Debug
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/HighAvailability/$basearch/debug/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-highavailability-debug-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[highavailability-source]
name=CentOS Stream $releasever - HighAvailability - Source
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/HighAvailability/source/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-highavailability-source-$stream&arch=source&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[nfv]
name=CentOS Stream $releasever - NFV
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/NFV/$basearch/os
# metalink=https://mirrors.centos.org/metalink?repo=centos-nfv-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0

[nfv-debuginfo]
name=CentOS Stream $releasever - NFV - Debug
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/NFV/$basearch/debug/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-nfv-debug-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[nfv-source]
name=CentOS Stream $releasever - NFV - Source
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/NFV/source/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-nfv-source-$stream&arch=source&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[rt]
name=CentOS Stream $releasever - RT
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/RT/$basearch/os
# metalink=https://mirrors.centos.org/metalink?repo=centos-rt-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0

[rt-debuginfo]
name=CentOS Stream $releasever - RT - Debug
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/RT/$basearch/debug/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-rt-debug-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[rt-source]
name=CentOS Stream $releasever - RT - Source
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/RT/source/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-rt-source-$stream&arch=source&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[resilientstorage]
name=CentOS Stream $releasever - ResilientStorage
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/ResilientStorage/$basearch/os
# metalink=https://mirrors.centos.org/metalink?repo=centos-resilientstorage-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0

[resilientstorage-debuginfo]
name=CentOS Stream $releasever - ResilientStorage - Debug
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/ResilientStorage/$basearch/debug/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-resilientstorage-debug-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[resilientstorage-source]
name=CentOS Stream $releasever - ResilientStorage - Source
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/ResilientStorage/source/tree/
# metalink=https://mirrors.centos.org/metalink?repo=centos-resilientstorage-source-$stream&arch=source&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[extras-common]
name=CentOS Stream $releasever - Extras packages
baseurl=https://mirrors.ustc.edu.cn/centos-stream/SIGs/$releasever-stream/extras/$basearch/extras-common
# metalink=https://mirrors.centos.org/metalink?repo=centos-extras-sig-extras-common-$stream&arch=$basearch&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1

[extras-common-source]
name=CentOS Stream $releasever - Extras packages - Source
baseurl=https://mirrors.ustc.edu.cn/centos-stream/SIGs/$releasever-stream/extras/source/extras-common
# metalink=https://mirrors.centos.org/metalink?repo=centos-extras-sig-extras-common-source-$stream&arch=source&protocol=https,http
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

1.2.2删除和建立yum缓存

yum clean all

yum makecache

1.3更新系统软件包

sudo dnf update -y

1.4 yum与dnf介绍

CentOS 9 默认使用的是 DNF 作为包管理工具,而不再使用 YUM。虽然 CentOS 9 中没有传统的 YUM 命令,但它提供了一个 yum 的软链接指向 dnf,这意味着你在命令行中输入 yum 实际上是运行 dnf。

以下是一些关键点:

DNF 作为默认包管理工具:CentOS 9 使用 DNF 作为其默认的包管理工具。你可以使用 dnf 命令来安装、更新和删除软件包。

YUM 的兼容性:虽然没有传统的 YUM,但系统提供了一个指向 DNF 的 yum 软链接,这样习惯于使用 yum 的用户仍然可以使用 yum 命令,如同在以前的版本中一样。例如,输入 yum install package 实际上会运行 dnf install package。

命令和功能:在 CentOS 9 中,使用 dnf 命令时,大多数你习惯于在 YUM 中使用的命令和选项仍然适用,因为 DNF 保持了相当的兼容性。

总的来说,在 CentOS 9 上,你可以继续使用 yum 命令,但它实际上是调用 DNF。

2. 安装 Nginx:

2.1安装

sudo yum install nginx -y

2.2开启服务

sudo systemctl start nginx

sudo systemctl enable nginx

3. 安装 MariaDB:

3.1安装

sudo dnf install mariadb-server mariadb -y

3.2开启服务

sudo systemctl start mariadb

sudo systemctl enable mariadb

4. 安全配置 MariaDB:

sudo mysql_secure_installation

按照提示设置 MariaDB root 用户密码并进行其他安全设置。

注意:默认答案都是“yes”(是)

5. 创建 WordPress 数据库和用户:

5.1进入数据

sudo mysql -u root -p

密码

5.2创建数据库

CREATE DATABASE wordpress;

5.3创建用户并赋权

CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'Huawei@!123';

GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost';

FLUSH PRIVILEGES;

EXIT;

6. 安装 PHP:

sudo dnf install php-fpm php-mysqlnd php-json php-xml php-mbstring -y

6.1修改配置文件

编辑 `/etc/php-fpm.d/www.conf` 文件,确保 `user` 和 `group` 设置为 `nginx`:

listen = 127.0.0.1:9000

6.2启动并启用 PHP-FPM 服务:

sudo systemctl start php-fpm

sudo systemctl enable php-fpm

7. 下载并配置 WordPress:

cd /usr/share/nginx/html

sudo curl -O https://wordpress.org/latest.tar.gz

sudo tar -zxvf latest.tar.gz

sudo chown -R nginx:nginx /usr/share/nginx/html

sudo chmod -R 755 /usr/share/nginx/html

8. 配置 WordPress:

(这一步可以跳过的)

8.1复制样本配置文件并编辑:

sudo cp wp-config-sample.php wp-config.php

sudo nano wp-config.php

8.2根据需要更新以下内容:

根据自己的具体内容来做修改:如数据库密码

define( 'DB_NAME', 'wordpress' );

define( 'DB_USER', 'wordpressuser' );

define( 'DB_PASSWORD', 'password' );

define( 'DB_HOST', 'localhost' );

9. 配置 Nginx:

9.1编辑 Nginx 配置文件

vim /etc/nginx/conf.d/wordpress.conf:

server {

    listen 80;

    server_name your_domain_or_IP(更换成你的电脑的ip地址);

    root /usr/share/nginx/html;

    index index.php index.html index.htm;

    location / {

        try_files $uri $uri/ /index.php?$args;

    }

    location ~ \.php$ {

        include /etc/nginx/fastcgi_params;

        fastcgi_pass 127.0.0.1:9000;

        fastcgi_index index.php;

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

    }

    location ~ /\.ht {

        deny all;

    }

}

9.2检查 Nginx 配置是否正确:

sudo nginx -t

9.3重新加载 Nginx 配置:

sudo systemctl restart nginx

10. 配置 SELinux 和防火墙:

10.1如果启用了 SELinux

运行以下命令:

sudo chcon -t httpd_sys_rw_content_t /usr/share/nginx/html -R

10.2配置防火墙允许 HTTP 和 HTTPS 流量:

sudo firewall-cmd --permanent --add-service=http

sudo firewall-cmd --permanent --add-service=https

sudo firewall-cmd --reload

11. 访问 WordPress 安装界面:

在浏览器中访问您的服务器 IP 地址或域名,例如 `http://your_domain_or_IP`,然后按照屏幕上的说明完成 WordPress 安装。

11.1访问

ifconfig可以查看网络信息

http://ip/wordpress

11.2安装

11.3无法写入wp-config.php

出现这种错误是目录权限问题,如果在步骤8处理过就不会有

vim /etc/share/nginx/html/wordpress/wp-config.php

把上面的东西复制粘贴进去保存

11.4填写配置信息

11.5登录

这样,您就可以在 CentOS 9 上使用 Nginx 成功搭建 WordPress 了。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://xiahunao.cn/news/3268226.html

如若内容造成侵权/违法违规/事实不符,请联系瞎胡闹网进行投诉反馈,一经查实,立即删除!

相关文章

谷粒商城实战笔记-62-商品服务-API-品牌管理-OSS整合测试

文章目录 一,Java中上传文件到阿里云OSS1,整合阿里云OSS2,测试上传文件 二,Java中整合阿里云OSS服务指南引言准备工作1. 注册阿里云账号2. 获取Access Key3. 添加依赖 实现OSS客户端1. 初始化OSSClient2. 创建Bucket3. 上传文件4.…

nginx的学习(二):负载均衡和动静分离

简介 nginx的负载均衡和动静分离的简单使用 负载均衡配置 外部访问linux的ip地址:80/edu/a.html地址,会轮询访问Tomcat8080和Tomcat8081服务。 Tomcat的准备 准备两个Tomcat,具体准备步骤在nginx的学习一的反向代理例子2中,在Tomcat8080…

告别繁琐地推!Xinstall如何一键优化你的App地推方案

在这个移动应用遍地开花的时代,App地推活动早已成为各大厂商获取新用户、提升品牌曝光度的重要手段。然而,传统地推方案中的种种弊端,如填写地推码/邀请码的繁琐、渠道打包的工作量繁重、人工登记上报的不准确等,无一不在拖慢地推…

【接口设计】学会用 RestTemplate 发请求

《接口设计》系列,共包含以下 5 篇文章: 前后端的通信方式 REST如何设计统一 RESTful 风格的数据接口为 APP、PC、H5 网页提供统一风格的 API(实战篇,附源码地址)用 Swagger 实现接口文档学会用 RestTemplate 发请求 …

【C++】选择结构案例-三目运算符

三目运算符语法格式: 布尔表达式?表达式1:表达式2 运算过程:如果布尔表达式的值为 true ,则返回 表达式1 的值,否则返回 表达式2 的值 (三目运算符指的是?和:) 在这个三目运算符…

USB转多路串口-纯硬件实现串口数据传输指示灯电路

前言 串口相关产品往往要求有数据收发时LED闪烁,我们经常会用软件实现,在MCU内注册一个定时器,有数据发送时就闪烁一段时间。软件点灯这种方式存在两个缺陷,一是接收方向不好实现;二是定时器一般用固定频率&#xff0…

Redis的两种持久化方式---RDB、AOF

rdb其实就是一种快照持久化的方式,它会将Redis在某个时间点的所有的数据状态以二进制的方式保存到硬盘上的文件当中,它相对于aof文件会小很多,因为知识某个时间点的数据,当然,这就会导致它的实时性不够高,如…

Nature Electronics|柔性可吞服电子设备用于胃部电生理学监测(柔性健康监测/可吞服电子/柔性

美国麻省理工学院David H. Koch 综合癌症研究所的 Giovanni Traverso团队,在《Nature Electronics》上发布了一篇题为“An ingestible device for gastric electrophysiology”的论文。论文内容如下: 一、 摘要 从胃肠道和肠道神经系统记录高质量电生理数据的能力有助于了解…

信通院发布!首个大模型混合云标准

近日,中国信通院发布了首个大模型混合云标准,通过定位当前大模型混合云的能力水平,为基于混合云的大模型服务实践提供指引,并明确未来提升方向。同时,中国信通院基于标准展开大模型混合云能力成熟度专项测试&#xff0…

生信技能54 - WisecondorX多线程并行分析CNV

WisecondorX分析CNV,默认单样本分析,batch_analysis参数设置为True可启动多样本并行分析。 WisecondorX基本使用方法以及npz文件转换和reference构建参考文章: 生信技能53 - wiseconrdoX自动化批量npz转换和reference构建 github: https://github.com/CenterForMedicalGe…

Windows 安装 PostgreSQL 并安装 vector 扩展

目录 前言 下载安装 pgAdmin 4 vector 扩展 前言 调研大模型时,了解到一些大模型的应用,其中一个就是知识库,用户可以上传文档到知识库中,系统解析文档并将内容向量化保存起来,以便在和模型交互时使用。 在和大模…

【MySQL进阶之路 | 高级篇】数据操作类型的角度理解共享锁,排他锁

1. 从数据操作的类型划分:读锁,写锁 对于数据库并发事务的读-读情况并不会引起什么问题。对于写-写,读-写操作或写-写操作这些情况可能会引起一些问题,需要使用MVCC或者加锁的方式来解决它们。在使用加锁的方式解决问题时&#x…

photoshop学习笔记——选区3 快速选择工具

快速选择工具 W shift W 在3种快速选择工具之间切换 对象选择工具 photoshop CC中没有这个工具,利用AI,将款选中的对象快速的提取选区,测试了一下,选区制作的非常nice快速选择工具 跟磁性套索类似,自动识别颜色相似…

如何快速抓取小红书帖子评论?两大实战Python技巧揭秘

摘要: 本文将深入探讨两种高效的Python方法,助您迅速获取小红书文章下方的所有评论,提升市场分析与用户洞察力。通过实战示例与详细解析,让您轻松掌握数据抓取技巧,为您的内容营销策略提供有力支持。 如何快速抓取小…

C++ | Leetcode C++题解之第284题窥视迭代器

题目&#xff1a; 题解&#xff1a; template <class T> class PeekingIterator : public Iterator<T> { public:PeekingIterator(const vector<T>& nums) : Iterator<T>(nums) {flag Iterator<T>::hasNext();if (flag) {nextElement Ite…

[Unity] ShaderGraph实现不同贴图素材的同一材质球复用

无意间发现的ShaderGraph小技巧&#xff0c; 可以实现同一个ShaderGraph&#xff0c;同一个Material材质球&#xff0c; 但使用不同的Texture贴图&#xff0c;而Sprite显示不会相互覆盖。 具体实现方法如下&#xff1a; 声明Texture2D时&#xff0c;把名字命名成&#xff1a…

如何设置postgresql数据库的账户密码

说明&#xff1a;在我的云服务器上&#xff0c;postgres是使用yum的方式安装的&#xff0c;不需要设置postgres账户的密码&#xff0c;本文介绍安装后如何手动设置postgres账户的密码&#xff1b; postgres数据库安装&#xff0c;参考下面这篇文章&#xff1a; PostgreSQL安装…

SMS-Activate 接码

pip install smsactivate from smsactivate.api import SMSActivateAPI 1. 获取密匙 在https://sms-activate.io/cn/api2#balans页面点击生成密匙 2. 查看所需服务的代码符号&#xff0c;点击见表 查看国家代码符号点击见表 3. 获取手机号 def get_phone_new(self):api SMS…

Intel任命Micron技术开发主管领导Intel Foundry制造运营

- **新闻要点**&#xff1a;Intel聘请了Micron的技术开发主管Dr. Naga Chandrasekaran担任首席全球运营官、执行副总裁以及Intel Foundry制造和供应链组织的总经理。他将负责Intel的所有制造运营事务。 #### 任命背景 - **领导团队**&#xff1a;Chandrasekaran将成为Intel执行…

MySQL 查询 limit 100000000, 10 和 limit 10 速度一样快吗?

MySQL 查询 limit 100000000, 10 和 limit 10 速度一样快吗&#xff1f; MySQL内部分为server层和存储引擎层。一般情况下存储引擎都用innodb。 server层有很多模块&#xff0c;其中需要关注的是执行器是用于跟存储引擎打交道的组件。 执行器可以通过调用存储引擎提供的接口&…