Linux lvs-fullnat-kernel compilation, linuxlvs-fullnat-
First, put the package to be installed in the/mnt directory, and then perform the following settings:
1. tar-zxf Lvs-fullnat-synproxy.tar.gz
2. cd lvs-fullnat-synproxy/
3. tar-zxf lvs-tools.tar.gz
4, rpm-ivh kernel-2.6.32-220.23.1.el6.src.rpm
5. cd rpmbuild/cdSPECS/
6. yum install rpm-build-y
7. yum install gcc redhat-rpm-config kernel. spec patchutils xmlto asciidoc elfutils-libelf-devel zlib-devel binutils-devel newt-devel python-devel perl-ExtUtils-Embed hmaccalc-y # Install dependency packages
8. yum install newt-devel-0.52.11-3.el6.x86_64.rpm slang-devel-2.2.1-1.el6.x86_64.rpm asciidoc-8.4.5-4.1.el6.noarch.rpm-y
9. cd rpmbuild/cdSPECS/
10. rpmbuild-bp kernel. spec # unlock source code
11, yum install-y rng-tools-2-13.el6_2.x86_64 # in the Process of decoding the source code will be stuck, this is the lack of a package, so you need to install this package, and execute the following command
12. rngd-r/dev/urandom
Next, go to the official compilation process.
13. cd BUILD
14. cd kernel-2.6.32-220.23.1.el6/
15. cd linux-2.6.32-220.23.1.el6.x86_64/
16, cp/mnt/lvs-fullnat-synproxy/lvs-2.6.32-220.23.1.el6.patch. # Patching
17. patch-p1 <lvs-2.6.32-220.23.1.el6.patch
18. vim Makefile
EXTRAVERSION =-220.23.1.el6.x86 _ 64 # Add a kernel version to distinguish the original Kernel
19. make # compilation and installation. This process is long and requires patience.
20. make modules_install # import the installation Module
21. make install # Write the boot Partition
22. vim/boot/grub. conf # modify the startup Item,
Default = 0 # first startup Item
Timeout = 5
23. reboot # The re-compiled kernel is displayed after restart.
Next, recompile Keepalive Czech
24. cd/mnt/lvs-fullnat-synproxy/tools/keepalived/
25../configure-with-kernel-dir = "/lib/modules/uname-r/build"
26. yum install openssl-devel-y
27. yum install popt-devel-y
28. ln-s/usr/local/etc/sysconfig/keepalived/etc/sysconfig/
29. ln-s/usr/local/etc/keepalived/etc/
30. ln-s/usr/local/etc/rc. d/init. d/keepalived/etc/init. d/
31. ln-s/usr/local/sbin/keepalived/sbin/
32. chmod + x/usr/local/etc/rc. d/init. d/keepalived
33. cd/mnt/lvs-fullnat-synproxy/tools/ipvsadm
34. make
35. make install
After completing the preceding steps, the kernel is compiled. when running the ipvsadm name command, the fullnat mode is displayed.