【建议收藏】centos更新yum源为阿里云
生活随笔
收集整理的這篇文章主要介紹了
【建议收藏】centos更新yum源为阿里云
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
[1] 首先備份CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup[2] 進入yum源配置文件目錄
cd /etc/yum.repos.d/[3] 下載阿里云的yum源配置文件
- 放入/etc/yum.repos.d/(操作前請做好相應備份)
163:
wget http://mirrors.163.com/.help/CentOS6-Base-163.repocentos5:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repocentos6:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repocentos7:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo[4]清理
yum clean all[5]更新緩存
yum makecache yum install tree -y yum update -y yum -y update總結
以上是生活随笔為你收集整理的【建议收藏】centos更新yum源为阿里云的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【建议收藏】二叉树的序列化与反序列化
- 下一篇: elasticsearch5安装和ela