inux如何安装epel软件库

1、RHEL/CentOS/SL Linux 6.x 下安装 EPEL6 yum源:

32位系统选择:

rpm -ivh http://download4.fedora.redhat.com/pub/epel/6/i386/epel-release-6-8.noarch.rpm

64位系统选择:

rpm -ivh http://download4.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

导入key:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

2、默认会在/etc/yum.repos.d/下创建epel.repo和epel-testing.repo两个配置文件,epel.repo的内容如下:

[epel]
name=Extra Packages for Enterprise Linux 6 – $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 – $basearch – Debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 6 – $basearch – Source
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

如果想使用比较新的软件,可以启用[epel-testing]源,把里面的enabled=0改成enabled=1就可以。

3. 检查EPEL 源

安装好EPEL 源后,用yum 命令来检查是否添加到源列表

# 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
extras         CentOS-6 - Extras                                          13
nginx          nginx repo                                                 47
updates        CentOS-6 - Updates                                      1,555
repolist: 18,019
EPEL已经在repo 后列出,并且显示提供了上万个软件包,所以EPEL 已经安装到你的CentOS了。

4、yum安装nginx测试看看:

yum install nginx

5、配置网易镜像源

http://mirrors.163.com/.help/centos.html

http://nchc.dl.sourceforge.net/project/poptop/pptpd/pptpd-1.3.4/pptpd-1.3.4.tar.gz

发表评论


表情