CentOS 安装 linux kernel 源码

时间:2023-12-22 17:54:38

原文链接:https://blog.csdn.net/qaz1qaz1qaz2/article/details/52825389

1.下载系统包
yum install rpm-build
yum install redhat-rpm-config

2.下载并安装kernel包
lynx http://vault.centos.org/6.0/os/SRPMS/Packages/kernel-2.6.32-71.el6.src.rpm

rpm -ivh kernel-2.6.32-71.el6.src.rpm

3.执行rpmbuild命令
cd /root/rpmbuild/SPECS
rpmbuild -bp --target=`uname -m` kernel.spec

4.源码的位置
cd /root/rpmbuild/BUILD/kernel-2.6.32-71.el6/linux-2.6.32-71.el6.x86_64