VMware版本號:12.0.0
CentOS版本:7.0
一、更換之前確保自己安裝wget
[root@localhost?~]# yum list wget
沒有安裝:
[root@localhost?~]# yum -y install wget
二、首先備份/etc/yum.repos.d/CentOS-Base.repo
[root@localhost ~]# cp?/etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
三、進入yum源
配置文件所在文件夾
[root@localhost?yum.repos.d]# cd /etc/yum.repos.d/
四、下載163的yum源
配置文件,放入/etc/yum.repos.d/
(操作前做好相應備份)
[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
五、運行yum makecache生成緩存
[root@localhost?yum.repos.d]# yum makecache
六、運行yum makecache生成緩存
[root@localhost?yum.repos.d]# yum -y update
藏經閣技術資料分享群二維碼