wordpress

1.关闭防护墙
setence 0
systemctl stop firewalls
2.配制主从ip
vi /etc/hosts
192.168.100.213 mysql 1
192.168.100.122 mysql 2

3.配置yum 源
mv /etc/yum.repos.d/CentOS-* /media/
vi /etc/yum.repos.d/local.repo
mkdir /opt/centos
mount CentOS~~~ /opt/centos

4.安装软件包

yum install -y nginx mariadb mariadb-server php-fpm php-mysql unzip net-tools 

修改配置文件

vi /etc/nginx/conf.d/default.conf (加index.php 改为index.php)

vi /etc/php-fpm.d/www.conf (user=nginx   group=nginx)

vi /etc/nginx/fastcgi_params(

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

解压wordpress

unzip wordpress-4.7.3-zh_CN.zip 

启动

systemctl start mariadb 

还原数据库

mysql_secure_installation 

创建站点目录并移进相关文件

mkdir /www

ls

mv wordpress/* /www/
cd /www/

ls

mv wp-config-sample.php wp-config.php

mysql -uroot -p000000

creat catabasebae wordpress

vi wp-config.php 

systemctl restart mariadb
systemctl restart nginx
systemctl restart php-fpm

 

posted @ 2020-09-14 13:32  东北最后深情  阅读(177)  评论(0编辑  收藏  举报