官网资料:
http://www.linuxvirtualserver.org/software/ipvs.html#kernel-2.6
ipvsadm-1.26-1.src.rpm (for kernel 2.6.28-rc3 or later) – February 8, 2011
ipvsadm-1.26.tar.gz (for kernel 2.6.28-rc3 or later) – February 8, 2011
ipvsadm-1.25-1.src.rpm (for kernel 2.6.28-rc3 or later) – November 5, 2008
ipvsadm-1.25.tar.gz (for kernel 2.6.28-rc3 or later) – November 5, 2008
ipvsadm-1.24-6.src.rpm (for kernel between 2.6.10 and 2.6.27.4) – December 10, 2005
ipvsadm-1.24-5.src.rpm (for 1.2.0 or later) – October 27, 2004
ipvsadm-1.24-4.src.rpm (for 1.1.8 or later) – January 10, 2004
ipvsadm-1.24-3.src.rpm (for 1.1.8 or later) – December 20, 2003
ipvsadm-1.24.tar.gz – December 10, 2005
ipvsadm-1.24版本适用于内核版本号为1.1.8或更新版本。
ipvsadm-1.25适用于2.6.28-rc3或更新版本。
ipvsadm-1.26适用于2.6.28-rc3或更新版本。
一定要注意内核版本号,否则make时会失败。
系统环境:
[root@Rootop ipvsadm-1.26]# uname -a
Linux Rootop 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
下载:wget -c http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.26.tar.gz
[root@Rootop ipvsadm-1.26]# make
make -C libipvs
make[1]: Entering directory `/root/ipvsadm-1.26/libipvs’
gcc -Wall -Wunused -Wstrict-prototypes -g -fPIC -DLIBIPVS_USE_NL -DHAVE_NET_IP_VS_H -c -o libipvs.o libipvs.c
In file included from libipvs.h:13,
from libipvs.c:23:
ip_vs.h:15:29: error: netlink/netlink.h: No such file or directory
ip_vs.h:16:31: error: netlink/genl/genl.h: No such file or directory
ip_vs.h:17:31: error: netlink/genl/ctrl.h: No such file or directory
In file included from libipvs.h:13,
from libipvs.c:23:
libipvs.c:1072: error: too many arguments to function ‘ipvs_nl_send_message’
make[1]: *** [libipvs.o] Error 1
make[1]: Leaving directory `/root/ipvsadm-1.26/libipvs’
提示如上错误:
解决方法:
[root@Rootop ipvsadm-1.26]# yum install -y popt libnl libnl-devel popt-static
重新make make install完成。
这里大体看了一下,在redhat(或者是centos)企业版5中需要下载ipvsadm-1.24版本,企业版6用ipvsadm-1.26。
原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/2093.html