CentOS 6.4内核源代码下载安装
时间:2017-02-03 00:20 来源:linux.it.net.cn 作者:IT
下载地址:
http://vault.centos.org/6.4/os/Source/SPackages/kernel-2.6.32-358.el6.src.rpm
安装
useradd mockbuild
su mockbuild
rpm -i kernel-2.6.32-358.el6.src.rpm
【这时会产生目录/home/mockbuild/rpmbuild/SOURCES和/home/mockbuild/rpmbuild/SPECS】
重建
cd /home/mockbuild/rpmbuild/SPECS
rpmbuild -bp --target=$(uname -m) kernel.spec
【源代码产生在目录/home/mockbuild/rpmbuild/BUILD/kernel-2.6.32-358.el6下,此目录有两个子目录:linux-2.6.32-358.el6.x86_64和vanilla-2.6.32-358.el6,后者是纯粹的源码,无法编译;后者是加了.config文件和key信息的可直接编译的源码】
原文中的rpm包下载链接实际指向的是centos6.1的内核rpm文件
下载地址:
http://vault.centos.org/6.4/os/Source/SPackages/kernel-2.6.32-358.el6.src.rpm
安装
useradd mockbuild
su mockbuild
rpm -i kernel-2.6.32-358.el6.src.rpm
【这时会产生目录/home/mockbuild/rpmbuild/SOURCES和/home/mockbuild/rpmbuild/SPECS】
重建
cd /home/mockbuild/rpmbuild/SPECS
rpmbuild -bp --target=$(uname -m) kernel.spec
【源代码产生在目录/home/mockbuild/rpmbuild/BUILD/kernel-2.6.32-358.el6下,此目录有两个子目录:Linux-2.6.32-358.el6.x86_64和vanilla-2.6.32-358.el6,后者是纯粹的源码,无法编译;后者是加了.config文件和key信息的可直接编译的源码】
生产源码过程中需要几个依赖包,可以来这里下载:
http://vault.centos.org/6.4/os/x86_64/Packages/
(责任编辑:IT)
下载地址: http://vault.centos.org/6.4/os/Source/SPackages/kernel-2.6.32-358.el6.src.rpm 安装 useradd mockbuild su mockbuild rpm -i kernel-2.6.32-358.el6.src.rpm 【这时会产生目录/home/mockbuild/rpmbuild/SOURCES和/home/mockbuild/rpmbuild/SPECS】 重建 cd /home/mockbuild/rpmbuild/SPECS rpmbuild -bp --target=$(uname -m) kernel.spec 【源代码产生在目录/home/mockbuild/rpmbuild/BUILD/kernel-2.6.32-358.el6下,此目录有两个子目录:linux-2.6.32-358.el6.x86_64和vanilla-2.6.32-358.el6,后者是纯粹的源码,无法编译;后者是加了.config文件和key信息的可直接编译的源码】 原文中的rpm包下载链接实际指向的是centos6.1的内核rpm文件 下载地址: http://vault.centos.org/6.4/os/Source/SPackages/kernel-2.6.32-358.el6.src.rpm 安装 useradd mockbuild su mockbuild rpm -i kernel-2.6.32-358.el6.src.rpm 【这时会产生目录/home/mockbuild/rpmbuild/SOURCES和/home/mockbuild/rpmbuild/SPECS】 重建 cd /home/mockbuild/rpmbuild/SPECS rpmbuild -bp --target=$(uname -m) kernel.spec 【源代码产生在目录/home/mockbuild/rpmbuild/BUILD/kernel-2.6.32-358.el6下,此目录有两个子目录:Linux-2.6.32-358.el6.x86_64和vanilla-2.6.32-358.el6,后者是纯粹的源码,无法编译;后者是加了.config文件和key信息的可直接编译的源码】 生产源码过程中需要几个依赖包,可以来这里下载: http://vault.centos.org/6.4/os/x86_64/Packages/ (责任编辑:IT) |