CentOS更改yum源与更新系统

  • 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

藏经阁技术资料分享群二维码

藏经阁技术资料分享群二维码

posted on 2018-06-13 08:21  Hi,王松柏  阅读(10134)  评论(0编辑  收藏  举报

导航