天下网吧 >> 网吧天地 >> 网吧技术 >> 网吧系统 >> 正文

Linux操作系统下的集群原理及实战经历

虚拟服务器的集群配置

  大部分的集群配置工作都在虚拟服务器vs1上面,需要下面的几个步骤:

  重新编译内核。

  首先,下载最新的Linux内核,版本号为2.2.19,下载地址为:http://www.kernel.org/,解压缩后置于/usr/src/linux目录下。

  其次需要下载LVS的内核补丁,地址为:http://www.linuxvirtualserver.org/software/ipvs-1.0.6-2.2.19.tar.gz。这里注意,如果你用的Linux内核不是2.2.19版本的,请下载相应版本的LVS内核补丁。将ipvs-1.0.6-2.2.19.tar.gz解压缩后置于/usr/src/linux目录下。

  然后,对内核打补丁,如下操作:

[root@vs2 /root]# cd /usr/src/linux  
[root@vs2 linux]# patch -p1 < ipvs-1.0.6-2.2.19/ipvs-1.0.6-2.2.19.  
patch

  下面就是重新配置和编译Linux的内核。特别注意以下选项:

1 Code maturity level options--->  
* [*]Prompt for development and/or incomplete code/drivers  
2 Networking部分:  
[*] Kernel/User netlink socket  
[*] Routing messages  
<*> Netlink device emulation  
* [*] Network firewalls  
[*] Socket Filtering  
<*> Unix domain sockets  
* [*] TCP/IP networking  
[*] IP: multicasting  
[*] IP: advanced router  
[ ] IP: policy routing  
[ ] IP: equal cost multipath  
[ ] IP: use TOS value as routing key  
[ ] IP: verbose route monitoring  
[ ] IP: large routing tables  
[ ] IP: kernel level autoconfiguration  
* [*] IP: firewalling  
[ ] IP: firewall packet netlink device  
* [*] IP: transparent proxy support  
* [*] IP: masquerading  
--- Protocol-specific masquerading support will be built as modules.  
* [*] IP: ICMP masquerading  
--- Protocol-specific masquerading support will be built as modules.  
* [*] IP: masquerading special modules support  
* IP: ipautofw masq support (EXPERIMENTAL)(NEW)  
* IP: ipportfw masq support (EXPERIMENTAL)(NEW)  
* IP: ip fwmark masq-forwarding support (EXPERIMENTAL)(NEW)  
* [*] IP: masquerading virtual server support (EXPERIMENTAL)(NEW)  
[*] IP Virtual Server debugging (NEW) <--最好选择此项,以便观察LVS的调试信息  
* (12) IP masquerading VS table size (the Nth power of 2) (NEW)  
* IPVS: round-robin scheduling (NEW)  
* IPVS: weighted round-robin scheduling (NEW)  
* IPVS: least-connection scheduling (NEW)  
* IPVS: weighted least-connection scheduling (NEW)  
* IPVS: locality-based least-connection scheduling (NEW)  
* IPVS: locality-based least-connection with replication scheduling  
(NEW)  
* [*] IP: optimize as router not host  
* IP: tunneling  
IP: GRE tunnels over IP  
[*] IP: broadcast GRE over IP  
[*] IP: multicast routing  
[*] IP: PIM-SM version 1 support  
[*] IP: PIM-SM version 2 support  
* [*] IP: aliasing support  
[ ] IP: ARP daemon support (EXPERIMENTAL)  
* [*] IP: TCP syncookie support (not enabled per default)  
--- (it is safe to leave these untouched)  
< > IP: Reverse ARP  
[*] IP: Allow large windows (not recommended if <16Mb of memory)  
< > The IPv6 protocol (EXPERIMENTAL)

 

本文来源:天极博客 作者:天极博客

声明
声明:本站所发表的文章、评论及图片仅代表作者本人观点,与本站立场无关。若文章侵犯了您的相关权益,请及时与我们联系,我们会及时处理,感谢您对本站的支持!联系email:support@txwb.com,系统开号,技术支持,服务联系QQ:1175525021本站所有有注明来源为天下网吧或天下网吧论坛的原创作品,各位转载时请注明来源链接!
天下网吧·网吧天下
  • 本周热门
  • 本月热门
  • 阅读排行