LVS操作手冊.docxVIP

  • 52
  • 0
  • 约8.65千字
  • 约 12页
  • 2016-12-06 发布于重庆
  • 举报
LVS操作手冊

LVS操作手册BY 王平安_阿骨打 吴佳明_普空1 集群模式-配置(单台)安装系统和工具# 参见lvs-fullnat-synproxy.tar中的README, 包括 LVS kernel和keepalived等的编译方法;内核启动参数在kernel一行中,添加“nohz=off ”注:如果不关闭nohz,大压力下CPU0可能会消耗过高,压力不均匀;Sysctl配置路径:/etc/sysctl.conf# configure for lvsnet.ipv4.conf.all.arp_ignore = 1net.ipv4.conf.all.arp_announce = 2dev_max_backlog = 500000配置网卡参数路径:/etc/rc.local关闭网卡LRO和GRO# ethtool -K eth0 gro off# ethtool -K eth0 lro off绑定网卡中断# set_irq_affinity eth0 #脚本参见附录,该脚本是ixgbe/igb driver网卡关闭系统参数路径:/etc/rc.local关闭irqbalance# service irqbalance stop# chkconfig --level 2345 irqbalance offLocalAddress配置路径:/etc/rc.localLocal address绑定到内网(下联)网卡上ip addr add /32 dev eth1ip addr add /32 dev eth1ip addr add /32 dev eth1ip addr add /32 dev eth1ip addr add /32 dev eth1Zebra.conf路径:/etc/quagga/zebra.conf启动方式:/usr/sbin/zebra -d -f /etc/quagga/zebra.confhostname lvs-route-4password 8 123456enable password 8 123456log file /var/log/zebra.logservice password-encryptionOspf.conf路径:/etc/quagga/ospf.conf启动方式:/usr/sbin/ospfd -d -f /etc/quagga/ospf.confhostname lvs-4-ospfdpassword 8 123456enable password 8 123456log file /var/log/ospf.loglog stdoutlog syslogservice password-encryptioninterface eth0 //上连网卡号ip ospf message-digest-key 8 md5 123456?ip?ospf?hello-interval?3?ip?ospf?dead-interval?12router ospfospf router-id 4 //route id配置为 上连网卡接口iplog-adjacency-changesauto-cost reference-bandwidth 1000network /24 area 1 // VIP网段network 2/30 area 1 // 上连IP网段area 1 authentication message-digestarea 1 stub no-summaryKeepalived.conf启动:service keepalived start更新:service keepalived reload停止:service keepalived stopKeepalived的配置包含2个文件,以taobao业务为例:说明:一个集群内的所有LVS配置文件基本相同,区别的地方见红色区域主配置文件keepalived.conf路径:/etc/keepalived/keepalived.conf! Configuration File for keepalivedglobal_defs {# notification_email {#abc@# }# notification_email_from abc@# smtp_server # smtp_connect_timeout 40}local_address_group laddr_g1 { }! include virtual server configure fileinclude taobao.conf业务配置文件 “业务名.conf”路径:/etc/keepalived/taobao.confvirtual_serv

文档评论(0)

1亿VIP精品文档

相关文档