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