本帖最后由 jnnnyzhang 于 2015-5-13 14:55 编辑
1.搭好LNMP
请修改好conf/nginx.conf中的PHP解析部分的默认起始页为index.php. 并填写完整的站点目录否则会报403错误。
2.cd /usr/local/src
3.wget https://wordpress.org/latest.tar.gz
4.tar zxf latest.gz #解包后会产生 wordpress目录
5.mv wordpress /usr/local/nginx/html/blog
6.cd /usr/local/nginx/html/blog
7.chown -R php-fpm:php-fpm blog
8./usr/local/mysql/bin/mysql –uroot #进入mysql命令模式
9.create database blog; #创建blog数据库
10.grant all on blog.* to user1@localhost identified by '1222333'; #创建blog数据库的管理用户和密码
在防火墙上添加一条允许本段访问的策略(假设IP段是192.168.1.0/24 主机IP是192.168.1.10)
iptables –I INPUT -s 192.168.1.0/24 --dport 80 -j ACCEPT
在同网段其它机子上访问http://192.168.1.10/blog 根据Wordpress 提示设定相关设置
我的BLOG原文地址:http://junnyzhang.blog.51cto.com/6023/1650864
LNMP环境下安装Wordpress
1.搭好LNMP
请修改好conf/nginx.conf中的PHP解析部分的默认起始页为index.php. 并填写完整的站点目录否则会报403错误。
2.cd /usr/local/src
3.wget https://wordpress.org/latest.tar.gz
4.tar zxf latest.gz #解包后会产生 wordpress目录
5.mv wordpress /usr/local/nginx/html/blog
6.cd /usr/local/nginx/html/blog
7.chown -R php-fpm:php-fpm blog
8./usr/local/mysql/bin/mysql –uroot #进入mysql命令模式
9.create database blog; #创建blog数据库
10.grant all on blog.* to user1@localhost identified by '1222333'; #创建blog数据库的管理用户和密码
在防火墙上添加一条允许本段访问的策略(假设IP段是192.168.1.0/24 主机IP是192.168.1.10)
iptables –I INPUT -s 192.168.1.0/24 --dport 80 -j ACCEPT
在同网段其它机子上访问http://192.168.1.10/blog 根据Wordpress 提示设定相关设置
我的BLOG原文地址:http://junnyzhang.blog.51cto.com/6023/1650864
编辑回复