版权声明:本文为木偶人shaon原创文章,转载请注明原文地址,非常感谢。 https://cloud.tencent.com/developer/article/1434721
参考http://blog.csdn.net/wh211212/article/details/52996699,完成php和MariaDB 的安装
[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
# 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 /”并配置最终设置
配置完成后,点击“登录”按钮登录,输入刚刚创建的用户名和密码
这是管理您的博客的管理面板
索引页是“http://(主机名或IP地址)/ wordpress /”,访问它,并确保它正常显示。