1. 程式人生 > >CentOS EPEL yum源

CentOS EPEL yum源

art ref blank all sta await man int warn

CentOS EPEL yum源

用yum安裝軟件時,經常發現我們的yum源裏面沒有該軟件,比如htop。網上查到的一個方案是需要自己去wget源碼,然後configure,make,make install,總體比較麻煩。

其實,CentOS還有一個源叫做 EPEL (Extra Packages for Enterprise Linux),為“紅帽系”的操作系統提供額外的軟件包,適用於RHEL、CentOS等,裏面有1萬多個軟件,強烈建議安裝。

安裝 epel-release

首先我們需要安裝一個叫“epel-release”的軟件包,這個軟件包會自動配置yum的軟件倉庫。到下面的網址找你對應的CentOS版本和計算機架構:http://download.fedoraproject.org/pub/epel

我的是64位的CentOS7,對應的地址是:https://mirrors.ustc.edu.cn/epel//7/x86_64/Packages/e/epel-release-7-11.noarch.rpm

下載並安裝epel-release-7-11.noarch.rpm

[root@99b8f912c857 ~]# wget https://mirrors.ustc.edu.cn/epel//7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
--2018-01-06 03:11:37--  https://mirrors.ustc.edu.cn/epel//7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
Resolving docker.for.mac.localhost (docker.for.mac.localhost)... 192.168.65.1, 192.168.65.1
Connecting to docker.for.mac.localhost (docker.for.mac.localhost)|192.168.65.1|:2323... connected.
Proxy request sent, awaiting response... 200 OK
Length: 15080 (15K) [application/x-redhat-package-manager]
Saving to: ‘epel-release-7-11.noarch.rpm‘

100%[=========================================================================================================>] 15,080      --.-K/s   in 0s

2018-01-06 03:11:37 (160 MB/s) - ‘epel-release-7-11.noarch.rpm‘ saved [15080/15080]

[root@99b8f912c857 ~]# rpm -ivh epel-release-7-11.noarch.rpm
warning: epel-release-7-11.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:epel-release-7-11                ################################# [100%]

更新yum源

[root@99b8f912c857 ~]# yum clean all
[root@99b8f912c857 ~]# yum update

安裝所需軟件

[root@99b8f912c857 ~]# yum install nginx

CentOS EPEL yum源