Install EPEL source in CentOS 6.X

Source: Internet
Author: User
Tags yum repolist

Install EPEL source in CentOS 6.X

There are not many software sources available in CentOS 6.X. Sometimes, you need to find some software with a single command, so there is no source. Considering that the software source can be installed automatically with the yum command, therefore, adding a new software source is imminent.

Considering the same root nature, if a third-party source is installed, you 'd better find a Fedora or Red Hat software source, such as EPEL (Extra Packages for Enterprise Linux, in addition, it is maintained by Fedora and has high compatibility. if the requirements are not that high, it can be used in the production environment.

The following describes how to add an EPEL Source:

First, determine the system version and open the terminal to escalate the privilege to the Super User.

Cat/etc/redhat-release

If CentOS release 6.X (Final) is displayed, follow the instructions below.

Run the following command to install the EPEL Source:

Wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Rpm-Uvh epel-release-6-8.noarch.rpm

In this case, the following section appears:

「 Cannot retrieve metalink for repository: epel. Please verify its path and try again 」

To modify the epel. repo file, enter the following command:

Vi/etc/yum. repos. d/epel. repo

Many people are not very familiar with the vi editor. Let's briefly talk about how to modify it. We need to modify the # Before the baseurl in [epel] and add the # Before the prepare list.

Specific editor operation: first move the cursor to B of baseurl, then press "I" on the keyboard, delete #, move to the next line, and then press # before listing #, finally, Press ESC on the keyboard to exit the editing mode, and enter wq on the keyboard to save and exit the vi editor.

Then run

Yum makecache

At this time, no error is reported, and the source can be used normally. If you are not sure, you can

Yum repolist

Verify that the source has been properly installed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.