Keepalived+Nginx实现Nginx的高可用
集群规划 主机名 IP VIP Nginx:port KeepAlived主备 KA_NG_01 192.168.30.130 192.168.30.120 8088 MASTER KA_NG_02 192.168.30.131 192.168.30.120 8088 BACKUP 实验环境: [root@KA_NG_01 ~]# cat /etc/redhat-release CentOS release 6.9 (Final) [root@KA_NG_01 ~]# keepalived -v Keepalived v1.2.13 (03/19,2015) [root@KA_NG_01 ~]# nginx -v nginx version: nginx/ 1.14.0 如果是编译安装的的话,在本机首先配置好YUM源,保证机器可以访问公网,然后安装以下依赖: [root@KA_NG_01 ~]# yum install -y gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl openssl-devel 去官网下载对应的的软件包进行编译安装 Nginx的官网下载地址: http://nginx.org/en/download.html