Linux Redhat 安装免费yum源
Linux Redhat 7 安装免费yum源
出处地址:http://www.cnblogs.com/nbartchen/p/8565816.html
1、查看是否安装相关包
rpm -qa|grep yum|xargs rpm -e --nodeps
2、下载rpm包到本地、并安装
curl -O http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-163.el7.centos.noarch.rpm
curl -O http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
curl -O http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-52.el7.noarch.rpm
3、安装rpm包
rpm -ivh yum-*
4、备份redhat yum源,新建免费yum源目录
mv /etc/yum.repos.d/ /etc/yum.repos.d.backup
mkdir /etc/yum.repos.d
5、下载yum Centos7 yum源、移动到yum目录
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
mv CentOS7-Base-.repo /etc/yum.repos.d
6、修改文件相关内容
# 进入文件 编辑 CentOS7-Base-163.repo
:%s/$releasever//g
7、更新yum缓存测试使用
yum clean all
yum makecache
yum repolist all
注:如上述不生效需采取另一种方式
rpm -ivh yum-*
警告:yum-3.4.-.el7.centos.noarch.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
错误:依赖检测失败:
python-urlgrabber >= 3.10- 被 yum-3.4.-.el7.centos.noarch 需要
rpm >= :4.11.- 被 yum-3.4.-.el7.centos.noarch 需要
报错
1、python-urlgrabber和rpm包升级
curl -O http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-9.el7.noarch.rpm
curl -O http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-4.11.3-40.el7.x86_64.rpm
rpm -Uvh rpm-4.11.3-40.el7.x86_64.rpm --nodeps
rpm -Uvh python-urlgrabber-3.10-9.el7.noarch.rpm --nodeps
2、添加vim源
vim /etc/yum.repos.d/CentOS-Base.repo
#CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$7 - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #released updates
[updates]
name=CentOS-$7 - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful
[extras]
name=CentOS-$7 - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$7 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
配置文件
3、更新yum缓存测试使用
yum clean all
yum makecache
yum repolist all
Linux Redhat 安装免费yum源的更多相关文章
- Linux 安装扩展yum源
Linux 安装扩展yum源 下载rpm扩展:http://rpmfind.net/linux/epel/6/x86_64/epel-release-6-8.noarch.rpm CentOS/RHE ...
- Linux 安装 EPEL YUM源
原文:https://blog.csdn.net/harbor1981/article/details/51135623 我们用yum安装软件时,经常发现我们的yum源里面没有该软件,需要自己去wge ...
- RedHat 更新CentOS Yum源(转)
经测试,可用.转自:https://www.cnblogs.com/tangsen/p/5151994.html 一.随笔引言 1.1随笔内容: 1.RedHat 配置Centos yum源 2.yu ...
- rhel6.5安装网络yum源过程
**redhat的yum在线更新是收费的,如果没有注册的话不能使用,如果要使用,需将redhat的yum卸载后,重启安装其他yum源,再配置其他源.** 本文包括配置本地源及第三方源.第三方源包括:网 ...
- CentOS 开启安装EPEL YUM源
我们用yum安装软件时,经常发现我们的yum源里面没有该软件,需要自己去wget,然后configure,make,make install,太折腾了. 其实,CentOS 还有一个源叫做 EPEL ...
- RedHat Linux RHEL6配置本地YUM源
YUM是Yellow dog Updater Modified的简称,起初是由yellow dog这一发行版的开发者Terra Soft研发,用python写成,那时还叫做yup(yellow dog ...
- Linux服务器redhat配置本地yum源
前面给大家介绍了很多在Linux安装软件的知识,这些软件往往依赖了很多第三方的工具或者软件,如果在Linux服务器有外网的情况,咱们可以通过yum install这样的命令直接去安装这些相关的工具或者 ...
- Linux中的安装神器--yum源安装
linux配置yum源 一.修改yum的配置文件 /etc/yum.repos.d/xxx.repo 1.进入yum配置文件目录 # cd /etc/yum.r ...
- linux(readhat) yum源安装
在安装測试环境的时候遇到了一个问题,/etc/yum/repos.d中不存在文件或目录,无法更新yum源. 解决方法: (一.配置网络yum源) 1.首先在/etc/yum/repos.d/文件夹下创 ...
随机推荐
- histogram 和 bar plot的区别
最本质的区别是这样的:histogram用来描述的是numerical变量,而bar plot用来描述的是categorical类型的变量.统计学当中关于变量的分类 这可以从它们的图形上面看到: hi ...
- composer----------composer基本命令和遇到一些问题解决方案
1.composer跟xdebug有冲突,每次用composer命令的时候都要报xdebug的错误,去php的配置文件里面将xdebug注释掉就可以了,但是我注释掉了以后还是不行.找了半天才看到,我用 ...
- 原型链(_proto_) 与原型(prototype) 有啥关系?
prototype对象里面方法及属性是共享的...... 1.JavaScript 中每一个对象都拥有原型链(__proto__)指向其构造函数的原型( prototype),object._prot ...
- JAVA8方法引用
方法引用:若Lambda方法体已经实现,我们可以使用方法引用* 主要有三种语法格式:* 对象::实例方法名* 类::实例方法名* 类::静态方法名** 注意:Lambda体中调用的方法的参数列表与返回 ...
- html utf-8 中文乱码
刚才用ajax从记事本中读文档的时候,发现在页面上显示是乱码. 页面编码:<meta charset="utf-8"> 搞半天最后发现是记事本编码格式的问题,记事本默认 ...
- Big Event in HDU (母函数, 玄学AC)
Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't k ...
- Python 1.安装
Python是一种开源语言,有很多第三方库. 1. Python3 及相关组件下载及安装 a. Python3下载:https://www.python.org/downloads/->点击以下 ...
- JavaScript--定时器setTimeout()、clearTimeout(var param)和setInterval()、clearInterval(var param)
1.setTimeout().clearTimeout(var param) setTimeout() 方法用于在指定的毫秒数后调用函数或计算表达式,只调用一次 clearTimeout() 方法可取 ...
- 【2017-02-28】C# 冒泡排序
冒泡排序 重复地走访过要排序的数列,一次比较两个元素的大小,如果他们的顺序错误就把他们交换过来 通过两个For循环嵌套来实现 思路——以从小到大为例 第一个for循环抽取第一个数和第二个数进行比较,如 ...
- 浏览器页面请求js、css大文件处理
当页面引用一个比较大的js和css文件时,会出现较大下载延迟,占用带宽的问题,如果一个应用里有很多这样的js或CSS文件,那么就需要优化了. 比如ext-all.js有1.4M,页面引用这个文件,正常 ...