用Base源安装
yum -y install https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm
安装完成之后,进入/etc/yum.repos.d修改remi-php74.repo文件
用vim打开的话将里面所有 enabled=0 改为 enabled=1 或者用sed直接在命令行中更改
sed -i 's#enabled=0#enabled=1#g' /etc/yum.repos.d/remi-php74.repo
安装php5.6
yum -y install php56-php php56-php-mysqlnd mariadb-server
开启httpd服务和mariadb服务
systemctl start httpd
systemctl start mariadb
或者设置开机自启httpd服务mariadb服务
systemctl enable httpd
systemctl enable mariadb
命令行输入 mysql
进入MariaDB交互界面
输入create database wordpress;创建资源库
MariaDB [(none)]> create database wordpress;
授予所有的wordpress到wordpress@ 'localhost '由 'xue@ '标识;
MariaDB [(none)]> grant all on wordpress.* to wordpress@'localhost' identified by 'xue@';
下载最新wordpress简体中文版
wget https://cn.wordpress.org/latest-zh_CN.zip
解压缩下载到的文件
unzip latest-zh_CN.zip
将解压缩后的文件放到/var/www/html目录下
mv wordpress/ /var/www/html/
将所有html目录下所有属主和属组改为apache
chown -R apache.apache /var/www/html
Cp一份配置文件中信息 复制到wp-config.php 修改wp-config.php配置信息
浏览器访问
感谢观看!!!