当前位置:网站首页>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 文件中。
保存后,继续操作即可完成部署。
搭建成功。
边栏推荐
- 安装anaconda并创建虚拟环境
- 1-php学习笔记之数据类型
- 倒计时2天,“文化数字化战略新型基础设施暨文化艺术链生态建设发布会”启幕在即
- Anaconda virtual environment migration
- ERROR: You don‘t have the SNMP perl module installed.
- 【飞控开发高级教程3】疯壳·开源编队无人机-定高、定点、悬停
- The sword refers to Offer II 044. The maximum value of each level of the binary tree-dfs method
- 余弦距离介绍
- 利用net-snmp的库实现snmpget,snmpset
- glide set gif start stop
猜你喜欢

告诉你0基础怎么学好游戏建模?

EMQX Newsletter 2022-07|EMQX 5.0 正式发布、EMQX Cloud 新增 2 个数据库集成

入门3D建模基础教程详细分解

调用EasyCVR云台控制接口时,因网络延迟导致云台操作异常该如何解决?

Anaconda 虚拟环境迁移

LeetCode 952. Calculate Maximum Component Size by Common Factor

宁德时代2号人物黄世霖辞任副董事长:身价1370亿

揭秘5名运维如何轻松管理数亿级流量系统

钱江摩托某型号产品ECU货不对版 消费者知情权应如何保障?

调用EasyCVR接口时视频流请求出现404,并报错SSL Error,是什么原因?
随机推荐
Jingdong cloud released a new generation of distributed database StarDB 5.0
Shell编程之循环语句
JS 内置构造函数 扩展 prototype 继承 借用构造函数 组合式 原型式creat 寄生式 寄生组合式 call apply instanceof
高效目标检测:动态候选较大程度提升检测精度(附论文下载)
Reveal how the five operational management level of hundreds of millions of easily flow system
NNLM、RNNLM等语言模型 实现 下一单词预测(next-word prediction)
Introduction to Cosine Distance
高并发,你真的理解透彻了吗?
调用EasyCVR接口时视频流请求出现404,并报错SSL Error,是什么原因?
Shell programming loop statement
安装anaconda并创建虚拟环境
The effective square of the test (one question of the day 7/29)
自定义form表单验证
Network protocol-TCP, UDP difference and TCP three-way handshake, four wave
149. 直线上最多的点数-并查集做法
边缘盒子+时序数据库,美的数字化平台 iBuilding 背后的技术选型
从文本匹配到语义相关——新闻相似度计算的一般思路
头条服务端一面经典10道面试题解析
CentOS 7 安装mysql
多模态 参考资料汇总