标签:res config root用户 9.png 动态 远程 name rom ==
# 下载安装文件
cd /usr/local/nginx/html/blog wget https://cn.wordpress.org/wordpress-4.8.1-zh_CN.tar.gz tar xf wordpress-4.8.1-zh_CN.tar.gz cd wordpress -->可以将文件移到 关于文件权限的考虑 PHP文件是root用户,因为是开发管理/usr/local/nginx/html/blog,避免页面显示多路径 cd /usr/local/nginx/html chown -R root.root ./blog find ./blog/ -type f|xargs chmod 644 find ./blog/ -type d |xargs chmod 755
mkdir -p /usr/local/nginx/html/blog/wordpress/wp-content/uploads chown nginx.nginx /usr/local/nginx/html/blog/wordpress/wp-content/uploads
添加数据库信息
mysql -uroot -proot create database wordpress; show databases; grant all on wordpress.* to wordpress@‘localhost‘ identified by ‘root‘; ==>grant all on wordpress.* to wordpress@‘192.168.25.%‘ identified by ‘root‘; flush privileges; select user,host from mysql.user; 远程连接数据库:mysql -ubbs -proot -h 192.168.25.144
更改首页为动态:
vim /usr/local/nginx/conf/extra/blog.conf server { listen 88; server_name www.blog.com; root html/blog; location / { index index.php index.html index.htm; } location ~.*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } access_log logs/access_blog.log main; }
设置页面显示
http://www.blog.com:88/wordpress/index.php
添加wp-config.php配置信息
vim /usr/local/nginx/html/blog/wordpress/wp-config.php
mysql中查看数据:
use wordpress; select * from ftl_posts\G;
登录界面:
http://www.blog.com:88/wordpress/wp-login.php
标签:res config root用户 9.png 动态 远程 name rom ==
原文地址:https://www.cnblogs.com/ftl1012/p/9302206.html