CentOS自帶的CentOS-Base.repo源中有時候找不到需要的軟件,或者安裝的版本不夠新或穩定,下面的源可以幫你解決這些問題
EPEL源
EPEL,即Extra Packages for Enterprise Linux,是由 Fedora 社區創建維護,爲 RHEL 及衍生髮行版如 CentOS、Scientific Linux 等提供高質量軟件包的項目。EPEL中含有大量的軟件,對官方標準源是一個很好的補充。
EPEL 下載地址:http://download.fedora.redhat.com/pub/epel/
wiki:http://fedoraproject.org/wiki/EPEL
安裝命令:
rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
Remi源
Remi源大家或許很少聽說,不過Remi源GoFace強烈推薦,尤其對於不想編譯最新版的linux使用者,因爲Remi源中的軟件幾乎都是最新穩定版。或許您會懷疑穩定不?放心吧,這些都是Linux骨灰級的玩家編譯好放進源裏的,他們對於系統環境和軟件編譯參數的熟悉程度毋庸置疑。
Remi下載地址:http://rpms.famillecollet.com/
安裝命令:
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
RPMForge源
RPMForge是CentOS系統下的軟件倉庫,擁有4000多種的軟件包,被CentOS社區認爲是最安全也是最穩定的一個軟件倉庫。
RPMForge下載地址:
32位:http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/
64位:http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/
安裝命令:
rpm -ivh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
配置文件:
cd /etc/yum.repos.d/
*.repo文件是配置文件,設置:enable=1 priority=1(priority=N , N爲1到99的正整數,數值越小越優先)
導出對應源配置生效 :rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*
例如配置remi
[root@localhost home]# ls -l /etc/yum.repos.d/
total 44
-rw-r--r--. 1 root root 1926 Feb 25 16:57 CentOS-Base.repo
-rw-r--r--. 1 root root 638 Feb 25 16:57 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 630 Feb 25 16:57 CentOS-Media.repo
-rw-r--r--. 1 root root 3664 Feb 25 16:57 CentOS-Vault.repo
-rw-r--r--. 1 root root 969 May 14 14:55 epel.repo
-rw-r--r--. 1 root root 1056 Nov 5 2012 epel-testing.repo
-rw-r--r--. 1 root root 739 Mar 20 22:24 mirrors-rpmforge
-rw-r--r--. 1 root root 717 Mar 20 22:24 mirrors-rpmforge-extras
-rw-r--r--. 1 root root 728 Mar 20 22:24 mirrors-rpmforge-testing
-rw-r--r--. 1 root root 1032 May 14 14:54 remi.repo
-rw-r--r--. 1 root root 1140 May 14 15:48 rpmforge.repo
[root@localhost home]# vi /etc/yum.repos.d/remi.repo
[remi]
name=Les RPM de remi pour Enterprise Linux 6 - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror
enabled=1
priority=10
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
...
[root@GoGo yum.repos.d]# rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-remi