Top

LVS

源码安装Ipvsadm软件

我的环境是Centos7.4!我这里的内核是3.10.

1. 安装相关依赖

[root@server ~]# yum install kernel-devel libnl* libpopt* popt-static -y
[root@server ~]# cd /data/

2. 下载源码包并解压

[root@server data]# wget http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.26.tar.gz
[root@server data]# tar -zxf ipvsadm-1.26.tar.gz
[root@server data]# mv ipvsadm-1.26 /usr/local/
[root@server data]# cd /usr/local/ipvsadm-1.26/

3. 编辑Makefile并安装

[root@server ipvsadm-1.26]# make && make install
[root@server ipvsadm-1.26]# ipvsadm --version
ipvsadm v1.26 2008/5/15 (compiled with popt and IPVS v1.2.1)