最後更新:2006/12/30
iSmile Hosting 提供一本地端 CentOS Mirror 網站,網址 http://updater.ismile.net/centos/ 。每日更新四次,支援 http 連線,
只提供 iSmile Hosting 網路內的 IP 使用。以下說明是利用 CentOS 4.4 為作業系統的 VPS 當範例。
- 透過 SSH,使用 root 登入
- 下載 yum 及需要的套件:
wget http://updater.ismile.net/centos/4.4/os/i386/CentOS/RPMS/yum-2.4.3-1.c4.noarch.rpm
wget http://updater.ismile.net/centos/4.4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-4.2.1.i386.rpm
wget http://updater.ismile.net/centos/4.4/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.i386.rpm
wget http://updater.ismile.net/centos/4.4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
wget http://updater.ismile.net/centos/4.4/os/i386/CentOS/RPMS/sqlite-3.3.3-1.2.i386.rpm
- 安裝 yum 及需要的套件:
rpm -ivh python-elementtree-1.2.6-4.2.1.i386.rpm python-urlgrabber-2.9.8-2.noarch.rpm \
sqlite-3.3.3-1.2.i386.rpm python-sqlite-1.1.7-1.2.i386.rpm yum-2.4.3-1.c4.noarch.rpm
- 修改使用的 Mirror 網站:
刪除原來的 /etc/yum.repos.d/CentOS-Base.repo 檔案,
rm -f /etc/yum.repos.d/CentOS-Base.repo
或是移至其它目錄存放。
mv /etc/yum.repos.d/CentOS-Base.repo /root/
建立一個新的 CentOS-Base.repo 檔案,
vi /etc/yum.repos.d/CentOS-Base.repo
使用以下設定,
[base]
name=CentOS-$releasever - Base
baseurl=http://updater.ismile.net/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://updater.ismile.net/centos/RPM-GPG-KEY-centos4
#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://updater.ismile.net/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://updater.ismile.net/centos/RPM-GPG-KEY-centos4
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://updater.ismile.net/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://updater.ismile.net/centos/RPM-GPG-KEY-centos4
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://updater.ismile.net/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://updater.ismile.net/centos/RPM-GPG-KEY-centos4
- 以上步驟完成後,可用 yum check-update 來查詢是否有需要更新的套件,及使用 yum update 來更新。
|