首先开启一台全新的虚拟机

我用的是rhel6.5

给一定的内存,稍微大点

Screenshot from 2018-02-10 14-33-08.png

Screenshot from 2018-02-10 14-37-47.png

[root@server1 ~]# rpm -ivh kernel-2.6.32-220.23.1.el6.src.rpm   安装

[root@server1 ~]# tar zxf Lvs-fullnat-synproxy.tar.gz   解压

Screenshot from 2018-02-10 14-41-34.png

Screenshot from 2018-02-10 14-46-23.png

[root@server1 SPECS]# yum install -y rpm-build   安装

如下执行,会报错

安装所需依赖性

[root@server1 SPECS]# yum install -y redhat-rpm-config patchutils xmlto elfutils-libelf-devel zlib-devel binutils-devel python-devel hmaccalc perl-ExtUtils-Embedonfig patchutils xmlto elfutils-libelf-devel zlib-devel binutil

[root@server1 ~]# yum install -y newt-devel-0.52.11-3.el6.x86_64.rpm asciidoc-8.4.5-4.1.el6.noarch.rpm slang-devel-2.2.1-1.el6.x86_64.rpm

[root@server1 SPECS]# rpmbuild -bp kernel.spec 再执行

Screenshot from 2018-02-10 14-56-23.png

会卡住,此时我们需要打开另一个终端

[root@server1 ~]# yum provides */rngd

Screenshot from 2018-02-10 14-59-23.png

[root@server1 ~]# yum install -y rng-tools-2-13.el6_2.x86_64  安装

[root@server1 ~]# rngd -r /dev/urandom  执行

再去卡住的终端查看,已经执行完了

Screenshot from 2018-02-10 15-00-26.png

Screenshot from 2018-02-10 15-03-55.png

[root@server1 linux-2.6.32-220.23.1.el6.x86_64]# cp /root/lvs-fullnat-synproxy/lvs-2.6.32-220.23.1.el6.patch .  拷贝到当前目录

[root@server1 linux-2.6.32-220.23.1.el6.x86_64]# patch -p1 < lvs-2.6.32-220.23.1.el6.patch   打补丁

Screenshot from 2018-02-10 15-06-45.png

Screenshot from 2018-02-10 15-11-14.png

[root@server1 linux-2.6.32-220.23.1.el6.x86_64]# vim Makefile

Screenshot from 2018-02-10 15-10-59.png

[root@server1 linux-2.6.32-220.23.1.el6.x86_64]# make

[root@server1 linux-2.6.32-220.23.1.el6.x86_64]# make install