RedHat 7.3 更新yum源
title: RedHat 7.3 更新yum源
time: 2018.3.15
- 查看所有yum包
[root@bogon ~]# rpm -qa | grep yum
yum-rhn-plugin-2.0.1-6.el7.noarch
yum-3.4.3-150.el7.noarch
yum-utils-1.1.31-40.el7.noarch
PackageKit-yum-1.0.7-6.el7.x86_64
yum-langpacks-0.4.2-7.el7.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
- 删除原有yum包
[root@bogon ~]# rpm -e yum-rhn-plugin-2.0.1-6.el7.noarch yum-3.4.3-150.el7.noarch yum-utils-1.1.31-40.el7.noarch PackageKit-yum-1.0.7-6.el7.x86_64 yum-langpacks-0.4.2-7.el7.noarch yum-metadata-parser-1.1.4-10.el7.x86_64 --nodeps
- 进入网易163源镜像地址寻找所需包:
- 点击
centos - 点击
7/ - 点击
os/ - 点击
x86_64/ - 点击
Packages/ - ctrl+f 搜索需要的包, 如下:
yum-plugin-fastestmirror
yum-updateonboot
yum-utils
yum-metadata-parser
yum-3.4.3-150.el7
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-42.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-42.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-154.el7.centos.noarch.rpm
- 安装软件包
rpm -ivh yum-*
# 报错, 依赖包的版本不符:
rpm >= 0:4.11.3-22 is needed by yum-3.4.3-154.el7.centos.noarch
- 解决方法: 将所依赖的python-urlgrabber和rpm包升级
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-4.11.3-25.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-8.el7.noarch.rpm
# 安装:
rpm -Uvh rpm-4.11.3-25.el7.x86_64.rpm --nodeps
rpm -Uvh python-urlgrabber-3.10-8.el7.noarch.rpm --nodeps
- 重新安装软件包
rpm -ivh yum-*
- 更新yum源
rm /etc/yum.repos.d/redhat.repo
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
- 清楚yum缓存
yum clean all
- 生成缓存
yum makecache
- 更新成功, 可以安装软件了
yum install tree
tree
顺便, 设置网络自动启动:
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-
ifcfg-ens33 ifcfg-lo
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33
修改末行ONBOOT=yes
RedHat 7.3 更新yum源的更多相关文章
- redhat 7.2更新yum源时踩的坑
一.update yum .先查看redhat7.2中yum的包版本 [root@localhost jiayimeng]# rpm -qa | grep yum -.el7.noarch -.el7 ...
- redhat linux使用Centos yum源
redhat Linux如果是没有购买红帽许可的话是不能使用redhat的yum源的,但是可以通过修改使之能使用Centos的yum源. 步骤一:删除redhat的yum [root@localhos ...
- CentOS更新yum源
CentOS更新yum源 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载 ...
- 在VMware中为Redhat HAT配置本地yum源
在VMware中为Redhat HAT配置本地yum源 今天准备使用CM安装大数据环境,到需要几台机器都使用同一套yum源才可以,所以想到将Redhat镜像文件拷贝到虚拟机中,在挂起使用,最后通过ht ...
- 更新yum源却忘了生成缓存 造成每次启动机器报:the package list needs to be rebuilt
更新yum源的后一定要执行下面的两条命令: yum clean all yum makecache 注意:如果有第三方源的时候是,开机发果不联网的时候,也会报这个错!!!!!
- centOS下更新yum源
CentOS下更新yum源 1.使用如下命令,备份/etc/yum.repos.d/CentOS-Base.repo. cp /etc/yum.repos.d/CentOS-Base.repo /et ...
- 【linux配置】在VMware中为Redhat HAT配置本地yum源
在VMware中为Redhat HAT配置本地yum源 今天准备使用CM安装大数据环境,到需要几台机器都使用同一套yum源才可以,所以想到将Redhat镜像文件拷贝到虚拟机中,在挂起使用,最后通过ht ...
- 笔记:Linux下软件的安装、CentOS更新yum源、LAMP环境搭建、kali软件管理
一.Linux下软件的安装 方式:yum源 / rpm /源码安装 1.yum:(帮助管理员解决依赖关系) yum是通过分析rpm的包头数据后,根据各种软件的相关性质做出属性相对应的解决方案,然后可以 ...
- yum 更新yum源
yum 更新yum源 # 1.做好备份,防止更新失败时切换回去 $ mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base. ...
随机推荐
- linux开放80 端口
1.使用su登录管理员用户 2.编辑防火墙配置文件 vim /etc/sysconfig/iptables 3.在里面加入后保存 #open port 80 -A INPUT -p TCP -m st ...
- Shell脚本的基本流程控制
if else read -p '请输入分数:' score if [ $score -lt 60 ]; then echo '60分以下' elif [ $score -lt 70 ]; then ...
- Opencv 330 如何進行圖像的旋轉?
//圖像旋轉 cv::Mat Transformation(cv::Mat src,int angle) { cv::Mat dst = src.clone(); //中心点 cv::Point ce ...
- 1014. Waiting in Line (模拟)
n个窗口就有n个队列,模拟这n个队列就可以了.需要注意的是,一个人在选择排队窗口的时候,他会选择排队人数最少的窗口,如果存在多个窗口排队的人数相同,那么他会选择编码最小的窗口. Note that s ...
- Oracle trunc() 函数处理数字、日期的整理
--Oracle trunc()函数的用法/**************日期********************/1.select trunc(sysdate) from dual --2013- ...
- jqeury显示前几个,隐藏后几个,点击后隐藏前几个显示后几个
<script type="text/javascript"> $(".ul li").each(function(){ if($(this).in ...
- Android常见Crash原因总结(二)
Android平台程序崩溃大家都应该遇到过,force close和ANR应该是大家遇到较多的. 这里把Android平台程序崩溃的各种类型做一个简述和原因列举. 1.ANR(可见ANR): 发生场景 ...
- FusionCharts 2D柱状图和折线图的组合图
1.设计思路 (1)了解组合图的特性以及用法,选用图的类型: (2)设计出两根柱子和两根折线,分开展示. 2.设计步骤 (1)设计页面 Column2DLine.html: <!DOCTYPE ...
- Oracle 子程序参数模式,IN,OUT,IN OUT
IN :用于传入参数. 在调用过程的时候,实参传到该过程中. 在过程内部,形参只读且不能更改. 在过程执行完毕,返回调用环境时候,实参到的值也不会改变 --带IN参数的过程,赋值. create or ...
- 错误代码: 1248 Every derived table must have its own alias
1.错误描述 1 queries executed, 0 success, 1 errors, 0 warnings 查询:SELECT stu_id, (SELECT stu_name FROM t ...