国内yum源的安装(163,阿里云,epel)
----阿里云镜像源
1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、之后运行 yum clean all; yum makecache 生成缓存
----163镜像源
第一步:备份你的原镜像文件,以免出错后可以恢复。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 第二步:下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
3、之后运行 yum clean all,yum makecache 生成缓存
----EPEL源
EPEL(Extra Packages for Enterprise Linux)是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS等提供高质量软件包的项目。装上了 EPEL,就像在 Fedora 上一样,可以通过 yum install 软件包名,即可安装很多以前需要编译安装的软件、常用的软件或一些比较流行的软件,比如现在流行的nginx、htop、ncdu、vnstat等等,都可以使用EPEL很方便的安装更新。
目前可以直接通过执行命令: yum install epel-release 直接进行安装,如果此命令无法安装可以尝试以下方法
----安装EPEL 阿里云源
1、备份(如有配置其他epel源)
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
2、下载新repo 到/etc/yum.repos.d/
epel(RHEL 7)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
epel(RHEL 6)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
epel(RHEL 5)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo
----官方源直接安装
CentOS/RHEL 5 :
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
CentOS/RHEL 6 :
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
CentOS/RHEL 7 :
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
国内yum源的安装(163,阿里云,epel)的更多相关文章
- (转)国内yum源的安装(163,阿里云,epel)
国内yum源的安装(163,阿里云,epel) ----阿里云镜像源 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS ...
- 修改CentOS的yum源,改为阿里云的镜像
修改CentOS的yum源,改为阿里云的镜像 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.b ...
- 如何一步步使用国内yum源一键安装openstack-ocata版本基于centos7
写在前面的话,在网上看了一个国外的一键安装视频,我也照着做,结果出现很多错误,现在把坑解决了,照着做肯定能安装成功的 环境 virtualhost 下的centos7 配置 双网卡 一个10网段,na ...
- CentOS7配置更新国内yum源
备份本地yum源文件 cd /etc/yum.repo.d/ mv CentOS-Base.repo CentOS-Base.repo.bakeup 下载国内yum源 阿里云yum源 wget htt ...
- CentOS7修改为国内yum源
备份源yum源 如果是国内下载的CentOS很可能国内YUM源已经设置好了. 备份/etc/yum.repos.d/下的*.repo文件. 在CentOS中配置使用网易和阿里的开源镜像 wget ht ...
- contos 配置国内yum源
contos配置国内yum源 前言 rpm管理软件包的命令,很难用,需要手动解决以来关系,所以最好用 yum 的理念是使用一个中心仓库(repository)管理一部分甚至一个distribution ...
- contos配置国内yum源
contos配置国内yum源 前言 rpm管理软件包的命令,很难用,需要手动解决以来关系,所以最好用 yum 的理念是使用一个中心仓库(repository)管理一部分甚至一个distribution ...
- CentOS7 中把默认yum源更换成163源
163源是目前国内最好用的源,速度是相当快的,现在我们把CentOS7中的源改为163源 1.进入yum源配置文件 cd /etc/yum.repos.d 2.备份一下当前的源,以防出错后可以还原回来 ...
- redhat更改yum源及安装PHP环境
redhat更新yum源 删除同RHEL一同安装的yum源 rpm -qa|grep yum #查看本地yum yum list | wc -l #看个数 yum install pip #看现象 r ...
随机推荐
- 【读书笔记】Junit实战
Junit实战读书笔记 第一章节 探索Junit: Junit是1997年Erich Gammay和Kent Beck一同创建的一个简单有效的测试框架,其中Erich Gammay是经典<设计模 ...
- 20145302张薇 《网络对抗技术》逆向及BOF基础实践
20145302张薇 <网络对抗技术>逆向及BOF基础实践 实验内容 实践对象:名为20145302的linux可执行文件. 该程序正常执行流程是:main调用foo函数,foo函数会简单 ...
- 2017-2018-1 JaWorld 第八周作业
2017-2018-1 JaWorld 第八周作业 团队分工 成员 分工 陈是奇 统计成员工具选择 马平川 类图 王译潇 编码规范 李昱兴 用例图 林臻 状态图 张师瑜 推进工作进展.写博客 UML ...
- ubuntu下各类快捷键汇总记录
一.环境 Ubuntu 16.04 二.快捷键汇总如下 2.1 将图形界面下的terminal最大化:ctrl+super+向上的方向键 2.2 将图形界面下的terminal最小化:ctrl+sup ...
- Using SQLXML Bulk Load in the .NET Environment
http://msdn.microsoft.com/en-us/library/ms171878.aspx 1.首先创建一张表 CREATE TABLE Ord ( OrderID ,) PRIMAR ...
- 论OI中最大值的选取
为什么我的Floyd会输出负数啊? 为什么我的代码写对了却全都爆零了啊? 那么很可能是你的INF取大/小了! 那么inf到底应该取什么值呢? 首先,inf应该要比一般的题目中出现的数据要大,但是又不能 ...
- Vi/Vim三种模式
命令模式,底线命令模式,输入模式:
- python 列表求和
def sum_list(items): sum_numbers = for x in items: sum_numbers += x return sum_numbers print(sum_lis ...
- 动态规划-Stock Problem
2018-04-19 19:28:21 股票问题是leetcode里一条非常经典的题目,因为其具有一定的现实意义,所以还是在数学建模方面还是有很多用武之地的.这里会对stock的给出一个比较通用的解法 ...
- ddt中的data,unpack,file_data实现数据驱动--数据分离
ddt:Class decorator for subclasses of ``unittest.TestCase``. -----``unittest.testcase``子类的类修饰器. 首先介绍 ...