在CentOS上安装第三方软件库EPEL

2016-07-12 10:24:24来源:oschina作者:shezjl人点击

CentOS
EPEL
Extra Packages for Enterprise Linux (EPEL)【企业版 Linux 附加软件包(以下简称 EPEL)】是一个由特别兴趣小组创建、维护并管理的,针对 红帽企业版 Linux(RHEL)及其衍生发行版(比如 CentOS、 Scientific Linux)的一个高质量附加软件包项目。
EPEL 的软件包通常不会与企业版Linux官方源中的软件包发生冲突,或者互相替换文件。EPEL与Fedora项目基本一致,包含完整的构建系统、升级管理器、镜像管理器等等。
EPEL 包含一个叫做epel-release的包,这个包包含了EPEL源的gpg密钥和软件源信息。您可以通过yum安装到您的企业版Linux发行版上。除了epel-release源,还有一个叫做epel-testing的源,这个源包含最新的测试软件包,其版本很新但是安装有风险,请自行斟酌。
注意: 有些第三方软件源需要 EPEL 的'epel-testing'源来安装依赖组件,请务必在系统设置中启用本源。 这里 有相关的开启教程。(相关配置文件位于:/etc/yum.repos.d/epel-testing.repo)。1.首先检查系统是否安装epel-release

Java代码
复制代码
收藏代码

[root@localhost ~]
#rpm-qepel-release
packageepel-releaseisnotinstalled
[root@localhost ~]
# rpm -q epel-release
package epel-release is not installed2.安装EPEL

Java代码
复制代码
收藏代码

[root@localhost ~]#rpm-ivhhttp://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrievinghttp://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
Preparing...###########################################[100%]
1:epel-release###########################################[100%]
[root@localhost ~]# rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
Preparing...########################################### [100%]
1:epel-release########################################### [100%]注意:
1、
要安装最新版本的EPEL,请前往 http://mirrors.ustc.edu.cn/fedora/epel/ 中查找最新版本的URL地址,这里采用的是6.8版本
32位:http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
64位:http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm 2、若出现下面类似错误,则表示对应的URL已经不存在,需要重新找EPEL的版本,请前往 http://mirrors.ustc.edu.cn/fedora/epel/ 获取需要的版本

Java代码
复制代码
收藏代码

[root@localhost ~]#rpm-ivhhttp://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrievinghttp://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
curl:(22)TherequestedURLreturnederror:404NotFound
error:skippinghttp://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm-transferfailed
[root@localhost ~]# rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
curl: (22) The requested URL returned error: 404 Not Found
error: skipping http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm - transfer failed#2.1 安装成功

Java代码
复制代码
收藏代码

[root@localhost ~]#rpm-qepel-release
epel-release-6-8.noarch
[root@localhost ~]# rpm -q epel-release
epel-release-6-8.noarch#2.2 查看其所依附的软件文件

Java代码
复制代码
收藏代码

[root@localhost ~]#rpm-qRepel-release
/bin/sh
/bin/sh
config(epel-release)=6-8
redhat-release>=6
rpmlib(CompressedFileNames)<=3.0.4-1
rpmlib(FileDigests)<=4.6.0-1
rpmlib(PayloadFilesHavePrefix)<=4.0-1
rpmlib(PayloadIsXz)<=5.2-1
[root@localhost ~]# rpm -qR epel-release
/bin/sh
/bin/sh
config(epel-release) = 6-8
redhat-release >= 6
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1#2.3 卸载

Java代码
复制代码
收藏代码

[root@localhost~]#rpm-eepel-release
warning:/etc/yum.repos.d/epel.reposavedas/etc/yum.repos.d/epel.repo.rpmsave
[root@localhost ~]# rpm -e epel-release
warning: /etc/yum.repos.d/epel.repo saved as /etc/yum.repos.d/epel.repo.rpmsave#2.4 设置源级别

Java代码
复制代码
收藏代码

[root@localhost~]#vi/etc/yum.repos.d/epel.repo
设置/etc/yum.repos.d/epel.repo中源的级别为priority=11
[root@localhost ~]# vi /etc/yum.repos.d/epel.repo
设置 /etc/yum.repos.d/epel.repo 中源的级别为 priority=11#2.5 搜索软件包
若要查看 EPEL Repo 中是否存在某个软件包:yum search package-name,若搜索git

Java代码
复制代码
收藏代码

