○ yumでダウンロード

*yum-utilsに含まれるyumdownloaderを使います
*CentOS 5.x の場合です

◯yum-utilsのインストール

$ su -
passwd:
# yum -y install yum-fastestmirror
# yum -y install yum-utils

◯ソースファイル用のrepoを設定します

:/etc/yum.repos.d/CentOS-Source.repo

*例 ftp.riken.jp/Linux/centos
*fastestmirrorのrepo情報ではsrcをサポートしていないようです
*CentOSサイトのMirrorListから日本のサイトを探して設定してください

[update-srpm]
name=CentOS-$releasever - Update Source Packages
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/updates/SRPMS/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

[os-srpm]
name=CentOS-$releasever - OS Source Packages
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/os/SRPMS/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

[extras-srpm]
name=CentOS-$releasever - Extra Source Packages
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/extras/SRPMS/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

[centosplus-srpm]
name=CentOS-$releasever - CentOS Plus Source Packages
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/centosplus/SRPMS/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

◯ダウンロードしてみる

yumdownloaderは一般ユーザでも可
*--sorceオプションでsrcパッケージを捜します

$ yumdownloader yum
$ yumdownloader --source yum

○ Copyright(c) 528p.com All Rights Reserved.