RHEL 6下安装LVS笔记

http://www.linuxvirtualserver.org/software/ipvs.html 下载ipvsadm-1.26-1.src.rpm

安装rpmbuild

#yum install rpm-build

执行命令

#rpmbuild –rebuild ipvsadm-1.26-1.src.rpm

如果报以下错误

make error : can't find file 'netlink/netlink.h'

需要安装 libnl 和 popt 开发包

#yum install libnl* popt*

 

如果报以下错误

/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:432: undefined reference to `poptGetContext'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:435: undefined reference to `poptGetNextOpt'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:660: undefined reference to `poptBadOption'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:502: undefined reference to `poptGetNextOpt'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:667: undefined reference to `poptStrerror'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:667: undefined reference to `poptBadOption'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:670: undefined reference to `poptFreeContext'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:677: undefined reference to `poptGetArg'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:678: undefined reference to `poptGetArg'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:679: undefined reference to `poptGetArg'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:690: undefined reference to `poptGetArg'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:693: undefined reference to `poptFreeContext'

需要安装 popt-static

下载地址 http://www.phcomp.co.uk/PackagesBackports/popt-static.html

 

安装完成执行命令

#ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn

出现上面的提示表示安装成功,然后根据自己的需求进行配置即可

 

 

此条目发表在未分类分类目录,贴了标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注