[root@localhost~]#yumsearchgit
Loadedplugins:fastestmirror,refresh-packagekit,security
Loadingmirrorspeedsfromcachedhostfile
*base:mirrors.aliyun.com
*epel:mirrors.hust.edu.cn
*extras:mirrors.aliyun.com
*updates:mirror.bit.edu.cn
==============================N/SMatched:git===============================
nodejs-github-url-from-git.noarch:ParseaGitHubgitURLandreturntheGitHubrepositoryURL
php-phpunit-git.noarch:SimplewrapperforGit
trac-git-plugin.noarch:GITversioncontrolpluginforTrac
GitPython.noarch:PythonGitLibrary
cgit.x86_64:Afastwebinterfaceforgit
git-annex.x86_64:Managefileswithgit,withoutcheckingtheircontentsintogit
git-ftp.noarch:GitpoweredFTPclientwrittenasshellscript
git-gui.noarch:GitGUItool
git-review.noarch:AgithelperforintegrationwithGerrit
git2cl.noarch:ConvertsgitlogstoGNUstyleChangeLogformat
gitolite.noarch:Highlyflexibleserverforgitdirectoryversiontracker
gitosis.noarch:Gitrepositoryhostingapplication
gitstats.noarch:GeneratesstatisticsbasedonGITrepositoryactivity
//……(略)
tkgate-fr.x86_64:Localesandexamplesfortkgate,DigitalCircuitSimulator
tkgate-it.x86_64:Localesandexamplesfortkgate,DigitalCircuitSimulator
tkgate-ja.x86_64:Localesandexamplesfortkgate,DigitalCircuitSimulator
tuxpaint.x86_64:Drawingprogramdesignedforyoungchildren
xmlsec1-devel.i686:Libraries,includes,etc.todevelopapplicationswithXMLDigital
:SignaturesandXMLEncryptionsupport.
xmlsec1-devel.x86_64:Libraries,includes,etc.todevelopapplicationswithXMLDigital
:SignaturesandXMLEncryptionsupport.Nameandsummarymatchesonly,use"searchall"foreverything.
[root@localhost ~]# yum search git
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.hust.edu.cn
* extras: mirrors.aliyun.com
* updates: mirror.bit.edu.cn
============================== N/S Matched: git ===============================
nodejs-github-url-from-git.noarch : Parse a GitHub git URL and return the GitHub repository URL
php-phpunit-git.noarch : Simple wrapper for Git
trac-git-plugin.noarch : GIT version control plugin for Trac
GitPython.noarch : Python Git Library
cgit.x86_64 : A fast web interface for git
git-annex.x86_64 : Manage files with git, without checking their contents into git
git-ftp.noarch : Git powered FTP client written as shell script
git-gui.noarch : Git GUI tool
git-review.noarch : A git helper for integration with Gerrit
git2cl.noarch : Converts git logs to GNU style ChangeLog format
gitolite.noarch : Highly flexible server for git directory version tracker
gitosis.noarch : Git repository hosting application
gitstats.noarch : Generates statistics based on GIT repository activity
// ……(略)
tkgate-fr.x86_64 : Locales and examples for tkgate, Digital Circuit Simulator
tkgate-it.x86_64 : Locales and examples for tkgate, Digital Circuit Simulator
tkgate-ja.x86_64 : Locales and examples for tkgate, Digital Circuit Simulator
tuxpaint.x86_64 : Drawing program designed for young children
xmlsec1-devel.i686 : Libraries, includes, etc. to develop applications with XML Digital
: Signatures and XML Encryption support.
xmlsec1-devel.x86_64 : Libraries, includes, etc. to develop applications with XML Digital
: Signatures and XML Encryption support.
Name and summary matches only, use "search all" for everything.
3. 安装第三方软件
使用yum install package-name命令安装第三方软件,如使用yum install git安装git

Java代码
复制代码
收藏代码

