不完整的内核源码:
安装:
* kernel-devel (both 32- & 64-bit architectures)
* kernel-xen-devel (both 32- & 64-bit architectures)
* kernel-PAE-devel (32-bit architecture only)
执行:
ln -s /usr/src/kernels/2.6.18-238.19.1.el5xen-x86_64 /lib/modules/$(uname -r)/build
安装:
* kernel-devel (both 32- & 64-bit architectures)
* kernel-xen-devel (both 32- & 64-bit architectures)
* kernel-PAE-devel (32-bit architecture only)
执行:
ln -s /usr/src/kernels/2.6.18-238.19.1.el5xen-x86_64 /lib/modules/$(uname -r)/build
完整的内核源码:
yum install rpm-build redhat-rpm-config unifdef
wget http://vault.centos.org/5.7/updates/SRPMS/kernel-2.6.18-274.7.1.el5.src.rpm
rpm -Uvh kernel-2.6.18-274.7.1.el5.src.rpm
cd /usr/src/redhat/SPECS
rpmbuild -bp --target=`uname -m` kernel.spec
rpmbuild -bp --target=`uname -m` kernel.spec
最终源码在/usr/src/redhat/build目录中:/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18-274.7.1.el5.x86_64/