hb_sz 发表于 2018-12-31 13:22:57

Nginx+keepalived负载均衡高可用篇第③版

Nginx+keepalived负载均衡高可用篇第③版
  对付中、小型企业,假如没有资金去购买昂贵的四/七层负载均衡交换机,那么Nginx是不错的七层负载均衡选择,并且可以通过Nginx + Keepalived实现Nginx 负载均衡器双机互备,恣意一台呆板发生妨碍,对方都可以或许将假造IP吸取已往。以下内容为第三次更新了,下面将其安装步调具体阐发下:
  
一、拓扑环境:
二、安装keepalived
wget
tar zxvf keepalived-1.1.15.tar.gz
cd keepalived-1.1.15
./configure --prefix=/usr/local/keepalived
make
make install
cp /usr/local/keepalived/sbin/keepalived /usr/sbin/
cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/
cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/
mkdir /etc/keepalived
cd /etc/keepalived/
  vim keepalived.conf
! Configuration File for keepalived
global_defs {
notification_email {

   }
notification_email_from
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id LVS_DEVEL
}
vrrp_instance VI_1 {
   state MASTER
   interface eth0
   virtual_router_id 51
   mcast_src_ip 192.168.0.154   
页: [1]
查看完整版本: Nginx+keepalived负载均衡高可用篇第③版