Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Download kernel source for CentOS 6

Download kernel source for CentOS 6.0

see also: http://kanjuku-tomato.blogspot.jp/2013/03/centos-63.html

# Add yum repository
sudo vi /etc/yum.repo.d/CentOS-Source.repo

mkdir /tmp/kernelsrc
cd /tmp/kernelsrc
yumdownloader --source kernel --releasever=6.0 --disablerepo=* --enablerepo=base-source

rpm2cpio kernel-2.6.32-71.el6.src.rpm | cpio -id
tar -xjvf linux-2.6.32-71.el6.tar.bz2

sudo mv linux-2.6.32-71.el6 /usr/src/kernels/
sudo chown -R root:root /usr/src/kernels/linux-2.6.32-71.el6/
[base-source]
name=CentOS-$releasever - Base Source
baseurl=http://vault.centos.org/$releasever/os/Source/
gpgcheck=1
enabled=0
gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-6

[updates-source]
name=CentOS-$releasever - Updates Source
baseurl=http://vault.centos.org/$releasever/updates/Source/
gpgcheck=1
enabled=0
gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-6

[extras-source]
name=CentOS-$releasever - Extras Source
baseurl=http://vault.centos.org/$releasever/extras/Source/
gpgcheck=1
enabled=0
gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.