【Centos7】WordPress的安装

准备工作:

挂载光盘,安装本地yum库

#yum install httpd -y  ///安装Apache服务
#systemctl stop firewalld.service  ///临时关闭firewalld防火墙
#setenforce 0  /// 临时关闭selinux防火墙
#ststemctl  restart httpd.servicer  ///重启Apache服务
#yum install php  -y  ///安装PHP服务
#yum install php-mysql  -y  ///安装php-mysql服务

一丶进入MySQL

#MySQL -u root -p
Enter  password:
Alter user 'root'@'localhost' identified by 'Kong@159357';  ///重置密码,不然无法创建用户
create user 'aa02'@'192.168.100.134' identified by '159357'; ///创建用户
show databases; ///查看数据库
create database wordpress; ///创建数据库
grant all  privileges on wordpress.* to 'aa02'@'192.168.100.134'; ///指定某个数据库给某个用户

二丶将WordPress的tar文件上传至/opt目录

# tar zxf wordpress-4.5.3-zh_CN.tar.gz    
# mv wordpress/* .

 将文件移动到/var/www/html下

#ststemctl  restart httpd.servicer  ///重启Apache服务

三丶进入域名进行管理

浏览器地址输入 192.168.100.134 按提示进行配置 

在/var/www/html 目录下创建一个名为 wp-config.php的文件,内容为提示部分。

然后安装成功。

原文地址:https://www.cnblogs.com/centos7/p/6044408.html