零基础性能测试实战直播班招生中,多种优惠进行中,优惠无套路,开课你决定       |       python自动化测试班-轻课模式,随到随学

咨询QQ:2083503238、1684129674、480934277(请勿重复咨询) 咨询微信:qiangfans

centos6修改yum源的方法

2019-04-07 20:42:00
测试帮日记
原创 1667 投稿得红包

点击链接加入QQ群229390571(免费公开课、视频应有尽有):https://jq.qq.com/?_wv=1027&k=5rbudQa


个别同学在yum安装软件的时候提示找不到源地址无法执行成功。一般是由于自己网络本身限制导致,解决方法为修改yum源为国内的。


#备份当前的yum源
mv /etc/yum.repos.d /etc/yum.repos.d.backup4comex
#新建空的yum源设置目录
mkdir /etc/yum.repos.d
#下载阿里云的yum源配置
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
#重建缓存

yum clean all
yum makecache


可能遇到的问题:执行报错“-bash: wget: command not found”

#回滚配置

cp /etc/yum.repos.d.backup4comex/* /etc/yum.repos.d

#安装wget


yum install wget -y


rm -rf /etc/yum.repos.d
mkdir /etc/yum.repos.d
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

技术交流QQ群 229390571 测试帮日记接口测试群

电影下载QQ群 533341883 XQ电影下载圈