CentOS 7.2 安装WordPress

安装WordPress

  • 安装Blog系统WordPress

参考http://blog.csdn.net/wh211212/article/details/52996699,完成php和MariaDB 的安装

  • 为WordPress创建数据库
[root@linuxprobe ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 627
Server version: 5.5.50-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database wordpress; 
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all privileges on wordpress.* to wordpress@'localhost' identified by 'password';
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> flush privileges; 
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> exit
Bye
  • 安装WordPress
# install from EPEL
[root@linuxprobe ~]# yum --enablerepo=epel -y install wordpress
[root@linuxprobe ~]# vi /etc/wordpress/wp-config.php
# line 23: specify Database
define('DB_NAME', 'wordpress
');
# line 26: specify DB user
define('DB_USER', 'wordpress
');
# line 29: specify DB password
define('DB_PASSWORD', 'password
');
[root@linuxprobe ~]# vi /etc/httpd/conf.d/wordpress.conf
# line 8: add
Require all granted
[root@linuxprobe ~]# systemctl restart httpd

访问“http://(服务器的主机名或IP地址)/ wordpress /”并配置最终设置
CentOS 7.2 安装WordPress_第1张图片

配置完成后,点击“登录”按钮登录,输入刚刚创建的用户名和密码
CentOS 7.2 安装WordPress_第2张图片

这是管理您的博客的管理面板
CentOS 7.2 安装WordPress_第3张图片

索引页是“http://(主机名或IP地址)/ wordpress /”,访问它,并确保它正常显示。
CentOS 7.2 安装WordPress_第4张图片

总结

  • 确保wp-config文件中数据库的用户名和密码正确

你可能感兴趣的:(【CentOS6】)