|
08 21 |
關於CentOS5 YUM套件管理系統作者: Joey 日期: 2008-08-21 11:43 |
網路上有一堆介紹如何使用它的文章,所以我這邊就不重覆了,而我這篇主要的目的是為了記錄在設定CentOS-Base.repo時碰到的問題,第一個碰到的問題是如何找到國內有提供yum update的站台,第二個問題是如果公司有設防火牆擋部份http通訊,該如何處理
在眾多介紹yum的文章中,我挑選了ftp2.tnc.edu.tw,這是國內少數有提供yum update service並且也還存活的站臺,當然,除了http之外,它也提供ftp傳輸的功能,所以我的CentOS-Base.repo檔的內容就可寫成如下
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=ftp://ftp2.tnc.edu.tw/pub1/centos/5/os/$basearch/
gpgcheck=1
gpgkey=ftp://ftp2.tnc.edu.tw/pub1/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=ftp://ftp2.tnc.edu.tw/pub1/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=ftp://ftp2.tnc.edu.tw/pub1/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=ftp://ftp2.tnc.edu.tw/pub1/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=ftp://ftp2.tnc.edu.tw/pub1/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=ftp://ftp2.tnc.edu.tw/pub1/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=ftp://ftp2.tnc.edu.tw/pub1/centos/RPM-GPG-KEY-CentOS-5
這個檔案設定好後,CentOS5的新增/移除軟體的功能就可以正常的運作,包含所有跟yum指令牽連到的更新,都可以用了
訂閱
上一篇
返回
下一篇
標籤:


Regular expression-跟brainfuck差不多的東西 (2009-11-13 15:37)
Reading file in kernel-簡單但實用 (2009-10-13 15:18)
Linux file system for dummies-只花你45分鐘 (2009-08-19 15:40)
OPENSSL-TCP SSL初心者之路 (2009-07-16 15:16)
NAPI與pure interrupt driver的效能比較 (2009-04-29 19:06)
usermode helper-來自kernel的呼喚 (2009-04-21 16:19)
kernel module memory detector-抓出有害的kernel module (2009-03-31 13:50)
kernel space coding-如履薄冰 (2009-03-26 09:52)
readahead與posix_advise-預讀取是萬能靈丹? (2009-03-06 15:54)