1. 程式人生 > >CentOS更改yum源與更新系統

CentOS更改yum源與更新系統

轉載自:http://www.cnblogs.com/lightnear/archive/2012/10/03/2710952.html

[1] 首先備份/etc/yum.repos.d/CentOS-Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

[2] 進入yum源配置檔案所在資料夾

[[email protected] yum.repos.d]# cd /etc/yum.repos.d/

[3] 下載163的yum源配置檔案,放入/etc/yum.repos.d/(操作前請做好相應備份)

[
[email protected]
yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

[4] 執行yum makecache生成快取

[[email protected] yum.repos.d]# yum makecache

[5] 更新系統

[[email protected] yum.repos.d]# yum -y update

[6] 安裝vim編輯器

[[email protected] ~]# yum -y install vim*