当前位置:网站首页>alicloud3搭建wordpress
alicloud3搭建wordpress
2022-07-16 19:53:00 【考古学家lx(李玺)】
alicloud linux3安装和部署wordpress,手动安装,没用面板。
Lnmp
通过 LNMP一键安装包一键搭建服务器环境。
下载地址:https://lnmp.org/download.html
下载后解压下,然后执行 ./install.sh 安装。

大概需要20分钟,建议除了数据库密码外,其他全选默认版本,一路回车就可以。
Mysql
登录: mysql -uroot -p
创建wordpress数据库:CREATE DATABASE wordpress
添加wordpress数据库用户,wordpress是账号,password123是密码,自己改改。
create user 'wordpress'@'localhost' identified by 'password123';
grant all privileges on wordpress.* to 'wordpress'@'localhost' identified by 'password123';
Nginx
更改 nginx.conf 配置文件,主要换路径。
server {
listen 80;
# 下面youhost换成你自己的域名
server_name yourhost.com www.youhost.com;
# 下面这个是wordpress部署路径
root /usr/local/nginx/html/wordpress;
location / {
index index.php index.html index.htm;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include fastcgi_params;
}
}
wordpress
下载安装包并解压
wget https://cn.wordpress.org/latest-zh_CN.tar.gz
tar -zxvf latest-zh_CN.tar.gz
复制到nginx部署目录
mv ./wordpress /usr/local/nginx/html/
然后对目录文件设置权限,要保证nginx和部署目录的用户组一致。
首先查看并确认nginx用户组
cat /etc/passwd
看下有nginx没,没有的话就自己加一下。
root:x:0:0:root:/root:/bin/bash
nginx:x:996:995:nginx user:/var/cache/nginx:/sbin/nologin
没有的话就创建用户组
useradd -r -M -s /sbin/nologin nginx
然后
cd /usr/local/nginx/html/
chown -R nginx.nginx wordpress
cd wordpress
chmod 777 *
最后操作
现在访问域名即可,填数据库信息,DB用户建议不要用root,用后面创建的user,提交成功后会给出一段文字。

在/usr/local/nginx/html/wordpress下新建 wp-config.php 文件。
然后把给出的文字内容,复制到 wp-config.php 文件中。
保存后,继续操作即可完成部署。
搭建成功。

边栏推荐
- MySQL 5.7.37 database download and installation tutorial (no installation required for Windows)
- Domestic light! High score spatiotemporal representation learning model uniformer
- 机器学习实战运用:速刷牛客5道机器学习题目
- The real working state of the 21st graduates within one year after graduation
- pA是什么?构建病毒的结构元件,polyA,一段重复的碱基序列
- Rewrite equals why rewrite hashcode
- MySQL到底是如何执行SQL语句的
- DCAT admin code generator application (re edit)
- 第9.1章MATLAB的程序设计
- Leetcode 1331. Array sequence number conversion
猜你喜欢

Flutter 卡在 Running Gradle task ‘assembleDebug‘... 的解决方法

Accéder aux variables locales dans une classe interne anonyme

Leetcode 1332. 删除回文子序列(看完题解才恍然大悟!!!!!!!)

图像、视频、3D 数据一把抓,不挑食的 AI 模型 Omnivore !
![Sword finger offer 44 [a bit in the number sequence] [100%, 100%]](/img/fd/1d14ea8a1bdfbd53366d4781586797.png)
Sword finger offer 44 [a bit in the number sequence] [100%, 100%]

哪个品牌的蓝牙耳机降噪好?主动降噪耳机排行榜10强

TSM, a cost-effective model, achieves 3D effect at the cost of 2D

Istio gray Publishing: deploy bookinfo microservice project

DCAT admin code generator application (re edit)

SCI论文投稿流程
随机推荐
星巴克、可口可乐、苹果这些顶级企业是如何进行品牌营销
985学生:为什么现在学校还在教C语言?| 文末送书
Domestic light! High score spatiotemporal representation learning model uniformer
TimeSformer: 只靠 Transformer 就能理解视频?注意力机制的又一次进击!
图像、视频、3D 数据一把抓,不挑食的 AI 模型 Omnivore !
MySQL 5.7.37 database download and installation tutorial (no installation required for Windows)
21届毕业生毕业一年内的真实工作状态
[UCOS III source code analysis] - wait for multiple kernel objects
DOM operation in reverse order, interview questions
MP1655GG-Z MPS/美国芯源 MOSFET 的开关模式转换器 资源 方案
Results of shooting competition Huawei od JS
Spark streaming Programming Guide
Leetcode 1332. 删除回文子序列(看完题解才恍然大悟!!!!!!!)
Which is a good noise reduction Bluetooth headset? Bluetooth headset noise reduction recommendations
CONDA installation requirements Txt specified dependent package
[sequential reading and writing of data files in C language]
What are the main RPA manufacturers in the current mainstream
Practical application of machine learning: quickly brush five machine learning problems of Niuke
迪奥疑似抄袭中国马面裙,国内官网已下架该产品
Win11预览版更新错误怎么办?Win11预览版安装失败的解决方法