Centos 修改yum源为aliyun

修改服务器源,避免长途跋涉到国外:

位置:

vim  /etc/yum.repos.d/CentOS-Base.repo

 aliyun地址:

设置aliyun的yum源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

添加epl源:

装上 EPEL后,可以像在 Fedora 上一样,可以通过 yum install package-name,安装更多软件。

wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo

清理缓存,生成新的yum以及epl缓存:

4.清理缓存并生成新的缓存

yum clean all
yum makecache

yum   update  

猜你喜欢

转载自www.cnblogs.com/SunshineKimi/p/12299899.html