一、实验环境
搭建此个人blog的前提是已近成功安装了nginx、mysql、php,本文采用centos6.5做讲解。
二、搭建步骤
搭建blog(wordpress)
1.下载wordpress到nginx/html/blog/
wget /application/nginx/html/blog/ https://cn.wordpress.org/wordpress-4.5.1-zh_CN.tar.gz
2.登录数据库创建数据库wordpress和授权用户wordpress
create database wordpress;
grant all on wordpress.* to wordpress@'localhost' identified by 'chen';
flush privileges;
select user,host from mysql.user;---查看是否授权成功
mysql> select user,host from mysql.user ;
+-----------+-----------+
| user | host |
| bbs | 10.0.0.% |
| root | 127.0.0.1 |
| chen_shop | localhost |
| root | localhost |
| shop | localhost |
| shop_chen | localhost |
| wordpress | localhost |
7 rows in set (0.00 sec)
3.解压wordpress-4.5.1-zh_CN.tar.gz到blog目录下
tar xf wordpress-4.5.1-zh_CN.tar.gz
mv wordpress/* ./
rm -rf wordpress-4.5.1-zh_CN.tar.gz
rm -rf wordpress
4.授权
chown -R nginx.nginx blog/
5.输入域名进行设置。
blog.chen.org(前提是之前已将此写入了hosts文件中)
本文转自chengong1013 51CTO博客,原文链接:http://blog.51cto.com/purify/1789478,如需转载请自行联系原作者