There are not many software sources available in CentOS6.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 the Fedora or RedHat software source, such as EPEL (ExtraPackagesforEnterprise
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.