首先咱们可使用下RHEL的官方源.命令很简单php
# yum localinstall http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm -yes6
若发现它报个404之类的,去 http://dl.fedoraproject.org/pub/epel/7/x86_64/e/ 找找看 epel-release 开头的rpm package,或许有更新,总之装个epel-release*.rpm后,看/etc/yum.repos.d/文件夹下就多了两个文件以下:spring
-rw-r--r-- 1 root root 957 Jun 19 07:20 epel.repo-rw-r--r-- 1 root root 1056 Jun 19 07:20 epel-testing.repo
你若没有特别的需求,你应该只要有epel.repo就能够.centos
epel.repoide
[epel] name=Extra Packages for Enterprise Linux 7 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearchmirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearchfailovermethod=priority enabled=1gpgcheck=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 [epel-debuginfo] name=Extra Packages for Enterprise Linux 7 - $basearch - Debug #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debugmirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearchfailovermethod=priority enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7gpgcheck=1 [epel-source] name=Extra Packages for Enterprise Linux 7 - $basearch - Source #baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMSmirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearchfailovermethod=priority enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7gpgcheck=1
你也能够直接把上面那些内容写到/etc/yum.repos.d/epel.repo文件中.
而后:# yum makecache 这样就能够用了。测试
尝试是否成功也很容易ui
# yum repolist ...... repo id repo name status epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 5,425......
发现有高亮一栏就算过了.this
安装和RHEL差很少,这个源主要是提供了一些php相关的扩展库,若不使用php,意义感受不算大.url
# yum localinstall http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
一样能够在/etc/yum.repos.d/中看到多了个remi.repo
编辑能够看到内容以下:spa
[remi] name=Les RPM de remi pour Enterprise Linux 7 - $basearch #baseurl=http://rpms.famillecollet.com/enterprise/7/remi/$basearch/mirrorlist=http://rpms.famillecollet.com/enterprise/7/remi/mirrorenabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-php55] name=Les RPM de remi de PHP 5.5 pour Enterprise Linux 7 - $basearch #baseurl=http://rpms.famillecollet.com/enterprise/7/php55/$basearch/mirrorlist=http://rpms.famillecollet.com/enterprise/7/php55/mirror# WARNING: If you enable this repository, you must also enable "remi" enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-php56] name=Les RPM de remi de PHP 5.6 pour Enterprise Linux 7 - $basearch #baseurl=http://rpms.famillecollet.com/enterprise/7/php56/$basearch/mirrorlist=http://rpms.famillecollet.com/enterprise/7/php56/mirror# WARNING: If you enable this repository, you must also enable "remi" enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-test] name=Les RPM de remi en test pour Enterprise Linux 7 - $basearch #baseurl=http://rpms.famillecollet.com/enterprise/7/test/$basearch/mirrorlist=http://rpms.famillecollet.com/enterprise/7/test/mirror# WARNING: If you enable this repository, you must also enable "remi" enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-debuginfo] name=Les RPM de remi pour Enterprise Linux 7 - $basearch - debuginfo baseurl=http://rpms.famillecollet.com/enterprise/7/debug-remi/$basearch/enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-php55-debuginfo] name=Les RPM de remi de PHP 5.5 pour Enterprise Linux 7 - $basearch - debuginfo baseurl=http://rpms.famillecollet.com/enterprise/7/debug-php55/$basearch/enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-php56-debuginfo] name=Les RPM de remi de PHP 5.6 pour Enterprise Linux 7 - $basearch - debuginfo baseurl=http://rpms.famillecollet.com/enterprise/7/debug-php56/$basearch/enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-test-debuginfo] name=Les RPM de remi en test pour Enterprise Linux 7 - $basearch - debuginfo baseurl=http://rpms.famillecollet.com/enterprise/7/debug-test/$basearch/enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
默认enable全是0,根据须要自行将enable改成1,注意高亮的第五行enable必须改成1 remi才能用.
而后makecache 测试什么的就和RHEL同样不细说了.
puias 是基于RH的一个扩展distribution和mirror。不管是CentOS 5,6仍是7均可以获得它的一些扩展的程序。尤为是科学计算领域的一些模块,果断是要入手的。目前它由普林斯顿高能所维护。
你去它的官网能够获得不少说明。好比这个页面
咱们能够只选择计算的部分以下:
puias-computational.repo
[PUIAS_computational] name=PUIAS computational Base $releasever - $basearch mirrorlist=http://puias.math.ias.edu/data/puias/computational/$releasever/$basearch/mirrorlist#baseurl=http://puias.math.ias.edu/data/puias/computational/$releasever/$basearchgpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puias
/etc/yum.repo.d/下创建文件,保存便可。
由于咱们此次没有使用rpm包,因此须要import一下GPG KEY.
rpm --import http://puias.princeton.edu/data/puias/7/x86_64/os/RPM-GPG-KEY-puias
RepoForge原名RPMForge,是一个维护得很不错的repo站点.点击此处能够看到RHEL各版本的下载连接.拿到连接后
yum localinstall xxx.rpm -y
便可完成安装。
目前为止彷佛尚未把centos 7加上,可是不要紧,随便找个6的连接,把6变成7便可得到该rpm包的大体位置。当前我获得的位置是 : http://apt.sw.be/redhat/el7/en/x86_64/rpmforge/RPMS/
进入后找到rpmforge-release-**的文件,得到下载连接,安装便可。
yum localinstall http://apt.sw.be/redhat/el7/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm -yyum makecache