当前位置:网站首页>alicloud3搭建wordpress
alicloud3搭建wordpress
2022-08-03 19:55:00 【李玺】
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 文件中。
保存后,继续操作即可完成部署。
搭建成功。
边栏推荐
- 百利药业IPO过会:扣非后年亏1.5亿 奥博资本是股东
- 【飞控开发高级教程4】疯壳·开源编队无人机-360 度翻滚
- net-snmp私有mib动态加载到snmpd
- ARMuseum
- 按需视觉识别:愿景和初步方案
- ECCV 2022 Oral | 满分论文!视频实例分割新SOTA: IDOL
- codeforces:C. Maximum Subrectangle【前缀和 + 贪心 + 最小子数组和】
- CSDN帐号管理规范
- LeetCode 1374. 生成每种字符都是奇数个的字符串
- Detailed demonstration pytorch framework implementations old photo repair (GPU)
猜你喜欢
随机推荐
The sword refers to Offer II 044. The maximum value of each level of the binary tree-dfs method
若依集成easyexcel实现excel表格增强
Statistical machine learning 】 【 linear regression model
Unity gets the actual coordinates of the ui on the screen under the canvas
Interview Blitz: What Are Sticky Packs and Half Packs?How to deal with it?
嵌入式分享合集27
亚马逊云科技 Build On 2022 - AIot 第二季物联网专场实验心得
CS kill-free pose
LeetCode 952. Calculate Maximum Component Size by Common Factor
MySQL Basics
Detailed demonstration pytorch framework implementations old photo repair (GPU)
友宏医疗与Actxa签署Pre-M Diabetes TM 战略合作协议
傅里叶变换(深入浅出)
数据驱动的软件智能化开发| ChinaOSC
LeetCode 622. 设计循环队列
ESP8266-Arduino编程实例-MCP4725数模转换器驱动
net-snmp编译报错:/usr/bin/ld: cannot find crti.o: No such file or directory
基础软件与开发语言开源论坛| ChinaOSC
Use ControlTemplate or Style from resource file in WPF .cs and find the control
宁德时代2号人物黄世霖辞任副董事长:身价1370亿









