搭建博客程序wordpress

根据需求安装相关软件,搭建实验环境:

#CentOS 6:Httpd,PHP,mysql-server,php-mysql

#CentOS 7:Httpd,php,php-mysql mariadb-server

  • 下载wordpress程序,并解压至/var/www/html/目录下

[root@centos077 html]# pwd
/var/www/html
[root@centos077html]#wget  https://cn.wordpress.org/wordpress-4.7.4-zh_CN.zip
[root@centos077 html]#unzip  wordpress-4.3.1-zh_CN.zip
[root@centos077 html]# ll
总用量 7360
-rw-r–r–. 1 root root      16 4月  16 16:28 index.html
-rwxrwxrwx. 1 root root     111 4月  21 19:48 test2.php
-rw-r–r–. 1 root root      20 4月  21 16:49 test.php
drwxr-xr-x. 5 root root    4096 4月  21 21:27 wordpress
-rw-r–r–. 1 root root 7518362 4月  21 16:03 wordpress-4.3.1-zh_CN.zip

  • 网页默认执行用户是APACHE,需要最高权限

[root@centos077 html]#chmod 777 wordpress

  • 启动数据库

[root@centos077 ~]# systemctl start mariadb.service

  • 创建数据库wpdb及用户

[root@centos077 html]#mysql
mysql > create database wpdb;    //创建数据库wpdb
mysql >  show databases;    //查询
mysql > grant all privileges on *.* to wpuser@’%’ identified by “walker”;  //允许用户wpuser,密码walker,从所有主机-‘%’,访问mysql服务器的所有文件-*.*。

mysql > grant all privileges on *.* to wpuser@’localhost’ identified by “walker”;   //允许用户wpuser,密码walker,仅从本地主机访问mysql服务器的所有文件。

mysql> flush privileges;   //刷新MySQL的系统权限相关表


  • 避免登录时候名称被反解,修改/etc/my.cnf添加以下配置
vim /etc/my.cnf
添加skip_name_resolve=on

#浏览器打开http://172.18.51.77/wordpress进行页面安装:

搭建博客程序wordpress搭建博客程序wordpress搭建博客程序wordpress搭建博客程序wordpress

原创文章,作者:Mr-Xiao,如若转载,请注明出处:http://www.178linux.com/74373

(0)
Mr-XiaoMr-Xiao
上一篇 2017-04-28
下一篇 2017-04-28

相关推荐