欧美一区2区三区4区公司二百,国产精品婷婷午夜在线观看,自拍偷拍亚洲精品,国产美女诱惑一区二区

歡迎來到夢飛科技

系統配置

當前優惠活動:

CentOS 6.5系統設置LVS(NAT)+keepalived高可用負載平衡系統

一、簡介

VS/NAT道理圖:

CentOS 6.5系統配置LVS(NAT)+keepalived高可用負載均衡系統

二、系統情況

嘗試拓撲:

CentOS 6.5系統配置LVS(NAT)+keepalived高可用負載均衡系統

系統平臺:CentOS 6.3

Kernel:2.6.32-279.el6.i686

LVS版本:ipvsadm-1.26

keepalived版本:keepalived-1.2.4

三、安裝

0、安裝LVS前系統需要安裝popt-static,kernel-devel,make,gcc,openssl-devel,lftp,libnl*,popt*

1、在兩臺Director Server上別離設置LVS+Keepalived

LVS install -------------

[[email protected]_MASTER ~]# wget http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.26.tar.gz

[[email protected]_MASTER ~]# ln -s /usr/src/kernels/2.6.32-279.el6.i686//usr/src/linux/

[[email protected]_MASTER ~]# tar zxvf ipvsadm-1.26.tar.gz

[[email protected]_MASTER ~]# cd ipvsadm-1.26

[[email protected]_MASTER ipvsadm-1.26]# make && make install

Keepalived install -------------

[[email protected]_MASTER ~]# wget http://www.keepalived.org/software/keepalived-1.2.4.tar.gz

[[email protected]_MASTER ~]# tar zxvf keepalived-1.2.4.tar.gz

[[email protected]_MASTER ~]# cd keepalived-1.2.4

[[email protected]_MASTER keepalived-1.2.4]# ./configure && make && make install

######### 將keepalived做成啟動處事,利便打點##########

[[email protected]_MASTER ~]# cp /usr/local/etc/rc.d/init.d/keepalived /etc/init.d/

[[email protected]_MASTER ~]# cp /usr/local/etc/sysconfig/keepalived /etc/sysconfig/

[[email protected]_MASTER ~]# mkdir /etc/keepalived/

[[email protected]_MASTER ~]# cp /usr/local/etc/keepalived/keepalived.conf /etc/keepalived/

[[email protected]_MASTER ~]# cp /usr/local/sbin/keepalived /usr/sbin/

[[email protected]_MASTER ~]# service keepalived start | stop

2、開啟路由轉發

[[email protected]_MASTER ~]# vim /etc/sysctl.conf
net.ipv4.ip_forward = 1
[[email protected]_MASTER ~]# sysctl -p

3、設置Keepalived

[[email protected]_MASTER ~]# less /etc/keepalived/keepalived.conf


! Configuration File for keepalived

global_defs {
   router_id LVS_MASTER
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        10.0.0.227
    }
}

vrrp_instance LAN_GATEWAY {
    state MASTER
    interface eth1
    virtual_router_id 52
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.10.10
    }
}

virtual_server 10.0.0.227 80 {
    delay_loop 6
    lb_algo rr
    lb_kind NAT
#   persistence_timeout 5
    protocol TCP

    real_server 192.168.10.4 80 {
        weight 3
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
            connect_port 80
        }
    }

    real_server 192.168.10.5 80 {
        weight 3
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
            connect_port 80
        }
    }
}

BACKUP處事器同上設置,先安裝lvs再安裝keepalived,,然后設置/etc/keepalived/keepalived.conf,只需將講明部門改一下即

4、別離在2臺Real Server上面配置網關

把網關都配置成:192.168.10.10

5、在2臺RealServer中別離設置HTTP

夢飛科技 - 全球數據中心基礎服務領先供應商

Copyright © 2003-2019 MFISP.COM. 國外服務器租用 IDC公司 版權所有 ? 粵ICP備11019662號

主站蜘蛛池模板: 台东市| 玉山县| 雷山县| 铁岭县| 文登市| 万安县| 邹城市| 仪征市| 通化市| 浦北县| 北宁市| 思南县| 克什克腾旗| 武宁县| 建水县| 松原市| 宁海县| 宜宾县| 文安县| 闽侯县| 连平县| 平安县| 肃南| 松滋市| 罗田县| 平江县| 桂平市| 涪陵区| 蒙阴县| 泰顺县| 东港市| 天津市| 班玛县| 岳普湖县| 鹤庆县| 镇平县| 巨鹿县| 武功县| 芜湖市| 双柏县| 射阳县|