[root@localhost~]#yuminstallgit
Loadedplugins:fastestmirror,refresh-packagekit,security
Loadingmirrorspeedsfromcachedhostfile
epel/metalink|5.5kB00:00
*base:mirrors.aliyun.com
*epel:ftp.sjtu.edu.cn
*extras:mirrors.aliyun.com
*updates:mirror.bit.edu.cn
epel|4.4kB00:00
epel/primary_db|6.0MB01:19
SettingupInstallProcess
ResolvingDependencies
-->Runningtransactioncheck
--->Packagegit.x86_640:1.7.1-3.el6_4.1willbeinstalled
-->ProcessingDependency:perl-Git=1.7.1-3.el6_4.1forpackage:git-1.7.1-3.el6_4.1.x86_64
-->ProcessingDependency:perl(Git)forpackage:git-1.7.1-3.el6_4.1.x86_64
-->ProcessingDependency:perl(Error)forpackage:git-1.7.1-3.el6_4.1.x86_64
-->Runningtransactioncheck
--->Packageperl-Error.noarch1:0.17015-4.el6willbeinstalled
--->Packageperl-Git.noarch0:1.7.1-3.el6_4.1willbeinstalled
-->FinishedDependencyResolutionDependenciesResolved==================================================================================
PackageArchVersionRepositorySize
==================================================================================
Installing:
gitx86_641.7.1-3.el6_4.1base4.6M
Installingfordependencies:
perl-Errornoarch1:0.17015-4.el6base29k
perl-Gitnoarch1.7.1-3.el6_4.1base28kTransactionSummary
==================================================================================
Install3Package(s)Totaldownloadsize:4.7M
Installedsize:15M
Isthisok[y/N]:y
DownloadingPackages:
(1/3):git-1.7.1-3.el6_4.1.x86_64.rpm|4.6MB00:33
(2/3):perl-Error-0.17015-4.el6.noarch.rpm|29kB00:00
(3/3):perl-Git-1.7.1-3.el6_4.1.noarch.rpm|28kB00:00
----------------------------------------------------------------------------------
Total140kB/s|4.7MB00:34
warning:rpmts_HdrFromFdno:HeaderV3RSA/SHA1Signature,keyIDc105b9de:NOKEY
Retrievingkeyfromfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
ImportingGPGkey0xC105B9DE:
Userid:CentOS-6Key(CentOS6OfficialSigningKey)
Package:centos-release-6-4.el6.centos.10.x86_64(@anaconda-CentOS-201303020151.x86_64/6.4)
From:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Isthisok[y/N]:y(注:这里为输入的内容,导入GPGkey)
Runningrpm_check_debug
RunningTransactionTest
TransactionTestSucceeded
RunningTransaction
Warning:RPMDBalteredoutsideofyum.
Installing:1:perl-Error-0.17015-4.el6.noarch1/3
Installing:perl-Git-1.7.1-3.el6_4.1.noarch2/3
Installing:git-1.7.1-3.el6_4.1.x86_643/3
Verifying:git-1.7.1-3.el6_4.1.x86_641/3
Verifying:perl-Git-1.7.1-3.el6_4.1.noarch2/3
Verifying:1:perl-Error-0.17015-4.el6.noarch3/3Installed:
git.x86_640:1.7.1-3.el6_4.1DependencyInstalled:
perl-Error.noarch1:0.17015-4.el6perl-Git.noarch0:1.7.1-3.el6_4.1Complete!
[root@localhost ~]# yum install git
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
epel/metalink | 5.5 kB 00:00
* base: mirrors.aliyun.com
* epel: ftp.sjtu.edu.cn
* extras: mirrors.aliyun.com
* updates: mirror.bit.edu.cn
epel| 4.4 kB 00:00
epel/primary_db | 6.0 MB 01:19
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.7.1-3.el6_4.1 will be installed
--> Processing Dependency: perl-Git = 1.7.1-3.el6_4.1 for package: git-1.7.1-3.el6_4.1.x86_64
--> Processing Dependency: perl(Git) for package: git-1.7.1-3.el6_4.1.x86_64
--> Processing Dependency: perl(Error) for package: git-1.7.1-3.el6_4.1.x86_64
--> Running transaction check
---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed
---> Package perl-Git.noarch 0:1.7.1-3.el6_4.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================
PackageArchVersion Repository Size
==================================================================================
Installing:
gitx86_64 1.7.1-3.el6_4.1base4.6 M
Installing for dependencies:
perl-Errornoarch 1:0.17015-4.el6base29 k
perl-Git noarch 1.7.1-3.el6_4.1base28 k
Transaction Summary
==================================================================================
Install3 Package(s)
Total download size: 4.7 M
Installed size: 15 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): git-1.7.1-3.el6_4.1.x86_64.rpm| 4.6 MB 00:33
(2/3): perl-Error-0.17015-4.el6.noarch.rpm|29 kB 00:00
(3/3): perl-Git-1.7.1-3.el6_4.1.noarch.rpm|28 kB 00:00
----------------------------------------------------------------------------------
Total140 kB/s | 4.7 MB 00:34
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key)
Package: centos-release-6-4.el6.centos.10.x86_64 (@anaconda-CentOS-201303020151.x86_64/6.4)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y(注:这里为输入的内容,导入GPG key)
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : 1:perl-Error-0.17015-4.el6.noarch 1/3
Installing : perl-Git-1.7.1-3.el6_4.1.noarch 2/3
Installing : git-1.7.1-3.el6_4.1.x86_64 3/3
Verifying: git-1.7.1-3.el6_4.1.x86_64 1/3
Verifying: perl-Git-1.7.1-3.el6_4.1.noarch 2/3
Verifying: 1:perl-Error-0.17015-4.el6.noarch 3/3
Installed:
git.x86_64 0:1.7.1-3.el6_4.1
Dependency Installed:
perl-Error.noarch 1:0.17015-4.el6perl-Git.noarch 0:1.7.1-3.el6_4.1
Complete!4. 参考资料
[1]EPEL
https://fedoraproject.org/wiki/EPEL
[2]CentOS 6.2安装第三方软件库epel
http://blog.csdn.net/jackalfly/article/details/7572886

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台