wordpress部署
阿新 • • 發佈:2020-11-23
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 -p 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 按照步驟安裝 站點,使用者名稱,密碼等