CentOS 更改yum源

阿里yum源

阿里云yum官网说明 

1、备份

mv /etc/yum.repos.d/CentOS-Base.repo  /etc/yum.repos.d/CentOS-Base.repo.backup

2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5

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

CentOS 6

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

CentOS 7

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

3、之后运行yum makecache生成缓存

163yum源

centos 5

wget-O/etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo

centos 6

wget-O/etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo

EPEL源

什么是EPEL源?

EPEL 是 Extra Packages for Enterprise Linux 的缩写(EPEL),是用于 Fedora-based Red Hat Enterprise Linux (RHEL) 的一个高质量软件源,所以同时也适用于 CentOS 或者 Scientific Linux 等发行版。经常默认就在企业级的Linux系统上,完全由官方提供包和更新检测,这样就可以保证安装包的安全性和完整性,不过也有第三方非官网提供的安装包。比如:强大的配置工具Puppet就不是默认安装在repo的,那么怎么杜绝这种第三方的安装包呢?解决的办法就是启用EPEL.

yum install epel-release

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容