http://qiita.com/4486/items/62cfc7ab46e6c5add425
环境 :
$ cat /etc/centos-release
CentOS release 6.5 (Final)
安装 yum-utils:
$ sudo yum install yum-utils
追加 srpm 的 repository:
/etc/yum.repos.d/CentOS-Base-Src-6.5.repo
[base-src]
name=CentOS-6.5 - Base - Source
baseurl=http://vault.centos.org/6.5/os/Source/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates-src]
name=CentOS-6.5 - Updates - Source
baseurl=http://vault.centos.org/6.5/updates/Source/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras-src]
name=CentOS-6.5 - Extras - Source
baseurl=http://vault.centos.org/6.5/extras/Source/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
确认 repository:
$ yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: www.ftp.ne.jp
* extras: www.ftp.ne.jp
* updates: www.ftp.ne.jp
repo id repo name status
base CentOS-6 - Base 4,802
base-src CentOS-6.5 - Base - Source 2,132
extras CentOS-6 - Extras 12
extras-src CentOS-6.5 - Extras - Source 9
updates CentOS-6 - Updates 745
updates-src CentOS-6.5 - Updates - Source 200
repolist: 7,900
下载 srpm:
$ yumdownloader --source neon
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: www.ftp.ne.jp
* extras: www.ftp.ne.jp
* updates: www.ftp.ne.jp
neon-0.29.3-3.el6_4.src.rpm | 875 kB 00:02