yum設定更新套件


,

習慣使用教育局的自動設定檔,但總在需要的時候無法更新,採取另外一個更新設定檔,還蠻順的,建議使用看看。

cd /etc/yum.repos.d/
cp CentOS-Base.repo CentOS-Base.repo.bak
vi CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://ftp.cse.yzu.edu.tw/pub/CentOS/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://ftp.cse.yzu.edu.tw/pub/CentOS/RPM-GPG-KEY-CentOS-5

 

#released updates
[update]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://ftp.cse.yzu.edu.tw/pub/CentOS/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://ftp.cse.yzu.edu.tw/pub/CentOS/RPM-GPG-KEY-CentOS-5

 

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://ftp.cse.yzu.edu.tw/pub/CentOS/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://ftp.cse.yzu.edu.tw/pub/CentOS/RPM-GPG-KEY-CentOS-5

 

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://ftp.cse.yzu.edu.tw/pub/CentOS/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://ftp.cse.yzu.edu.tw/pub/CentOS/RPM-GPG-KEY-CentOS-5

【參考資料】

http://apt.nc.hcc.edu.tw/web/student_server_centos/student_server_centos.html#update