标签:编译内核
首先开启一台全新的虚拟机
我用的是rhel6.5
给一定的内存,稍微大点
[root@server1 ~]# rpm -ivh kernel-2.6.32-220.23.1.el6.src.rpm 安装
[root@server1 ~]# tar zxf Lvs-fullnat-synproxy.tar.gz 解压
[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 再执行
会卡住,此时我们需要打开另一个终端
[root@server1 ~]# yum provides */rngd
[root@server1 ~]# yum install -y rng-tools-2-13.el6_2.x86_64 安装
[root@server1 ~]# rngd -r /dev/urandom 执行
再去卡住的终端查看,已经执行完了
[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 打补丁
[root@server1 linux-2.6.32-220.23.1.el6.x86_64]# vim Makefile
[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
标签:编译内核
原文地址:http://blog.51cto.com/13362895/2083809