# yum install wget
# yum install epel-release
It will create two epel's repo file inside /etc/yum.repos.d:
# ls /etc/yum.repos.d/ | grep -i epel
epel.repo
epel-testing.repo
To check installed and enabled repositories:
# yum repolist
To list disabled repositories:
# yum repolist disabled
By-default the EPEL main repo is enabled:
# cat /etc/yum.repos.d/epel.repo
To list all available packages in EPEL repo:
yum --disablerepo="*" --enablerepo="epel" list available
To disable other repo and enable only epel repo to install package:
# yum --disablerepo="*" --enablerepo="epel" package-name
Note: replace package-name with actual name of package.
Note: the repo name is given in square brackets of this file "cat /etc/yum.repos.d/epel.repo"
http://sharadchhetri.com/2014/01/03/install-epel-repo-centosscientific-linuxred-hat/
https://fedoraproject.org/wiki/EPEL
http://wiki.centos.org/AdditionalResources/Repositories
http://www.rackspace.com/knowledge_center/article/install-epel-and-additional-repositories-on-centos-and-red-hat
Method 2:
This article describes how to configure a CentOS or Red Hat Enterprise Linux system to use the Fedora Extra Packages for Enterprise Linux (EPEL) repository. The EPEL repository provides useful software packages that are not included in the official CentOS or Red Hat Enterprise Linux repositories.
Instructions are also included for installing other third-party repositories, the IUS Community Project and the Remi RPM Repository. Whereas EPEL provides only software that is not in the CentOS and Red Hat Enterprise Linux official repositories, IUS and Remi provide newer versions of software (like MySQL and PHP) that is already in the official repositories.
Note: Exercise caution when using any third-party repository. If you have a managed support agreement, contact your provider before following the instructions in this article to ensure that you don’t create an unsupported server configuration.
Install the EPEL repository
You install the EPEL repository by downloading the appropriate RPM package for your system and installing it. The following instructions use the 64-bit packages that work with Rackspace Cloud Servers instances.
CentOS and Red Hat Enterprise Linux 5.x
wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm sudo rpm -Uvh epel-release-5*.rpm
CentOS and Red Hat Enterprise Linux 6.x
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm sudo rpm -Uvh epel-release-6*.rpm
CentOS and Red Hat Enterprise Linux 7.x
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm sudo rpm -Uvh epel-release-7*.rpm
If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Fedora EPEL wiki page. The wiki page also includes additional instructions for Red Hat Network subscribers who are installing the EPEL repository.
Install the IUS repository (optional)
The IUS repository provides newer versions of some software in the official CentOS and Red Hat repositories. The IUS repository depends on the EPEL repository.
The package names in the IUS repository are different from the package names used in the official repositories. The difference helps to avoid unintentional conflicts or software version updates.
Note: Because IUS uses package names that are different from the package names in the official repositories, we recommend IUS over Remi for Rackspace customers with managed support levels that include server software. Managed servers automatically update nightly by default, which can cause unplanned upgrades if package names are the same in more than one enabled repository.
Installing the IUS repository is a matter of downloading the appropriate RPM package for your system and installing it. The instructions below use the 64-bit packages that work with our Cloud Server instances.
CentOS 5.x
wget http://dl.iuscommunity.org/pub/ius/stable/CentOS/5/x86_64/ius-release-1.0-13.ius.centos5.noarch.rpm sudo rpm -Uvh ius-release*.rpm
CentOS 6.x
wget http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/ius-release-1.0-13.ius.centos6.noarch.rpm sudo rpm -Uvh ius-release*.rpm
CentOS 7.x
wget http://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/ius-release-1.0-13.ius.centos7.noarch.rpm sudo rpm -Uvh ius-release*.rpm
Red Hat 5.x
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-13.ius.el5.noarch.rpm sudo rpm -Uvh ius-release*.rpm
Red Hat 6.x
wget http://dl.iuscommunity.org/pub/ius/stable/RedHat/6/x86_64/ius-release-1.0-13.ius.el6.noarch.rpm sudo rpm -Uvh ius-release*.rpm
Red Hat 7.x
wget http://dl.iuscommunity.org/pub/ius/stable/RedHat/7/x86_64/ius-release-1.0-13.ius.el7.noarch.rpm sudo rpm -Uvh ius-release*.rpm
If you get a File Not Found error message when trying to download the RPM, the version number might have changed. You can access the latest version of the repository package from the IUS Release Packages Page.
Upgrade installed packages to IUS versions
If you already have a software package installed that you want to upgrade to a newer version in the IUS repository, install the IUS yum plug-in for package replacement to simplify the upgrade process.
sudo yum install yum-plugin-replace
The plug-in provides a yum replace command that replaces a specified package and installs any required dependencies at the same time. For example, to replace the installed PHP package with the PHP 5.3 package from the IUS repository, run the following command:
sudo yum replace php --replace-with php53
For more information, see the IUS Client Usage Guide.
Install the Remi repository (optional)
The Remi repository provides newer versions of the software in the core CentOS and Red Hat Enterprise Linux repositories. The Remi repository depends on the EPEL repository.
Package names in the Remi repository are the same as the package names used in the official repositories. This similarity can result in inadvertent package upgrades when you run an update with yum, so use the Remi repository with care.
Note: Because Remi uses package names that are the same as the package names in the official repositories, we do not recommend Remi for Rackspace customers with a managed level of support. Managed servers automatically update nightly by default, which can cause unplanned upgrades if the Remi repository is enabled. If you require the Remi repository or another repository with package name conflicts, contact Rackspace Support before applying any upgrades to ensure continued support for your server.
You install the Remi repository by downloading the appropriate RPM package for your system and installing it. The following instructions use the 64-bit packages that work with Cloud Servers instances.
CentOS and Red Hat Enterprise Linux 5.x
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm sudo rpm -Uvh remi-release-5*.rpm
CentOS and Red Hat Enterprise Linux 6.x
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm sudo rpm -Uvh remi-release-6*.rpm
CentOS and Red Hat Enterprise Linux 7.x
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm sudo rpm -Uvh remi-release-7*.rpm
If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Remi Repository Configuration page. The configuration page also includes additional instructions for Red Hat Network subscribers who are installing the Remi repository.
Enable the Remi repository
The Remi repository is disabled by default.
To use the Remi repository only when you know you need it, use the --enablerepo=remi option when installing a package. For example:
sudo yum --enablerepo=remi install php-tcpdf
If you want to permanently enable the Remi repository, you need to edit the yum configuration file for Remi.
Open the repository configuration file by using a text editor of your choice:
sudo nano /etc/yum.repos.d/remi.repo Edit the [remi] portion of the file to set the enabled option to 1. This action enables the Remi repository by default. name=Les RPM de remi pour Enterprise Linux $releasever - $basearch #baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/ mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi failovermethod=priority
Check available repositories
You can see if the repositories that you need are installed and enabled by running the following command:
yum repolist
Some repositories, like Remi, are disabled by default. To list disabled repositories, run the following command:
yum repolist disabled
http://www.rackspace.com/knowledge_center/article/install-epel-and-additional-repositories-on-centos-and-red-hat
No comments:
Post a Comment