CentOS 3编译官方内核

yum install rpm-build gcc gcc-c++ ncurses-devel

https://archive.kernel.org/centos-vault/3.9/updates/SRPMS/kernel-2.4.21-63.EL.src.rpm

unzip to:kernel-2.4.21-63.EL

mv kernel-2.4.21-63.EL/* /usr/src/redhat/SOURCES/
cd /usr/src/redhat/SOURCES/
rpmbuild -bb --target=`uname -m` kernel-2.4.spec 2> build-err.log | tee build-out.log

rpm -qa | grep kernel | grep -v $(uname -r)
#rpm -ev kernel-2.4.21-50.EL

cd /usr/src/redhat/RPMS/x86_64/
rpm -ivh --oldpackage kernel-*.rpm

reboot