LVS+Keepalived+httpd安装及配置
LVS+Keepalived+httpd安装及配置
原文:http://blog.csdn.net/yanpenglei/article/details/53838354
环境
操作系统 CentOS-6.5-x86_64-minimal.iso
VIP:192.168.252.100
Director LVS-Master :192.168.252.10
Director LVS-Backup:192.168.252.11
Real Server 01:192.168.252.12
Real Server 02:192.168.252.13
安装 ipvsadm(分别在LVS-Master和LVS-Backup中)
linux内核2.4版本以上的基本都支持LVS,要使用lvs只需要再安装一个lvs的管理工具:ipvsadm
[root@souyunku ~]# yum install ipvsadm
##安装keepalived(分别在LVS-Master和LVS-Backup中)
keepalived配置
[root@souyunku ~]# yum install keepalived
备份 keepalived.conf
[root@souyunku ~]# cd /etc/keepalived/
[root@souyunku keepalived]# cp keepalived.conf keepalived.conf.bak
编辑 keepalived.conf
[root@souyunku ~]# vi /etc/keepalived/keepalived.conf
! Configuration File for keepalivedglobal_defs {notification_email { #指定keepalived在发生切换时需要发送email到的对象,一行一个sysadmin@fire.loc}notification_email_from Alexandre.Cassen@firewall.loc #指定发件人smtp_server localhost #指定smtp服务器地址smtp_connect_timeout 30 #指定smtp连接超时时间router_id LVS_DEVEL #运行keepalived机器的一个标识
}vrrp_instance VI_1 { #监控多个网段的实例#状态只有MASTER和BACKUP两种,并且要大写,MASTER为工作状态,BACKUP是备用状态。state MASTERinterface eth0#虚拟路由标识,同一个vrrp_instance的MASTER和BACKUP的vitrual_router_id 是一致的。virtual_router_id 51#优先级,同一个vrrp_instance的MASTER优先级必须比BACKUP高。priority 100#MASTER 与BACKUP 负载均衡器之间同步检查的时间间隔,单位为秒。advert_int 1authentication {#验证authentication。包含验证类型和验证密码。类型主要有PASS、AH 两种,通常使用的类型为PASSauth_type PASS#据说AH 使用时有问题。验证密码为明文,同一vrrp 实例MASTER 与BACKUP 使用相同的密码才能正常通信auth_pass 1111}# VIP # ipvsadm -A -t 192.168.252.100:80 -s wlc#虚拟ip地址,可以有多个地址,每个地址占一行#同时这个ip 必须与我们在lvs 客户端设定的vip 相一致virtual_ipaddress {192.168.252.100/24}
}
#虚拟IP,来源与上面的虚拟IP地址,后面加空格加端口号
virtual_server 192.168.252.100 80 {delay_loop 6 #健康检查间隔,单位为秒lb_algo rr #负载均衡调度算法,一般用wrr、rr、wlc##负载均衡转发规则,一般包括:NAT(地址转换)、DR(直接路由)、TUN(隧道) # DR轮询,调度器通过"轮叫"调度算法将外部请求按顺序轮流分配到集群中的真实服务器上#它均等地对待每一台服务器,而不管服务器上实际的连接数和系统负载。lb_kind DRnat_mask 255.255.255.0#会话保持时间,会话保持,就是把用户请求转发给同一个服务器#不然刚在1上提交完帐号密码,就跳转到另一台服务器2上了persistence_timeout 50protocol TCP#ipvsadm -a -t 192.168.252.100:80 -r 192.168.252.12:80 -g -w 1#真实服务器,包括IP和端口号real_server 192.168.252.12 80 {#权重,数值越大,权重越高 weight 1SSL_GET {#检查url,可以指定多个url {path /#检查的返回状态码status_code 200}#连接超时时间connect_timeout 2#重连次数nb_get_retry 2#重连时间间隔delay_before_retry 1}}#ipvsadm -a -t 192.168.252.100:80 -r 192.168.252.12:80 -g -w 1real_server 192.168.252.13 80{weight 1SSL_GET {url {path /status_code 200}connect_timeout 2nb_get_retry 2delay_before_retry 1}}
}
我的 LVS-Master keepalived.conf 配置
LVS-Backup 配置文件中主要要修改的选项没有很多,有三个参数要注意
route_id XXX #MASTER和 BACKUP不同
** virtual_router_id 51** #同一个实例下,MASTER和BACKUP相同
** priority 90** #优先级,同一个实例下,MASTER高于BACKUP
! Configuration File for keepalivedglobal_defs {notification_email {acassen@firewall.locfailover@firewall.locsysadmin@firewall.loc}notification_email_from Alexandre.Cassen@firewall.locsmtp_server 192.168.252.100smtp_connect_timeout 30router_id LVS_DEVEL
}vrrp_instance VI_1 {state MASTERinterface eth0virtual_router_id 51priority 100advert_int 1authentication {auth_type PASSauth_pass 1111}virtual_ipaddress {192.168.252.100/24}
}virtual_server 192.168.252.100 80 {delay_loop 6lb_algo rrlb_kind DRnat_mask 255.255.255.0persistence_timeout 50protocol TCPreal_server 192.168.252.12 80 {weight 1SSL_GET {url {path /status_code 200}connect_timeout 2nb_get_retry 2delay_before_retry 1}}real_server 192.168.252.13 80{weight 1SSL_GET {url {path /status_code 200}connect_timeout 2nb_get_retry 2delay_before_retry 1}}
}
分别在Rs 01,Rs 02 部署httpd服务并测试
Real Server 01:192.168.252.12
Real Server 02:192.168.252.13
分别在Rs 01,Rs 02 查看防火墙状态,如果是开启,就关闭
[root@souyunku ~]# service iptables status
[root@souyunku ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
部署httpd服务
[root@souyunku ~]# yum install httpd
[root@souyunku ~]# service httpd start
Starting httpd: [ OK ]
测试httpd服务是否OK!
[root@souyunku ~]# echo "192.168.252.12">/var/www/html/index.html
[root@souyunku ~]# curl localhost
192.168.252.12
[root@souyunku ~]# curl 192.168.252.12
192.168.252.12
启动如果会报错
[root@souyunku ~]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for souyunku
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
修改主机名
[root@souyunku ~]# vi /etc/hosts
127.0.0.1 localhost.localdomain souyunku
#:::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
添加 DR模型调度的配置,分别在Rs 01,Rs 02 都配置
Real Server 01:192.168.252.12
Real Server 02:192.168.252.13
因为Keepalived配置的DR方式调度,需要修改,内核参数
让RealServer,以LVS的VIP来直接回复Client
用 lvsrs 脚本 一键配置,注意改VIP
root@souyunku ~] vi /etc/init.d/lvsrs
#!/bin/bash
#
# Script to start LVS DR real server.
# description: LVS DR real server
# . /etc/rc.d/init.d/functionsVIP=192.168.252.100
host=`/bin/hostname`case "$1" in
start) # Start LVS-DR real server on this machine./sbin/ifconfig lo down/sbin/ifconfig lo upecho 1 > /proc/sys/net/ipv4/conf/lo/arp_ignoreecho 2 > /proc/sys/net/ipv4/conf/lo/arp_announceecho 1 > /proc/sys/net/ipv4/conf/all/arp_ignoreecho 2 > /proc/sys/net/ipv4/conf/all/arp_announce/sbin/ifconfig lo:0 $VIP broadcast $VIP netmask 255.255.255.255 up/sbin/route add -host $VIP dev lo:0;;
stop) # Stop LVS-DR real server loopback device(s)./sbin/ifconfig lo:0 downecho 0 > /proc/sys/net/ipv4/conf/lo/arp_ignoreecho 0 > /proc/sys/net/ipv4/conf/lo/arp_announceecho 0 > /proc/sys/net/ipv4/conf/all/arp_ignoreecho 0 > /proc/sys/net/ipv4/conf/all/arp_announce;;
status) # Status of LVS-DR real server.islothere=`/sbin/ifconfig lo:0 | grep $VIP`isrothere=`netstat -rn | grep "lo:0" | grep $VIP`if [ ! "$islothere" -o ! "isrothere" ];then# Either the route or the lo:0 device# not found. echo "LVS-DR real server Stopped."elseecho "LVS-DR real server Running."fi
;;
*) # Invalid entry.echo "$0: Usage: $0 {start|status|stop}"exit 1
;; esac
启动 lvsrs 脚本,给脚本755权限
[root@souyunku ~]# chmod 755 /etc/init.d/lvsrs
[root@souyunku ~]# chmod 755 /etc/rc.d/init.d/functions
[root@souyunku ~]# service lvsrs start
分别在Rs 01,Rs 02 查看是否已有一个VIP地址
[root@souyunku ~]# ifconfig
eth0 ...
lo ...
lo:0 Link encap:Local Loopback inet addr:192.168.252.100 Mask:255.255.255.255UP LOOPBACK RUNNING MTU:16436 Metric:1
把lvsrs服务添加到开机启动
把lvsrs服务添加到开机启动,否则下次启动电脑后,还需手动启动。
[root@souyunku ~]# echo "service lvsrs start" >> /etc/rc.local
分别在LVS-Master和LVS-Backup中 使用ipvsadm添加集群服务
[root@souyunku ~]# ipvsadm -C
[root@souyunku ~]# ipvsadm -L -n #查看ipvs定义的规则列表
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags-> RemoteAddress:Port Forward Weight ActiveConn InActConn
[root@souyunku ~]#
[root@souyunku ~]# ipvsadm -A -t 192.168.252.100:80 -s wlc
[root@souyunku ~]# ipvsadm -a -t 192.168.252.100:80 -r 192.168.252.12:80 -g -w 1
[root@souyunku ~]# ipvsadm -a -t 192.168.252.100:80 -r 192.168.252.13:80 -g -w 1
[root@souyunku ~]# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.252.100:80 wlc-> 192.168.252.12:80 Route 1 0 0 -> 192.168.252.13:80 Route 1 0 0
查看Linux是否开启路由转发功能
[root@souyunku ~]# cat /proc/sys/net/ipv4/ip_forward
0
[root@souyunku ~]# echo 1 > /proc/sys/net/ipv4/ip_forward
[root@souyunku ~]# cat /proc/sys/net/ipv4/ip_forward
1
###用 Director 脚本 一键配置 注意改VIP ,RIP1,RIP2
root@souyunku ~] vi /etc/init.d/DR
#!/bin/bash
#
# LVS script for VS/DR
# . /etc/rc.d/init.d/functionsVIP=192.168.252.100 RIP1=192.168.252.12RIP2=192.168.252.13PORT=80 case "$1" in
start) /sbin/ifconfig eth0:0 $VIP broadcast $VIP netmask 255.255.255.255 up/sbin/route add -host $VIP dev eth0:0# Since this is the Director we must be able to forward packetsecho 1 > /proc/sys/net/ipv4/ip_forward# Clear all iptables rules./sbin/iptables -F# Reset iptables counters./sbin/iptables -Z# Clear all ipvsadm rules/services./sbin/ipvsadm -C# Add an IP virtual service for VIP 192.168.0.219 port 80# In this recipe, we will use the round-robin scheduling method. # In production, however, you should use a weighted, dynamic scheduling method. /sbin/ipvsadm -A -t $VIP:80 -s wlc# Now direct packets for this VIP to# the real server IP (RIP) inside the cluster/sbin/ipvsadm -a -t $VIP:80 -r $RIP1 -g -w 1/sbin/ipvsadm -a -t $VIP:80 -r $RIP2 -g -w 1/bin/touch /var/lock/subsys/ipvsadm &> /dev/null
;; stop) # Stop forwarding packetsecho 0 > /proc/sys/net/ipv4/ip_forward# Reset ipvsadm/sbin/ipvsadm -C# Bring down the VIP interface/sbin/ifconfig eth0:0 down/sbin/route del $VIP/bin/rm -f /var/lock/subsys/ipvsadmecho "ipvs is stopped...";; status) if [ ! -e /var/lock/subsys/ipvsadm ]; thenecho "ipvsadm is stopped ..."elseecho "ipvs is running ..."ipvsadm -L -nfi
;;
*) echo "Usage: $0 {start|stop|status}"
;; esac
启动 Director 脚本,给脚本755权限
[root@souyunku ~]# chmod 755 /etc/init.d/DR
[root@souyunku ~]# chmod 755 /etc/rc.d/init.d/functions
[root@souyunku ~]# service DR start
分别在LVS-Master和LVS-Backup中,启动keeplived服务,并检查是否生效
[root@souyunku ~]# service keepalived start
Starting keepalived: [ OK ]
[root@souyunku ~]# service DR start
[root@souyunku ~]#
[root@souyunku ~]## ipvsadm -L -n #查看ipvs规则是否生效
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.252.100:80 wlc-> 192.168.252.12:80 Route 1 0 0 -> 192.168.252.13:80 Route 1 0 0
[root@souyunku ~]#
测试VIP,检查是否能主备切换。
查看主VIP
启动keeplived后,先用ip addr
显示主备服务器的VIP情况,当主备服务器同时启用keepalived时,只有主服务器拥有VIP地址,备服务器没有。
查看 LVS-Master 的 VIP
查看eth0: 下是有inet 192.168.252.100/24 scope global secondary eth0
[root@souyunku LVS-Master]# service keepalived start
[root@souyunku LVS-Master]# ip addr
1: lo: ...
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000link/ether 00:0c:29:95:1a:59 brd ff:ff:ff:ff:ff:ffinet 192.168.252.10/24 brd 192.168.252.255 scope global eth0inet 192.168.252.100/24 scope global secondary eth0 #可以看到主服务器拥有VIPinet6 fe80::20c:29ff:fe95:1a59/64 scope link valid_lft forever preferred_lft forever
[root@souyunku init.d]#
LVS-Backup 看看有没有,结果证明是没有的
[root@souyunku LVS-Backup]# ip addr
1: ...
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000link/ether 00:0c:29:d6:d3:f9 brd ff:ff:ff:ff:ff:ffinet 192.168.252.11/24 brd 192.168.252.255 scope global eth0inet6 fe80::20c:29ff:fed6:d3f9/64 scope link valid_lft forever preferred_lft forever
[root@souyunku ~]#
停掉 LVS-Master 下 keepalived 服务
[root@souyunku LVS-Master ]# service keepalived stop
Stopping keepalived: [ OK ]
在 LVS-Backup 下 ip addr 看看有没有 vip
当停止主服务器的keepalived服务,再查看下主备服务器VIP地址,发现VIP> 地址已从主服务器转移到了备服务器;
[root@souyunku LVS-Backup ]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host loinet6 ::1/128 scope host valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000link/ether 00:0c:29:d6:d3:f9 brd ff:ff:ff:ff:ff:ffinet 192.168.252.11/24 brd 192.168.252.255 scope global eth0inet 192.168.252.100/24 scope global secondary eth0#可以看到备服务器拥有VIPinet6 fe80::20c:29ff:fed6:d3f9/64 scope link valid_lft forever preferred_lft forever
[root@souyunku ~]#
启动 LVS-Master和LVS-Backup中,keeplived服务,启动添加 Director 脚本的集群服务(‘DR’ 是 Director 脚本的名称)
[root@souyunku LVS-Master]# service keepalived start
[root@souyunku LVS-Master]# service DR start [root@souyunku LVS-Backup]# service keepalived start
[root@souyunku LVS-Master]# service DR start
负载均衡测试http页面
[root@souyunku ~]# curl http://192.168.252.100/index.html
192.168.252.13 #第 1 次是web 192.168.252.13
[root@souyunku ~]# curl http://192.168.252.100/index.html
192.168.252.12 #第 2 次是web 192.168.252.12
[root@souyunku ~]# curl http://192.168.252.100/index.html
192.168.252.13 #第 3 次是web 192.168.252.13
[root@souyunku ~]# curl http://192.168.252.100/index.html
192.168.252.12 #第 4 次是web 192.168.252.12
[root@souyunku ~]# curl http://192.168.252.100/index.html
192.168.252.13 #第 5 次是web 192.168.252.13
其他
负载均衡以及高可用测试
负载均衡测试
- 两台WEB服务器都工作正常,访问VIP地址时,可以被负载到两台WEB服务器上。
- 停掉一台WEB服务器的http服务后,访问VIP地址时,被负载到正常的WEB服务器上。
高可用测试
- 两台DR的keepalived服务器正常时,VIP地址在主服务器,提供正常服务
- 当关闭主服务器的keepalived后,VIP地址自动转移到备服务器上,当主服务器重启keepalived服务后,VIP自动转移回主服务器,备服务器继续备用,实现了高可用负载均衡。
其他常用操作
永久保存LVS规则并恢复
[root@souyunku ~]# service ipvsadm save
ipvsadm: Saving IPVS table to /etc/sysconfig/ipvsadm: [ OK ]
模拟清空ipvsadm规则来恢复
[root@souyunku ~]# ipvsadm -C
[root@souyunku ~]# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags-> RemoteAddress:Port Forward Weight ActiveConn InActConn
关闭LVS
在real服务器上执行
service lvsrs stop
LVS服务器上执行
service DR stop
ipvsadm -C
系统虚拟IP管理
查看虚拟IP地址 删除
ip address list
ip addr del 192.168.252.100 dev eth0
#或者
ifconfig lo:0 192.168.252.100 netmask 255.255.255.255 down
LVS 命令
[root@souyunku ~]# ipvsadm -help
ipvsadm v1.26 2008/5/15 (compiled with popt and IPVS v1.2.1)
Usage:ipvsadm -A|E -t|u|f service-address [-s scheduler] [-p [timeout]] [-M netmask] [--pe persistence_engine]ipvsadm -D -t|u|f service-addressipvsadm -Cipvsadm -Ripvsadm -S [-n]ipvsadm -a|e -t|u|f service-address -r server-address [options]ipvsadm -d -t|u|f service-address -r server-addressipvsadm -L|l [options]ipvsadm -Z [-t|u|f service-address]ipvsadm --set tcp tcpfin udpipvsadm --start-daemon state [--mcast-interface interface] [--syncid sid]ipvsadm --stop-daemon stateipvsadm -hCommands:
Either long or short options are allowed.--add-service -A add virtual service with options--edit-service -E edit virtual service with options--delete-service -D delete virtual service--clear -C clear the whole table--restore -R restore rules from stdin--save -S save rules to stdout--add-server -a add real server with options--edit-server -e edit real server with options--delete-server -d delete real server--list -L|-l list the table--zero -Z zero counters in a service or all services--set tcp tcpfin udp set connection timeout values--start-daemon start connection sync daemon--stop-daemon stop connection sync daemon--help -h display this help messageOptions:--tcp-service -t service-address service-address is host[:port]--udp-service -u service-address service-address is host[:port]--fwmark-service -f fwmark fwmark is an integer greater than zero--ipv6 -6 fwmark entry uses IPv6--scheduler -s scheduler one of rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq,the default scheduler is wlc.--pe engine alternate persistence engine may be sip,not set by default.--persistent -p [timeout] persistent service--netmask -M netmask persistent granularity mask--real-server -r server-address server-address is host (and port)--gatewaying -g gatewaying (direct routing) (default)--ipip -i ipip encapsulation (tunneling)--masquerading -m masquerading (NAT)--weight -w weight capacity of real server--u-threshold -x uthreshold upper threshold of connections--l-threshold -y lthreshold lower threshold of connections--mcast-interface interface multicast interface for connection sync--syncid sid syncid for connection sync (default=255)--connection -c output of current IPVS connections--timeout output of timeout (tcp tcpfin udp)--daemon output of daemon information--stats output of statistics information--rate output of rate information--exact expand numbers (display exact values)--thresholds output of thresholds information--persistent-conn output of persistent connection info--nosort disable sorting output of service/server entries--sort does nothing, for backwards compatibility--ops -o one-packet scheduling--numeric -n numeric output of addresses and ports
[root@souyunku ~]# ipvsadm有两种命令选项格式,长的和短的,具有相同的意思。在实际使用时,两种都可以。
-A –add-service 在内核的虚拟服务器表中添加一条新的虚拟服务器记录。也就是增加一台新的虚拟服务器。
-E –edit-service 编辑内核虚拟服务器表中的一条虚拟服务器记录。
-D –delete-service 删除内核虚拟服务器表中的一条虚拟服务器记录。
-C –clear 清除内核虚拟服务器表中的所有记录。
-R –restore 恢复虚拟服务器规则
-S –save 保存虚拟服务器规则,输出为-R 选项可读的格式
-a –add-server 在内核虚拟服务器表的一条记录里添加一条新的真实服务器记录。也就是在一个虚拟服务器中增加一台新的真实服务器
-e –edit-server 编辑一条虚拟服务器记录中的某条真实服务器记录
-d –delete-server 删除一条虚拟服务器记录中的某条真实服务器记录
-L|-l –list 显示内核虚拟服务器表
-Z –zero 虚拟服务表计数器清零(清空当前的连接数量等)
–set tcp tcpfin udp 设置连接超时值
–start-daemon 启动同步守护进程。他后面可以是master 或backup,用来说明LVS Router 是master 或是backup。在这个功能上也可以采用keepalived 的VRRP 功能。
–stop-daemon 停止同步守护进程
-h –help 显示帮助信息
其他的选项:
-t –tcp-service service-address 说明虚拟服务器提供的是tcp 的服务
[vip:port] or [real-server-ip:port]
-u –udp-service service-address 说明虚拟服务器提供的是udp 的服务
[vip:port] or [real-server-ip:port]
-f –fwmark-service fwmark 说明是经过iptables 标记过的服务类型。
-s –scheduler scheduler 使用的调度算法,有这样几个选项rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq,默认的调度算法是: wlc.
-p –persistent [timeout] 持久稳固的服务。这个选项的意思是来自同一个客户的多次请求,将被同一台真实的服务器处理。timeout 的默认值为300 秒。
-M –netmask netmask persistent granularity mask
-r –real-server server-address 真实的服务器[Real-Server:port]
-g –gatewaying 指定LVS 的工作模式为直接路由模式(也是LVS 默认的模式)
-i –ipip 指定LVS 的工作模式为隧道模式
-m –masquerading 指定LVS 的工作模式为NAT 模式
-w –weight weight 真实服务器的权值
–mcast-interface interface 指定组播的同步接口
-c –connection 显示LVS 目前的连接 如:ipvsadm -L -c
–timeout 显示tcp tcpfin udp 的timeout 值 如:ipvsadm -L –timeout
–daemon 显示同步守护进程状态
–stats 显示统计信息
–rate 显示速率信息
–sort 对虚拟服务器和真实服务器排序输出
–numeric -n 输出IP 地址和端口的数字形式
** 参考网址**
http://www.cnblogs.com/MacoLee/p/5856858.html
http://blog.csdn.net/sz_bdqn/article/details/46705251
LVS+Keepalived+httpd安装及配置相关推荐
- 构建高可用LVS + keepalived+httpd和双主模型的keepalived方案
↑构建高可用LVS + keepalived+httpd和双主模型的keepalived方案↑ 标签:web服务器 拓扑图 模型 检测 软件 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始 ...
- LVS+Keepalived之DR模式配置
LVS+Keepalived之DR模式配置 理论基础 LVS直接配置DR模式,会存在一个问题,LVS负载均衡器是单点,容易发生单点故障,这样就会造成所有的服务都无法访问,这是不能容忍的. 解决单点故障 ...
- Apche Httpd安装与配置
Apche Httpd安装与配置 查看系统是否安装了httpd rpm -qa | grep httpd 或者 yum list |grep httpd 安装需要的tar包有: httpd-2.2. ...
- linux keepalived 脚本,Linux下 keepalived 的安装和配置
安装前准备 基础系统:CentOS 7 yum -y install gcc gcc-c++ autoconf automake make yum -y install zlib zlib-devel ...
- linux 安装keepalived,Keepalived的安装与配置
1. Keepalived的安装 1.1. yum install方式 yum install -y keepalived 1.2. 安装包编译方式 wget http://www.keepalive ...
- keepalived+nginx安装与配置
2019独角兽企业重金招聘Python工程师标准>>> 第一步: 下载keepalived地址:http://www.keepalived.org/download.html 解压: ...
- Linux 下Apache(httpd) 安装、配置
注意:这里使用的是CentOS版,RedHat系都可以用.因为用到了yum 一.手动安装 也可以直接看下面2的yum在线安装 1. 准备 有些linux版本中已经预置了有Apache,并且已经是服务了 ...
- lvs keepalived
摘要 简述lvs keepalived作用 安装 记录错误 keepalived配置文件详解 LVS全称为Linux Virtual Server,工作在ISO模型中的第四层,由于其工作在第四层,因此 ...
- linuxweb集群mysql_企业web高可用集群实战之lvs+keepalived+mysql
前端用两台server做lvs+keepalived负载调度器,中间用apache+php作为web应用服务器,后端用两台做mysql高可用,用nfs.mfs或作为web文件共享服务器 系统环境: L ...
最新文章
- Jquery UI dialog 详解 (中文)
- mysql中sum (if)_mysql 中sum (if())
- java 请求http get_java http get/post请求
- Android简单实现Socket通信,客户端连接服务器后,服务器向客户端发送文字数据
- JDK 命令之 jar -- 压缩/解压缩工具
- android studio zlib,在Android Studio 3.1中构建项目时出现“压缩执行失败”错误
- Windows Driver开发_NT Driver框架:The driver is not in a state to accept this command
- jdbc——mysql学习
- vc编程的ime输入法菜单开发
- android nmea 工具,android – 如何从nmea句子信息计算以米为单位的gps准确度
- LUEVELSMEYER的PE文件格式
- table表格锁定任意数量列或行
- 云计算和雾计算的区别?
- 做食品能入驻Lazada吗?带你解锁东南亚当地热销及需求食品系列
- 计算机国内ei期刊目录,最新国内EI期刊列表 - 论文投稿 - 小木虫 - 学术 科研 互动社区...
- Spring @Value读取配置文件
- NvInfer.h: No such file or directory
- Button 按钮:防连点,节流防抖
- 针对三星小型SSD移动硬盘T1的性能分析
- Netty学习八:编解码之Netty自带的解码器