当前位置: > CentOS > CentOS入门 >

Centos/RedHat 7/6/5切换阿里云源并安装EPEL/IUS/REMI仓库

时间:2016-05-26 14:10来源:linux.it.net.cn 作者:IT

国内服务器使用阿里云的yum源能达到一个比较理想的速度,但是又感觉不太够,于是将EPEL、REMI一同加上。

切换基本源为阿里云源

1、备份

 
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

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

CentOS 6

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

CentOS 7

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

3、运行yum makecache生成缓存

安装第三方源

1.安装EPEL仓库

 
1
# yum install epel-release

如果以上命令不起作用:

 
1
2
3
4
5
6
7
8
CentOS/RHEL 7
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
 
CentOS/RHEL 6
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
 
CentOS/RHEL 5
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

2.安装IUS仓库

 
1
2
3
4
5
6
7
8
9
# RHEL
rpm -Uvh https://rhel5.iuscommunity.org/ius-release.rpm
rpm -Uvh https://rhel6.iuscommunity.org/ius-release.rpm
rpm -Uvh https://rhel7.iuscommunity.org/ius-release.rpm
 
# CentOS
rpm -Uvh https://centos5.iuscommunity.org/ius-release.rpm
rpm -Uvh https://centos6.iuscommunity.org/ius-release.rpm
rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm

3.安装REMI仓库

 
1
2
3
4
5
6
7
8
CentOS/RHEL 7
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
 
CentOS/RHEL 6
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
 
CentOS/RHEL 5
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

3.查看yum软件仓库列表

 
1
# yum repolist

4.生成缓存

 
1
# yum makecache

链接:

1.How to Install EPEL and REMI Repository on CentOS/RedHat 7/6/5

2.Getting Started – IUS




(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容