How to add additional repositories to CentOS/RHEL (EPEL, …)

  • Extra Packages for Enterprise Linux EPEL: rebuilds of Fedora packages for EL
## EPEL is included on CentOS extras, so for CentOS just
$ yum install -y epel-release

## for RHEL
$ cat /etc/yum.repos.d/epel-bootstrap.repo
[epel]
name=Bootstrap EPEL
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-\$releasever&arch=\$basearch
failovermethod=priority
enabled=0
gpgcheck=0
$ yum --enablerepo=epel -y install epel-release
$ rm -f /etc/yum.repos.d/epel-bootstrap.repo

# import GPG key
$ export $V=`rpm -q --queryformat '%{VERSION}' $(rpm -qa '(redhat|sl|centos|raclelinux)-release(|-server|-workstation|-client|-computenode)')`
$ sudo sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$V

$ yum repolist
  • The Community Enterprise Linux Repository ELRepo: kmod driver packages to enhance hardware support. Newer kernels are also available
$ rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

$ rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
or
$ rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
or
$ rpm -Uvh http://www.elrepo.org/elrepo-release-5-5.el5.elrepo.noarch.rpm
$ rpm -qa|grep redhat-|xargs rpm -e

$ rpm --import http://isoredirect.centos.org/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
$ rpm -Uvh http://mirror.centos.org/centos/7/os/x86_64/Packages/{centos-release-7-0.1406.el7.centos.2.3.x86_64.rpm,centos-logos-70.0.6-1.el7.centos.noarch.rpm}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s