负载均衡高可用部署

nginx负载均衡高可用部署上线lnmp## 标题
pc1:192.168.159.11
pc2:192.168.159.12
pc3:192.168.15913

pc1:安装部署nginx
yum -y install gcc pcre-devel openssl-devel
yum -y install wget
wget http:\nginx.org\download\nginx-1.18.0.tar.gz
cd /root
tar zxf nginx-1.18.0.tar.gz
cd nginx-1.18.0
./ && configure && make && make install
/usr/local/nginx/sbin/nginx

scp -r /usr/local/nginx root:192.168.159.12:/usr/local/nginx
13:
\usr\local\nginx\conf\nginx.conf

pc2:yum -y install gcc pcre-devel openssl-devel
yum -y install mariadb mariadb-server
grant replication slave on . to `tom’ @% identified by123;
stop slaves;
show master status;
help change master to
start slaves;
show slaves status \G;

yum -y install keepalived
vim /etckeepalived/keepalived.conf

yum -y install php php-mysql php-gd php-fpm
/usr/local/nginx/html
vim index.php
1111111

<?php phpinfo(); ?>

yum -y install unzip
unzip /root/Disz
chmod -R 777 /usr/local/nginx/html
/usr/local/nginx/sbin/nginx -s reload
systemctl start fpm
pc3:同2

猜你喜欢

转载自blog.csdn.net/youchaoXu/article/details/114185511