CentOS 7添加yum源
RedHat下主要有两个distribution,一曰 RHEL(Red Hat Enterprise Linux) 一曰 Fedora.前者主要是供服务器使用,优点是稳定,缺点是老的掉牙,后者是供桌面使用的,优点是特别新,repo的速度几乎可以和archlinux媲美,缺点是发布两年EOL(End-of-life_(product))就到了,我见过某服务器从不关机,也不更新Kernel,一直缝缝补补开了数年的,用fedora简直是作死.
但若不是财大气粗(比如某有数千台曙光各种RHEL的xx中心,让人羡慕的流口水),很多服务器选择CentOS作为服务器的OS,因为基于GPL License的RHEL是提供binary file 和 source code 的,有社区将source code 再编译为 binary file ,取名为CentOS,所谓社区操作系统.对此RHEL是持认可--至少是理解的态度.因此,CentOS基本可以认为是RHEL的免费版本,据传性能还是有点差距并且不提供官方技术支持.若在服务器使用,它十年的EOL也足以让服务器免去很多维护了.
今年的7月份,CentOS发布CentOS 7,对应于Red Hat在6月发布的RHEL 7,Life Cycle从今年一直持续到2024年.更重要的是,这位同志终于愿意从2.6.x的kernel升到3.x了,要知道,截止目前,kernel早已升级到3.15.8了,这得落后多少年了啊,对应的gcc也从4.4.7升级到了4.8.x,终于可以在服务器上编译带--std=c++11参数的代码而不必自己编译个编译器先了泪目.
总之,很高兴的直接装了个新的CentOS 7,然后习惯的去找RPM fusion的源,然后悲剧的发现居然目前还没有提供...额,没有只有基础仓库的CentOS 7那得多不方便啊囧,只能找一些其它的源来应付下先.
找了下,这里和这里我找到一些相关内容,照着做了下,我最需要的几个东西都可以找到.
RHEL 官方扩展源
首先我们可以使用下RHEL的官方源.命令很简单
# yum localinstall http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm -y
若发现它报个404之类的,去 http://dl.fedoraproject.org/pub/epel/7/x86_64/e/ 找找看 epel-release 开头的rpm package,或许有更新,总之装个epel-release*.rpm后,看/etc/yum.repos.d/文件夹下就多了两个文件如下:
-rw-r--r-- root root Jun : epel.repo
-rw-r--r-- root root Jun : epel-testing.repo
你若没有特别的需求,你应该只要有epel.repo就可以.
epel.repo
[epel]
name=Extra Packages for Enterprise Linux - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 [epel-debuginfo]
name=Extra Packages for Enterprise Linux - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck= [epel-source]
name=Extra Packages for Enterprise Linux - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=
你也可以直接把上面那些内容写到/etc/yum.repos.d/epel.repo文件中.
然后:# yum makecache 这样就可以用了。
尝试是否成功也很容易
# yum repolist
......
repo id repo name status
epel/x86_64 Extra Packages for Enterprise Linux - x86_64 ,
......
发现有高亮一栏就算过了.
remi源
安装和RHEL差不多,这个源主要是提供了一些php相关的扩展库,若不使用php,意义感觉不算大.
# yum localinstall http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
同样可以在/etc/yum.repos.d/中看到多了个remi.repo
编辑可以看到内容如下:
[remi]
name=Les RPM de remi pour Enterprise Linux - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/7/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/7/remi/mirror
enabled=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-php55]
name=Les RPM de remi de PHP 5.5 pour Enterprise Linux - $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=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-php56]
name=Les RPM de remi de PHP 5.6 pour Enterprise Linux - $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=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-test]
name=Les RPM de remi en test pour Enterprise Linux - $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=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-debuginfo]
name=Les RPM de remi pour Enterprise Linux - $basearch - debuginfo
baseurl=http://rpms.famillecollet.com/enterprise/7/debug-remi/$basearch/
enabled=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-php55-debuginfo]
name=Les RPM de remi de PHP 5.5 pour Enterprise Linux - $basearch - debuginfo
baseurl=http://rpms.famillecollet.com/enterprise/7/debug-php55/$basearch/
enabled=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-php56-debuginfo]
name=Les RPM de remi de PHP 5.6 pour Enterprise Linux - $basearch - debuginfo
baseurl=http://rpms.famillecollet.com/enterprise/7/debug-php56/$basearch/
enabled=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi [remi-test-debuginfo]
name=Les RPM de remi en test pour Enterprise Linux - $basearch - debuginfo
baseurl=http://rpms.famillecollet.com/enterprise/7/debug-test/$basearch/
enabled=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
默认enable全是0,根据需要自行将enable改为1,注意高亮的第五行enable必须改为1 remi才能用.
然后makecache 测试什么的就和RHEL一样不细说了.
puias源
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/$basearch
gpgcheck=
gpgkey=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源
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 -y
yum makecache
CentOS 7添加yum源的更多相关文章
- CentOS配置本地yum源(使用镜像iso文件)
本人在使用yum安装软件的时候,感觉最不爽的是网络不佳时,安装的速度特别慢.所以,个人就上网search了一下如何使用Linux的安装文件作为其yum源.经过几次尝试,已经可以成功的配置了.下面是详细 ...
- CentOS / RHEL 配置yum源
CentOS / RHEL 配置yum源 */--> CentOS / RHEL 配置yum源 Table of Contents 1. 前言 2. 关于yum 2.1. yum是什么 2.2. ...
- 常用的CentOS 7系统yum源集合
常用的CentOS 7系统yum源集合 yum源对于linux系统的安装有非常大的帮助了,下面小编为各位整理了常用的CentOS 7系统yum源集合了,希望这篇文章能够对各位有所帮助的哦. 记 ...
- CentOS下安装yum源的流程和操作
一般公司都用Linux来搭建服务器,Linux安装软件时能够用yum安装依赖包是一件非常简单而幸福的事情,因为你只需一个简单的安装命令yum install []即可安装相应的软件,yum工具会自动的 ...
- RedHat Enterprise Linux 6.4使用Centos 6的yum源问题
RedHat Enterprise Linux 6.4使用Centos 6的yum源问题 作为一名新手,学习Linux已经一个月了,其间遇到了不少问题,而今天笔者遇到的问题是 #yum install ...
- centOS下更新yum源
CentOS下更新yum源 1.使用如下命令,备份/etc/yum.repos.d/CentOS-Base.repo. cp /etc/yum.repos.d/CentOS-Base.repo /et ...
- RHEL 6.6配置网易CentOS镜像的yum源小结
之前没有使用过网易CentOS镜像的yum源,最近由于需要,遂在一台测试服务器验证.测试了一下如何配置使用网易的Cent0S的yum源.此文仅仅是笔记性质,参考了网上大量资料(文末"参 ...
- Linux系统CentOS使用yum方式安装指定版本的PHP 添加yum源 从PHP5.3升级到5.4/5.5/5.6
默认的版本太低了,手动安装有一些麻烦,想采用Yum安装的可以使用下面的方案: 首先删除旧版本的PHP, 通过yum list installed | grep php可以查看所有已安装的php软件 使 ...
- Centos系统快速添加yum源
我常用的yum源如下: 阿里云yum源:http://mirrors.aliyun.com/repo/Centos-7.repo 小红帽yum源:https://dl.fedoraproject.or ...
随机推荐
- linux的一些小问题
1.需要使用root权限时提示xxx is not sudoers.... 1).root用户下输入visudo 2).在打开的文件中找到 root ALL=(ALL) ALL,以xxx为用户名,添加 ...
- Sprint评分表
组名:第七班 姓名:王炳午 1.Cs 小分队: 项目: 游戏与办公的集合一些小的程序的整合有2048,倒计时,记 ...
- spark on centos6.5 安装
第一步在centos 6.5上安装java 运行环境 http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-18 ...
- highcharts 当Y轴全部没有数据的时候 数据标签显示最下面 而不是居中显示
yAxis: {min: 0,minRange: 1}
- windows下在文件夹中快速启动cmd
在windows下,有时候由于特定需要,我们经常需要将cmd cd到某文件下进行命令行操作,其实,这里有一个小技巧: 在一个文件下,按住shift键,然后点击鼠标右键,你就会发现菜单栏中多出一个“在 ...
- Scala.js v0.1 发布,在浏览器直接运行 Scala
今天我们发布了 Scala.js 的首个版本,这个项目是在今年六月份的时候宣布的. 第一个版本支持的特性: 支持所有 Scala 特性,包括宏,不过有一些 语义上的区别 可非常好的跟 JavaScri ...
- Swift编程语言(中文版)官方手册翻译(进度8.8%)
翻译着玩,进度会比较慢. 等不及的可以看CocoaChina翻译小组,他们正在组织翻译,而且人手众多,相信会提前很多完成翻译. 原文可以在iTunes免费下载 目前进度 7 JUN 2014: 8.8 ...
- Ubuntu Desktop基本办公环境搭建
Ubuntu Desktop基本办公环境搭建 一如前面所强调的, linux系统是面向开发人员友好的,而对office办公人员并不友好 . 如果是重度的office办公需求人员,不建议使用linux ...
- Wix 安装部署(一)同MSBuild 自动生成打包文件
因为项目需要,最近在研究Wix打包部署,园子里也有一些关于wix的博客,方方面面,讲的点各不同.我自己也在测试过程中,写下过程,以供参考.最新版本WiX Toolset v3.7,如何安装的就不说了, ...
- Visual Studio 2015速递(3)——ASP.NET 新特性
系列文章 Visual Studio 2015速递(1)——C#6.0新特性怎么用 Visual Studio 2015速递(2)——提升效率和质量(VS2015核心竞争力) Visual Studi ...