chillax1314

EPEL源简介

  EPEL(Extra Packages for Enterprise Linux) 是由 FedORA 社区打造,为 RHEL 及衍生发行版如 CentOS等提供高质量软件包的项目。装上了 EPEL,就像在 Fedora 上一样,可以通过 yum install 软件包名,即可安装很多以前需要编译安装的软件、常用的软件或一些比较流行的软件,比如现在流行的nginx、redis、htop、ncdu、vnstat等等,都可以使用EPEL很方便的安装更新。

安装EPEL源

目前可以直接通过执行命令: yum install epel-release 直接进行安装,如果此命令无法安装可以尝试以下方法

CentOS/RHEL 5 : rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
CentOS/RHEL 6 : rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
CentOS/RHEL 7 : rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Ok,安装完毕。

使用EPEL源安装软件

现在就可以执行:yum install 软件包名进行安装了,nginx、htop、ncdu、vnstat等等一些常用的软件都灰常简单的装上了。

安装阿里云的EPEL源

1、 首先卸载以前装的epel以免影响

rpm -e epel-release

2、 下载阿里提供的epel

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

3、yum clean all

4、yum makecache

阿里云源安装示例:

1、备份(如有配置其他epel源)

mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup

mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup

2、下载新repo 到/etc/yum.repos.d/

epel(RHEL 7)

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

epel(RHEL 6)

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

epel(RHEL 5)

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

 

相关文章: