美文网首页
CentOS 7 Worlpress5.4.1 部署

CentOS 7 Worlpress5.4.1 部署

作者: 雪_糕 | 来源:发表于2020-05-13 15:40 被阅读0次

1. 环境说明

  • OS:CentOS Linux release 7.7.1908
  • 数据库:mysql 5.6.38
  • PHP 版本信息: PHP 7.2.27/Zend Engine v3.2.0/Zend OPcache v7.2.27
  • Nginx:为了方便集成lua用的是openresty/1.15.8.2

2. 安装

  • 下载->解压
wget https://wordpress.org/latest.tar.gz
  • nginx 配置片段
server {
    listen       80;
    server_name  blog.你的域名.com;

    root  /opt/services/php/wuaissy;
    index index.php index.html
    client_max_body_size 20m; #允许最大上传文件大小,默认情况下为1m。

    location / {
            root   /path to your/worlpress;
            index  index.php index.html index.htm;
            try_files $uri $uri/ /index.php?$query_string;
        }
   location ~ .*\.(php|php5)?$
   {

        fastcgi_pass  127.0.0.1:9000; #php-fpm 地址
        fastcgi_index index.php;
        include fastcgi.conf;


    }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

}

  • 重新加载Nginx配置文件
/path to nginx/sbin/nginx -s reload

3. 初始化

3.1. 创建数据库,设置好数据库账号密码
3.2. 请求地址:blog.你的域名.com
image.png
3.3. 点 "Let's go!"下一步
  • 填写好数据库信息-submit 提交


    image.png
3.4. 在服务器worlpress 目录下创建wp-config.php 将页面上的配置信息复制进去
image.png
3.5. 点"Run the installation" 完成安装

相关文章

网友评论

      本文标题:CentOS 7 Worlpress5.4.1 部署

      本文链接:https://www.haomeiwen.com/subject/xdbnnhtx.html