首页 > 代码库 > lamp环境安装wordpress
lamp环境安装wordpress
一.lamp环境安装wordpress准备工作:
1.安装好lamp环境.
不会搭建lamp环境的参考:php和apache编译安装及mysql 5.1编译方法
2.下载wordpress:https://cn.wordpress.org/
二.lamp环境安装wordpress安装过程:
1.建立wordpress数据库和用户授权:wordpress,
mysql> cretae database wordpress charset utf8;
mysql> grant create,update,select,insert,delete on wordpress.* to ‘wordpress‘@‘localhost‘ identified by "mybaby"
mysql> select user,host from user;
+-----------+-----------+
| user | host |
+-----------+-----------+
| root | 127.0.0.1 |
| root | localhost |
| wordpress | localhost |
+-----------+-----------+
3 rows in set (0.00 sec)
2.建立网站目录:
mkdir -p /data/www/blog/
3.解压安装
[root@ser200 tools]# unzip wordpress-4.0-zh_CN.zip
[root@ser200 tools]# mv wordpress/* /data/www/blog/
4.修改网站目录权限和属主为root.root,上传目录upload为apache用户txidc.txidc
[root@ser200 www]# chown -R root.root blog
[root@ser200 www]# ll blog
total 176
-rw-r--r-- 1 root root 418 Sep 25 2013 index.php
[root@ser200 www]# chown txidc.txidc blog/wp-content/
[root@ser200 uploads]# ll
total 4
drwxr-xr-x 3 txidc txidc 4096 Oct 19 21:36 2014
本文出自 “蜘蛛侠” 博客,请务必保留此出处http://txidc.blog.51cto.com/9138217/1565759
lamp环境安装wordpress