Modify domestic 163 software source and add epel source after linux installation

After installing CentOS, it is generally necessary to modify the yum source in order to obtain an ideal speed when installing and updating the rpm package. In China, there are 163 sources and sohu sources that are relatively fast. Here is an example of 163 source.

1. cd /etc/yum.repos.d

2. mv CentOS-Base.repo CentOS-Base.repo.backup

3. wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

4. mv CentOS6-Base-163.repo CentOS-Base.repo

5.yum clean all

 

Install EPEL on CentOS

To install EPEL, we first need to download the RPM installation package of EPEL.

The download pages for versions 6.x and 5.x under CentOS/RHEL are as follows

http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html http://download.fedoraproject.org/pub/epel/5/i386/repoview/epel-release.html

The above URL may be redirected to a specific mirror site to speed up the download. This page contains download links to get direct access to rpm packages. The direct download link is as follows:

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

Choose the correct download address according to your CentOS version.

Please note that the EPEL package is compiled independently, so it can be installed on 32-bit and 64-bit systems.

1. Confirm your CentOS version

First confirm your CentOS version with the following command

$ cat /etc/RedHat-release 
CentOS release 6.4 (Final)

2. Download the rpm installation package of EPEL

Now download the version of EPEL corresponding to the CentOS version from the above address

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

3. Install EPEL

Install the EPEL package via the following command

$ sudo rpm -ivh epel-release-6-8.noarch.rpm

or

$ sudo rpm -ivh epel-release *

5. Check the EPEL source

After installing the EPEL source, use the yum command to check if it is added to the source list

# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.vonline.vn
 * epel: buaya.klas.or.id
 * extras: centos-hn.viettelidc.com.vn
 * updates: mirrors.fibo.vn
repo id        repo name                                              status
base           CentOS-6 - Base                                         6,381
epel           Extra Packages for Enterprise Linux 6 - x86_64         10,023
CentOS-6 extras - Extras 13
nginx          nginx repo                                                 47
updates        CentOS-6 - Updates                                      1,555
repolist: 18,019

EPEL is already listed in the repo and shows that there are tens of thousands of packages available, so EPEL is already installed on your CentOS.

The configuration of the EPEL source is installed into the  /etc/yum.repos.d/epel.repo  file.

Now try getting packages from EPEL

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326767421&siteId=291194637