最近研究一下LVS+Keepalived,之前环境都是CentOS5的,这次在CentOS6.2中测试安装缺发现一点小问题,特意记录一下:
- ipvsadm-1.26.tar.gz (for kernel 2.6.28-rc3 or later) - February 8, 2011
[root@host2 ~]# uname -r
2.6.32-220.el6.x86_64
[root@host2 ~]# cat /etc/redhat-release
CentOS release 6.2 (Final)
[root@host2 ipvsadm-1.26]# make
make -C libipvs
make[1]: Entering directory `/usr/src/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:
ip_vs.h:520: error: array type has incomplete element type
ip_vs.h:521: error: array type has incomplete element type
ip_vs.h:522: error: array type has incomplete element type
ip_vs.h:523: error: array type has incomplete element type
ip_vs.h:524: error: array type has incomplete element type
ip_vs.h:525: error: array type has incomplete element type
libipvs.c: In function ‘ipvs_nl_message’:
libipvs.c:57: warning: implicit declaration of function ‘nlmsg_alloc’
libipvs.c:57: warning: assignment makes pointer from integer without a cast
libipvs.c:61: warning: implicit declaration of function ‘genlmsg_put’
libipvs.c:61: error: ‘NL_AUTO_PID’ undeclared (first use in this function)
libipvs.c:61: error: (Each undeclared identifier is reported only once
libipvs.c:61: error: for each function it appears in.)
libipvs.c:61: error: ‘NL_AUTO_SEQ’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_nl_noop_cb’:
libipvs.c:69: error: ‘NL_OK’ undeclared (first use in this function)
libipvs.c: At top level:
libipvs.c:72: error: expected declaration specifiers or ‘...’ before ‘nl_recvmsg_msg_cb_t’
libipvs.c: In function ‘ipvs_nl_send_message’:
libipvs.c:76: warning: implicit declaration of function ‘nl_handle_alloc’
libipvs.c:76: warning: assignment makes pointer from integer without a cast
libipvs.c:78: warning: implicit declaration of function ‘nlmsg_free’
libipvs.c:82: warning: implicit declaration of function ‘genl_connect’
libipvs.c:85: warning: implicit declaration of function ‘genl_ctrl_resolve’
libipvs.c:91: warning: implicit declaration of function ‘nl_handle_destroy’
libipvs.c:96: warning: implicit declaration of function ‘nl_socket_modify_cb’
libipvs.c:96: error: ‘NL_CB_VALID’ undeclared (first use in this function)
libipvs.c:96: error: ‘NL_CB_CUSTOM’ undeclared (first use in this function)
libipvs.c:96: error: ‘func’ undeclared (first use in this function)
libipvs.c:99: warning: implicit declaration of function ‘nl_send_auto_complete’
libipvs.c:102: warning: implicit declaration of function ‘nl_recvmsgs_default’
libipvs.c: In function ‘ipvs_init’:
libipvs.c:127: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_getinfo_parse_cb’:
libipvs.c:149: warning: implicit declaration of function ‘nlmsg_hdr’
libipvs.c:149: warning: initialization makes pointer from integer without a cast
libipvs.c:152: warning: implicit declaration of function ‘genlmsg_parse’
libipvs.c:159: warning: implicit declaration of function ‘nla_get_u32’
libipvs.c:162: error: ‘NL_OK’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_getinfo’:
libipvs.c:176: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_flush’:
libipvs.c:199: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_nl_fill_service_attr’:
libipvs.c:215: warning: implicit declaration of function ‘nla_nest_start’
libipvs.c:215: warning: assignment makes pointer from integer without a cast
libipvs.c:219: warning: implicit declaration of function ‘NLA_PUT_U16’
libipvs.c:222: warning: implicit declaration of function ‘NLA_PUT_U32’
libipvs.c:225: warning: implicit declaration of function ‘NLA_PUT’
libipvs.c:229: warning: implicit declaration of function ‘NLA_PUT_STRING’
libipvs.c:236: warning: implicit declaration of function ‘nla_nest_end’
libipvs.c:239: warning: label ‘nla_put_failure’ defined but not used
libipvs.c: In function ‘ipvs_add_service’:
libipvs.c:255: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_update_service’:
libipvs.c:276: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_del_service’:
libipvs.c:296: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_zero_service’:
libipvs.c:321: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_nl_fill_dest_attr’:
libipvs.c:334: warning: assignment makes pointer from integer without a cast
libipvs.c:348: warning: label ‘nla_put_failure’ defined but not used
libipvs.c: In function ‘ipvs_add_dest’:
libipvs.c:366: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_update_dest’:
libipvs.c:396: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_del_dest’:
libipvs.c:425: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_set_timeout’:
libipvs.c:452: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c:454: warning: label ‘nla_put_failure’ defined but not used
libipvs.c: In function ‘ipvs_start_daemon’:
libipvs.c:473: warning: assignment makes pointer from integer without a cast
libipvs.c:483: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_stop_daemon’:
libipvs.c:504: warning: assignment makes pointer from integer without a cast
libipvs.c:514: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: At top level:
libipvs.c:526: warning: ‘struct nlattr’ declared inside parameter list
libipvs.c: In function ‘ipvs_parse_stats’:
libipvs.c:530: warning: implicit declaration of function ‘nla_parse_nested’
libipvs.c:548: warning: implicit declaration of function ‘nla_get_u64’
libipvs.c: In function ‘ipvs_services_parse_cb’:
libipvs.c:562: warning: initialization makes pointer from integer without a cast
libipvs.c:592: warning: implicit declaration of function ‘nla_get_u16’
libipvs.c:598: warning: implicit declaration of function ‘nla_data’
libipvs.c:599: warning: passing argument 2 of ‘memcpy’ makes pointer from integer without a cast
/usr/include/string.h:44: note: expected ‘const void * __restrict__’ but argument is of type ‘int’
libipvs.c:604: warning: implicit declaration of function ‘nla_get_string’
libipvs.c:605: warning: passing argument 2 of ‘strncpy’ makes pointer from integer without a cast
/usr/include/string.h:131: note: expected ‘const char * __restrict__’ but argument is of type ‘int’
libipvs.c:610: warning: passing argument 2 of ‘strncpy’ makes pointer from integer without a cast
/usr/include/string.h:131: note: expected ‘const char * __restrict__’ but argument is of type ‘int’
libipvs.c:614: warning: implicit declaration of function ‘nla_memcpy’
libipvs.c:618: warning: passing argument 2 of ‘ipvs_parse_stats’ from incompatible pointer type
libipvs.c:526: note: expected ‘struct nlattr *’ but argument is of type ‘struct nlattr *’
libipvs.c: In function ‘ipvs_get_services’:
libipvs.c:649: error: ‘NLM_F_DUMP’ undeclared (first use in this function)
libipvs.c:650: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_dests_parse_cb’:
libipvs.c:728: warning: initialization makes pointer from integer without a cast
libipvs.c:759: warning: passing argument 2 of ‘memcpy’ makes pointer from integer without a cast
/usr/include/string.h:44: note: expected ‘const void * __restrict__’ but argument is of type ‘int’
libipvs.c:771: warning: passing argument 2 of ‘ipvs_parse_stats’ from incompatible pointer type
libipvs.c:526: note: expected ‘struct nlattr *’ but argument is of type ‘struct nlattr *’
libipvs.c: In function ‘ipvs_get_dests’:
libipvs.c:809: error: ‘NLM_F_DUMP’ undeclared (first use in this function)
libipvs.c:813: warning: assignment makes pointer from integer without a cast
libipvs.c:829: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_get_service’:
libipvs.c:939: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_timeout_parse_cb’:
libipvs.c:972: warning: initialization makes pointer from integer without a cast
libipvs.c:986: error: ‘NL_OK’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_get_timeout’:
libipvs.c:1005: error: too many arguments to function ‘ipvs_nl_send_message’
libipvs.c: In function ‘ipvs_daemon_parse_cb’:
libipvs.c:1023: warning: initialization makes pointer from integer without a cast
libipvs.c:1048: warning: passing argument 2 of ‘strncpy’ makes pointer from integer without a cast
/usr/include/string.h:131: note: expected ‘const char * __restrict__’ but argument is of type ‘int’
libipvs.c:1051: error: ‘NL_OK’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_get_daemon’:
libipvs.c:1071: error: ‘NLM_F_DUMP’ undeclared (first use in this function)
libipvs.c:1072: error: too many arguments to function ‘ipvs_nl_send_message’
make[1]: *** [libipvs.o] Error 1
make[1]: Leaving directory `/usr/src/ipvsadm-1.26/libipvs'
make: *** [libs] Error 2
安装完以下这些软件
[root@host2 ipvsadm-1.26]# rpm -qa | grep popt
popt-1.13-7.el6.x86_64
popt-devel-1.13-7.el6.x86_64
[root@host2 ipvsadm-1.26]# rpm -qa | grep libnl
libnl-1.1-14.el6.x86_64
libnl-devel-1.1-14.el6.x86_64
[root@host2 ipvsadm-1.26]# make
make -C libipvs
make[1]: Entering directory `/usr/src/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
gcc -Wall -Wunused -Wstrict-prototypes -g -fPIC -DLIBIPVS_USE_NL -DHAVE_NET_IP_VS_H -c -o ip_vs_nl_policy.o ip_vs_nl_policy.c
ar rv libipvs.a libipvs.o ip_vs_nl_policy.o
ar: creating libipvs.a
a - libipvs.o
a - ip_vs_nl_policy.o
gcc -shared -Wl,-soname,libipvs.so -o libipvs.so libipvs.o ip_vs_nl_policy.o
make[1]: Leaving directory `/usr/src/ipvsadm-1.26/libipvs'
gcc -Wall -Wunused -Wstrict-prototypes -g -DVERSION=\"1.26\"
-DSCHEDULERS=\""rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq"\"
-DPE_LIST=\""sip"\" -DHAVE_NET_IP_VS_H -c -o ipvsadm.o ipvsadm.c
ipvsadm.c: In function ‘print_largenum’:
ipvsadm.c:1383: warning: field width should have type ‘int’, but argument 2 has type ‘size_t’
gcc -Wall -Wunused -Wstrict-prototypes -g -DVERSION=\"1.26\"
-DSCHEDULERS=\""rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq"\"
-DPE_LIST=\""sip"\" -DHAVE_NET_IP_VS_H -c -o config_stream.o
config_stream.c
gcc -Wall -Wunused -Wstrict-prototypes -g -DVERSION=\"1.26\"
-DSCHEDULERS=\""rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq"\"
-DPE_LIST=\""sip"\" -DHAVE_NET_IP_VS_H -c -o dynamic_array.o
dynamic_array.c
gcc -Wall -Wunused -Wstrict-prototypes -g -o ipvsadm ipvsadm.o config_stream.o dynamic_array.o libipvs/libipvs.a -lnl
ipvsadm.o: In function `parse_options':
/usr/src/ipvsadm-1.26/ipvsadm.c:432: undefined reference to `poptGetContext'
/usr/src/ipvsadm-1.26/ipvsadm.c:435: undefined reference to `poptGetNextOpt'
/usr/src/ipvsadm-1.26/ipvsadm.c:660: undefined reference to `poptBadOption'
/usr/src/ipvsadm-1.26/ipvsadm.c:502: undefined reference to `poptGetNextOpt'
/usr/src/ipvsadm-1.26/ipvsadm.c:667: undefined reference to `poptStrerror'
/usr/src/ipvsadm-1.26/ipvsadm.c:667: undefined reference to `poptBadOption'
/usr/src/ipvsadm-1.26/ipvsadm.c:670: undefined reference to `poptFreeContext'
/usr/src/ipvsadm-1.26/ipvsadm.c:677: undefined reference to `poptGetArg'
/usr/src/ipvsadm-1.26/ipvsadm.c:678: undefined reference to `poptGetArg'
/usr/src/ipvsadm-1.26/ipvsadm.c:679: undefined reference to `poptGetArg'
/usr/src/ipvsadm-1.26/ipvsadm.c:690: undefined reference to `poptGetArg'
/usr/src/ipvsadm-1.26/ipvsadm.c:693: undefined reference to `poptFreeContext'
collect2: ld returned 1 exit status
make: *** [ipvsadm] Error 1
报错比之前少多了
查阅资料需要安装popt-static
http://mirror.centos.org/centos/6/os/x86_64/Packages/popt-static-1.13-7.el6.x86_64.rpm
[root@host2 ~]# rpm -ivh popt-static-1.13-7.el6.x86_64.rpm
[root@host2 ipvsadm-1.26]# make
make -C libipvs
make[1]: Entering directory `/usr/src/ipvsadm-1.26/libipvs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/ipvsadm-1.26/libipvs'
gcc -Wall -Wunused -Wstrict-prototypes -g -o ipvsadm ipvsadm.o config_stream.o dynamic_array.o libipvs/libipvs.a -lpopt -lnl
顺利通过~!
发表评论
-
在linux网站运维方向老男孩最近几年常用的免费的开源软件
2013-02-18 23:35 1604http://blog.chinaunix.net/uid- ... -
rsync服务部署
2013-02-18 22:40 872http://oplinux.com/app/rsync/r ... -
centos6.0 配置SVN
2013-02-04 14:52 1002http://blog.csdn.net/tonysz12 ... -
Centos搭建SVN服务器三步曲
2013-02-04 12:09 920搭建SVN服务,有效的管理代码,以下三步可以快速搞定。1、安 ... -
linux(centos)如何使用svn进行多个版本库的配置
2013-02-04 12:08 3561如果当前有svnserve进程在运行,指令 ... -
MySQL CMake参数说明手册
2012-12-24 10:52 776http://www.sunchis.com/html/db/ ... -
Nginx下搭建flv视频服务器且支持视频拖动进度条播放
2012-12-19 18:10 1168目前,由于Flash 的流行,网络上绝大多数的微视频网站 ... -
如何查询centos查看系统内核版本,系统版本,32位还是64位
2012-12-15 11:13 1231http://hi.baidu.com/tjbaso/item ... -
linux下磁盘I/O查看
2012-12-07 13:11 809http://zlbzhu.blog.51cto.co ... -
Centos5.5最小化安装后的优化
2012-11-20 23:16 1187购买了服务器(现在主流 ... -
CentOS 6.2编译安装Nginx1.2.0+MySQL5.5.25+PHP5.3.13+博客系统WordPress3.3.2
2012-11-11 23:37 1033说明: 操作系统:CentOS 6.2 32 ... -
CentOS minimal 版安装图形界面的步骤分享,中文语言包.
2012-11-11 22:33 7381、连接网络: CentOS minimal.iso安装好 ... -
CentOS 6.3编译安装Nginx1.2.2+MySQL5.5.25a+PHP5.4.5
2012-11-04 19:56 903说明: 操作系统:CentOS 6.3 32位 系 ... -
[HTML5]配置Ngnix服务器支持manifest 离线存储
2012-10-08 14:09 1430[HTML5]配 ... -
RSync实现文件备份同步
2012-09-21 12:20 773http://www.cnblogs.com/itech/ar ... -
CentOS 5 + rsync 同步2台服务器的文件
2012-09-21 12:11 871当需要把服务器上的文件复制到另外的机器上,可用rsync来同步 ... -
Linux下利用rsync实现多服务器文件同步
2012-09-21 12:07 937注意事项: 1、主服务器上有配置文件,从服务器上没有配置文件 ... -
Rsync命令参数详解
2012-10-08 14:06 727在对rsync服务器配置结束以后,下一步就需要在客户端发出rs ... -
rsync
2012-09-20 18:40 1108rsync两种模式:远程shell ... -
Linux下SVN服务器搭建(CentOS+Subversion)
2012-09-20 09:52 747本文主要介绍SVN独立服 ...
相关推荐
在CentOS 6.2操作系统环境下安装Sybase是一项重要的任务,尤其对于那些依赖于Sybase数据库系统的用户。本文将详细阐述在CentOS 6.2上安装Sybase的步骤,确保您能够顺利进行。 首先,我们需要创建一个专门用于运行...
安装镜像:CentOS-6.2-i386-bin-DVD1.iso CentOS-6.2镜像共两张DVD1和DVD2,安装操作系统只用DVD1即可 镜像下载地址: 32位DVD1http://mirrors.163.com/centos/6.2/isos/i386/CentOS-6.2-i386-bin-DVD1.iso 32位DVD2...
离线安装包,亲测可用
安装过程中,你需要按照"centos6.2下安装sybase--详细操作步骤.doc"中的指导进行。这通常包括解压安装文件,运行配置脚本,配置数据库实例,指定实例的端口、日志路径和数据文件位置。在配置过程中,确保遵循Sybase...
* 可以从 http://centos.ustc.edu.cn/centos/6.2/isos/i386/CentOS-6.2-i386-bin-DVD1to2.torrent 下载 32 位 CentOS 6.2 镜像文件。 * 可以从 ...
centos7离线安装gcc-c++
1. 准备工作:确保你拥有 CentOS-6.2-x86_64-bin-DVD1.iso 的 ISO 文件,并验证其 MD5 值,以确保下载的镜像文件无误。MD5 值应为 26FDF8C5A787A674F3219A3554B131CA。 2. 安装过程: - 第一步:启动安装介质,...
本安装手册是针对CentOS 6.2操作系统进行OpenStack Essex release(2012.1)的详细安装步骤。 实验环境: 在搭建OpenStack环境时,通常需要两台服务器,如DELL R710和DELL R410。每台服务器应具备足够的硬件资源,...
您将获得两个ISO文件:`CentOS-6.2-i386-bin-DVD1` 和 `CentOS-6.2-i386-bin-DVD2`。其中,`DVD1`包含了基础安装所需的所有内容,而`DVD2`则包含额外的软件包,可以用于扩展功能。 **三、CentOS 6.2 安装步骤** 1....
离线环境下,在centos7.6系统上安装docker-ce-19.03,nvidia-docker2.4版本,其中docker-ce-19.03在docker-local.tar压缩文件里面,nvidia-docker2在nvidia-docker2.zip文件中。 具体安装流程如下: 1.安装docker ...
在CentOS 6.2系统下配置Django与Python环境是一项关键任务,尤其对于那些希望在稳定的企业级Linux操作系统上部署动态网站或Web应用的开发者而言。以下将详细阐述整个配置流程,涵盖从安装必要的软件包到最终启动...
2. **CentOS-6.2-i386-bin-DVD1.iso**:这是主要的安装镜像,大小约为3.8GB,包含了基本的系统组件和必要的安装程序,可用于将CentOS完整地安装到硬盘上。 3. **CentOS-6.2-i386-bin-DVD2.iso**:额外的镜像文件,...
CentOS 7.9版本(CentOS-7-i386-Everything-2009)适用于i386,必须集齐9个文件才能一起解压缩使用,9个文件下载地址: CentOS-7-i386-Everything-2009.part09.rar ... CentOS-7-i386-Everything-2009.part08.rar ...
官方离线安装包,亲测可用
在Linux系统中,尤其是服务器级别的操作系统,如CentOS 6.2,安装多个MySQL数据库实例是一种常见的需求,可能出于测试、隔离不同的应用环境或者服务高可用性的考虑。本教程由宋正河整理,将详细讲解如何在CentOS 6.2...
- **32位系统**的镜像文件可从**http://centos.ustc.edu.cn/centos/6.2/isos/i386/CentOS-6.2-i386-bin-DVD1to2.torrent**下载。 - **64位系统**的镜像文件则位于**...
在CentOS 6.2 64位操作系统中安装Oracle 11g涉及多个关键步骤,包括系统和配置要求、软件环境准备、用户环境设置以及后续的安装过程。以下是详细的知识点说明: 1. **系统及配置要求**: - 操作系统版本:CentOS ...
CentOS 7.9版本(CentOS-7-i386-NetInstall-2009)适用于i386 CentOS是免费的、开源的、可以重新分发的开源操作系统,CentOS(Community Enterprise Operating System,中文意思是社区企业操作系统)是Linux发行版...
CentOS 7.9版本(CentOS-7-i386-NetInstall-2009)适用于i386 CentOS是免费的、开源的、可以重新分发的开源操作系统,CentOS(Community Enterprise Operating System,中文意思是社区企业操作系统)是Linux发行版...