Nging+keepalived高可用
资源列表
主机名 | IP地址 |
---|---|
Nginx01 | 192.163.93.128 |
Nginx02 | 192.168.93.129 |
测试机 | 192.168.93.130 |
基础环境
- 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
- 关闭内核安全机制
sed -i "s/.*SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config
reboot
PS:修改完内核安全机制后需要重启机器,故用到reboot
- 修改主机名
hostnamectl set-hostname nginx01
hostnamectl set-hostname nginx02
- 添加hosts解析
cat >> /etc/hosts << EOF
192.168.93.128 nginx01
192.168.93.129 nginx02
EOF
一、安装Nginx
此