Centos更换阿里云源
生活随笔
收集整理的這篇文章主要介紹了
Centos更换阿里云源
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、備份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup2、下載新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repoCentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo3、之后生成緩存并更新系統
yum clear all yum makecacheyum list updates yum -y update(更新內核) 或 yum -y upgrade(不更新內核)
4、其他
非阿里云ECS用戶會出現 Couldn't resolve host 'mirrors.cloud.aliyuncs.com' 信息,不影響使用。用戶也可自行修改相關配置: eg:
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo轉載于:https://www.cnblogs.com/rhjeans/p/11311184.html
總結
以上是生活随笔為你收集整理的Centos更换阿里云源的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Java Lambda表达式forEac
- 下一篇: SAP EWM Table Overvi