wordpress部署

1. 安装nginx,mysql,php
    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
    rpm -ivh mysql-community-release-el7-5.noarch.rpm
    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
    yum install -y nginx mysql-server
    yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof --skip-broken
    
2.设置mysql密码
    update user set password=PASSWORD("这里输入root用户密码") where User='root';
     或者mysqladmin -u root  password '密码'

3.配置php
    tar xzf wordpress-5.5.3.tar.gz -C /var/www/
    cd /var/www/wordpress && cp wp-config-sample.php ./wp-config.php

 

 

4. 配置nginx
    server_name  www.hairou.com;
    location / {
        root         /var/www/wordpress;
        index        index.php index.html index.htm;
        }
    location ~ \.php$ {
        root           /var/www/wordpress;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
            }

 

5. 启动nginx,php,mysqld
    systemctl start nginx    systemctl start php-fpm  systemctl start mysqld

6. 访问www.hairou.com
    按照步骤安装
    站点,用户名,密码等

 

 

 

 

  

 

 

 

posted @ 2020-11-23 17:08  MlxgzZ  阅读(167)  评论(0编辑  收藏  举报