2.在centos7虚拟机搭建nginx网站
1.nginx配置目录
cd /etc/nginx/conf.d/
添加 vi www.18cat.conf
server{ listen 80; server_name www.18cat.com; location / { root /var/www/html; index index.html index.htm index.php; } error_page 500 502 503 504 /50x.html; location = /50x.html{ root /usr/share/nginx/html; } location ~\.php$ { root /var/www/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name; include fastcgi_params; } }
2.解压WordPress
tar xzf wordpress-4.4.2-zh_CN.tar.gz -C /var/www/html/
mv /var/www/html/wordpress/* /var/www/html/
3.mysql创建WordPress数据库
CREATE DATABASE IF NOT EXISTS wordpress DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
4.安装