Linux与云计算——第二阶段Linux服务器架设 第七章:网站WEB服务器架设—博客系统WordPress

Linux与云计算——第二阶段Linux服务器架设

第七章:网站WEB服务器架设—博客系统WordPress

博客系统:WordPress

[1] 安装PHP

[2] 安装MariaDB服务器

[3] 为WordPress服务器建立一个数据库

[root@client ~]# mysql -u root -p php

# create "wordpress" databse (用户名wordpress,密码redhat)mysql

MariaDB [(none)]> create database wordpress; sql

Query OK, 1 row affected (0.00 sec)数据库

MariaDB [(none)]> grant all privileges on wordpress.* to wordpress@'localhost' identified by 'redhat'; vim

Query OK, 0 rows affected (0.00 sec)服务器

MariaDB [(none)]> flush privileges; ide

Query OK, 0 rows affected (0.00 sec)wordpress

MariaDB [(none)]> exit 网站

Byeui

[4] 安装 WordPress.

[root@client ~]# yum -y install wordpress

[root@client ~]# vim /etc/wordpress/wp-config.php

# line 23: 定义数据库

define('DB_NAME', 'wordpress');

# line 26: 定义数据库用户

define('DB_USER', 'wordpress');

# line 29: 定义数据库密码

define('DB_PASSWORD', 'password');

[root@client ~]# vi /etc/httpd/conf.d/wordpress.conf

# line 8: 添加

Require all granted

[root@client ~]# systemctl restart httpd

[5] 访问"http://(服务器主机名或IP地址)/wordpress/" 而且完成最终配置

相关文章
相关标签/搜索