标签:root chown break .com mysql 创建 mys pre org
#创建数据库和用户
mysql -uroot -p123456 -S /data/3306/mysql.sock create database wordpress; show databases like "wordpress"; grant all on wordpress.* to wordpress@‘127.0.0.1‘ identified by ‘123456‘; flush privileges; show grants for wordpress@‘127.0.0.1‘; select user,host from mysql.user; quit #修改Nginx配置文件 cd /application/nginx/ mkdir conf/extra vim conf/extra/blog.conf server{ listen 80; server_name blog.peterwang.org; root html/blog; index index.php index.html index.htm; location / { if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } } location ~ .*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } } vim conf/nginx.conf ... include extra/blog.conf; ... mkdir html/blog chown -R nginx.nginx html/blog/ sbin/nginx -t sbin/nginx -s reload #安装WordPress cd /server/tools wget https://cn.wordpress.org/wordpress-4.8.1-zh_CN.tar.gz tar xf wordpress-4.8.1-zh_CN.tar.gz mv wordpress/* /application/nginx/html/blog/
标签:root chown break .com mysql 创建 mys pre org
原文地址:http://www.cnblogs.com/Peter2014/p/7520487.html