标签:28 nginx yum 2021 install wordpress fastcgi php71w
阿里云部署wordpress并支持https
# 安装数据库
yum -y install mariadb-server mariadb
# 安装php7
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php71w-xsl php71w php71w-ldap php71w-cli php71w-common php71w-devel php71w-gd php71w-pdo php71w-mysql php71w-mbstring php71w-bcmath php71w-mcrypt -y
yum install -y php71w-fpm
# 安装nginx
yum install -y epel-release
yum install -y nginx
# 启动php 数据库 nginx
systemctl start php-fpm mariadb nginx
# nginx 配置文件设置
server {
listen 80;
server_name www.itnzs.top;
location / {
root /usr/share/nginx/html;
index index.php;
}
location ~ \.php$ {
root /home/nginx/html; #指定网站目录
fastcgi_pass 127.0.0.1:9000; #指定访问地址
fastcgi_index index.php; #指定默认文件
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #站点根目录,取决于root配置项
include fastcgi_params; #包含nginx常量定义
}
}
# 重启nginx
systemctl restart nginx
# mysql 创建数据库
mysql -e "create database wordpress"
# 代码上传
tar xf wordpress-5.7.2-zh_CN.tar.gz
rm -rf /usr/share/nginx/html/*
cp -r ./wordpress/* /usr/share/nginx/html
浏览器访问
标签:28,nginx,yum,2021,install,wordpress,fastcgi,php71w 来源: https://blog.csdn.net/NewRain_wang/article/details/117363371
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。