[root@server6 mnt]# rpm -vihnewt-devel-0.52.11-3.el6.x86_64.rpm #安装编译内核时所需要的包
slang-devel-2.2.1-1.el6.x86_64.rpmasciidoc-8.4.5-4.1.el6.noarch.rpm
warning: newt-devel-0.52.11-3.el6.x86_64.rpm: Header V3 RSA/SHA1Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:slang-devel ########################################### [ 33%]
2:newt-devel ###########################################[ 67%]
3:asciidoc ########################################### [100%]
[root@server6 mnt]#cd -
[root@server6 SPECS]# rpmbuild -bp kernel.spec
如果出现这种情况
则需:
[root@server6 ~]# yum provides */rngd #上面的图片提示,输入rngd -r /dev/urandom,查找命令所在的安装包
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat SubscriptionManagement. You can use subscription-manager to register.
rng-tools-2-13.el6_2.x86_64 : Random number generator relatedutilities
Repo : rhel6.5
Matched from:
Filename :/etc/sysconfig/rngd
Filename : /sbin/rngd
Filename :/etc/rc.d/init.d/rngd
[root@server6 ~]# yum install rng-tools-2-13.el6_2.x86_64 -y #安装
[root@server6 ~]# rngd -r /dev/urandom #输入命令
#查看,运行通过
[root@server6 SPECS]# cd /mnt/
[root@server6 mnt]# ls
asciidoc-8.4.5-4.1.el6.noarch.rpm newt-devel-0.52.11-3.el6.x86_64.rpm
kernel-2.6.32-220.23.1.el6.src.rpm slang-devel-2.2.1-1.el6.x86_64.rpm
Lvs-fullnat-synproxy.tar.gz
[root@server6 mnt]# tar zxf Lvs-fullnat-synproxy.tar.gz #解压
[root@server6 mnt]# ls
asciidoc-8.4.5-4.1.el6.noarch.rpm Lvs-fullnat-synproxy.tar.gz
kernel-2.6.32-220.23.1.el6.src.rpm newt-devel-0.52.11-3.el6.x86_64.rpm
lvs-fullnat-synproxy slang-devel-2.2.1-1.el6.x86_64.rpm
[root@server6 mnt]# cd lvs-fullnat-synproxy/ #进入解压之后的包
[root@server6 lvs-fullnat-synproxy]# ls #查看
lvs-2.6.32-220.23.1.el6.patch README
lvs-tools.tar.gz toa-2.6.32-220.23.1.el6.patch
[root@server6 lvs-fullnat-synproxy]# cd~/rpmbuild/BUILD/kernel-2.6.32-220.23.1.el6/linux-2.6.32-220.23.1.el6.x86_64/
[root@server6 linux-2.6.32-220.23.1.el6.x86_64]# cp/mnt/lvs-fullnat-synproxy/lvs-2.6.32-220.23.1.el6.patch . #将刚查看的包移动到当前
[root@server6 linux-2.6.32-220.23.1.el6.x86_64]# patch-p1<lvs-2.6.32-220.23.1.el6.patch #打lvs的补丁
[root@server6 linux-2.6.32-220.23.1.el6.x86_64]# vimMakefile #进入,添加版本号,作为区别
4 EXTRAVERSION =-220.23.1.el6
[root@server6 linux-2.6.32-220.23.1.el6.x86_64]# make
[root@server6 linux-2.6.32-220.23.1.el6.x86_64]# makemodules_install #安装内核模块
[root@server6 linux-2.6.32-220.23.1.el6.x86_64]# makeinstall #安装
#在kernel一行中,添加“nohz=off ”(如果不关闭nohz,大压力下CPU0可能会消耗过高,压力不均匀)
[root@server6 linux-2.6.32-220.23.1.el6.x86_64]# vim/boot/grub/grub.conf #进入引导文件
10 default=0