yum install -y httpd
//安装apache

rpm-Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm //添加mysql源
yum install mysql mysql-server mysql-libsmysql-server –y //下载mysql相关包

setenforce 0 // 设置selinux

firewall-cmd --permanent --add-service=http //防火墙放行阿帕奇
firewall-cmd --permanent --add-service=mysql //防火墙放行mysql
firewall-cmd --reload //重启防火墙
iptables -F //清空 iptables 规则

systemctl restart httpd //重启阿帕奇

systemctl start mysql //启动mysql

mysql_secure_installation
//初始化mysql 并设置密码

mysql -uroot -p123
Create database wordpress;
//创建数据库
Exit

yum install php
//安装php环境

yum install php-mysql

yum install php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc

编辑测试文件:vim /var/www/html/info.php

<?php
phpinfo();?>

在浏览器中输入 ip
地址 /info.php,
CentOS7 部署 word press!

CentOS7 部署 word press!

下载word press:
wget http://cn.wordpress.org/wordpress-3.9-zh_CN.zip

把文件复制到 /var/www/html目录下
CentOS7 部署 word press!
CentOS7 部署 word press!
CentOS7 部署 word press!
CentOS7 部署 word press!
cp -rf wordpress/* /var/www/html/
vim /var/www/html/wp-config-sample.php
CentOS7 部署 word press!

Word press部署成功!
CentOS7 部署 word press!