赞
踩
web1 ip192.168.1.1 nginx php nfs
web2 ip192.168.1.2 nginx php nfs
web3 ip192.168.1.3 nginx php nfs
db ip192.168.1.4 mariadb-server mariadb
nfs ip192.168.1.5 nfs
lb1 ip192.168.1.6 nginx
lb2 ip192.168.1.7 nginx
m ip192.168.1.8
backup ip192.168.1.9
yum install -y nginx
# 解决yum安装软件冲突问题
yum remove php-mysql php php-fpm php-common
# 准备yum安装软件扩展源信息
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
# 利用yum安装PHP相关软件信息
yum install -y php71w php71w-cli php71w-common php71w-devel php71w-embedded php71w-gd php71w-mcrypt php71w-mbstring php71w-pdo php71w-xml php71w-fpm php71w-mysqlnd php71w-opcache php71w-pecl-memcached php71w-pecl-redis php71w-pecl-mongodb
yum install mariadb-server mariadb -y
wordpress 提取码:paq9
链接: https://pan.baidu.com/s/1XBhXfwVv3JySpYxcFpFolw 提取码: paq9
systemctl start php-fpm nginx mariadb
systemctl enable php-fpm nginx mariadb
groupadd -g777 wy
useradd -u777 -g777 wy
sed -i '/^user/c user wy' /etc/nginx/nginx.conf #修改nginx身份
sed -i '/^user/c user = wy' /etc/php-fpm.d/www.conf
sed -i '/^group/c group = wy' /etc/php-fpm.d/www.conf
[root@web1 ~]# vim /etc/nginx/conf.d/www.mcweiyi.club.conf server { listen 80; server_name www.mcweiyi.club; root /html/wordpress; client_max_body_size 100m; location / { index index.php; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
mkdir /html
cd /html
rz wordpress.zip
unzip wordpress.zip
chown -R wy.wy /html/wordpress
systemctl restart nginx php-fpm
浏览器测试
groupadd -g777 wy
useradd -u777 -g777 wy
scp 192.168.1.1:/etc/yum.repos.d/* /etc/yum.repos.d/
安装nginx php 看最上边
rsync -avz --delete 192.168.1.1:/html /
rsync -avz --delete 192.168.1.1:/etc/nginx/* /etc/nginx/
systemctl restart nginx php-fpm
systemctl enable nginx php-fpm
加多台web服务器同样的
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。