linux中配置yum源_redhat7网络yum源配置

linux中配置yum源_redhat7网络yum源配置本人使用的方法一,成功配置,方法二没测过,可以作为参考方法一:1.确保RHEL5中已经安装了yum[root@lvs-master~]#rpm-qa|grepyumyum-metadata-parser-1.1.2-3.el5yum-updatesd-0.9-2.el5yum-3.2.22-26.el5yum-security-1.1.16-13.el5yum-

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

linux中配置yum源_redhat7网络yum源配置

本人使用的方法一,成功配置,方法二没测过,可以作为参考

方法一:

1.确保RHEL5中已经安装了yum

 

[root@lvs-master ~]# rpm -qa |grep yum
yum-metadata-parser-1.1.2-3.el5
yum-updatesd-0.9-2.el5
yum-3.2.22-26.el5
yum-security-1.1.16-13.el5
yum-rhn-plugin-0.5.4-15.el5

 

2.修改源配置文件 #vim /etc/yum.repos.d/CentOS-Base.repo

 

(如果目录下没有.repo文件自己创建一个)

 

[base]
name=CentOS-5-Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#released updates
[update]
name=CentOS-5-Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#packages used/produced in the build but not released
[addons]
name=CentOS-5-Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that may be useful
[extras]
name=CentOS-5-Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5-Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5-Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# vi dag.repo
[dag]
name=Dag RPM Repository for RHEL5
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el5/en/$basearch/dag/
enabled=1
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt

 

3. 导入key 

 

 

 

#rpm --import http://ftp.sjtu.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5

 

4. 运行,测试 

 

#yum update

 

 

5.clean操作

 

#yum clean all

 

方法二:

 

# cd /etc/yum.repos.d/
#mv CentOS-Base.repo CentOS-Base.repo.bak
#wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

该文件内容如下:

 

 

[base]
name=CentOS-5 - Base
baseurl=http://centos.ustc.edu.cn/centos/5/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#released updates
[update]
name=CentOS-5 - Updates
baseurl=http://centos.ustc.edu.cn/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
baseurl=http://centos.ustc.edu.cn/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
baseurl=http://centos.ustc.edu.cn/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
baseurl=http://centos.ustc.edu.cn/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
baseurl=http://centos.ustc.edu.cn/centos/5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#packages in testing
[testing]
name=CentOS-5 - Testing
baseurl=http://centos.ustc.edu.cn/centos/5/testing/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

linux中配置yum源_redhat7网络yum源配置

 

 

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/170099.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • axios实现跨域三种方法_vue跨域配置

    axios实现跨域三种方法_vue跨域配置axios地址

    2022年9月11日
    0
  • leetcode数组汇总_leetcode经典题

    leetcode数组汇总_leetcode经典题原题链接给定一个由整数数组 A 表示的环形数组 C,求 C 的非空子数组的最大可能和。在此处,环形数组意味着数组的末端将会与开头相连呈环状。(形式上,当0 <= i < A.length 时 C[i] = A[i],且当 i >= 0 时 C[i+A.length] = C[i])此外,子数组最多只能包含固定缓冲区 A 中的每个元素一次。(形式上,对于子数组 C[i], C[i+1], …, C[j],不存在 i <= k1, k2 <= j 其中 k1 % A.leng

    2022年8月8日
    3
  • 中标麒麟7.0+linux内核版本,中标麒麟7.0下载

    中标麒麟7.0+linux内核版本,中标麒麟7.0下载中标麒麟v7.064位系统是由我国自主研发的一款电脑上使用的linux操作系统,这款电脑系统在经过大量的试验和改进之后,现在的体验是非常不错的,而且性能一级棒,欢迎有兴趣的用户来IT猫扑下载。中标麒麟7.0安装教程1、首先到本页下载中标麒麟7.064位系统,由于系统是iso格式的镜像文件,因此需要通过刻录软件将系统刻录到光盘再进行安装2、插入已刻录“中标麒麟桌面操作系统”的系统光盘,并设置电脑…

    2022年10月21日
    0
  • 如何利用python读excel数据_python在excel应用实例

    如何利用python读excel数据_python在excel应用实例文章目录python读取excel表数据的方法:完整的程序代码python读取excel表数据的方法:首先安装Excel读取数据的库xlrd;然后获取Excel文件的位置并且读取进来;接着读取指定的行和列的内容,并将内容存储在列表中;最后运行程序即可。python读取excel表数据的方法:安装Excel读取数据的库—–xlrd直接pipinstallxlrd安装xlrd库#引入Excel库的xlrdimportxlrd获取Excel文件的位置并且读取进来#导入需要读取Exc

    2022年9月27日
    0
  • 关于String转jsonArray,jsonArray转json,json写入实体类

    关于String转jsonArray,jsonArray转json,json写入实体类工作要写个接收数据的接口,基于springMVC的,不了解,补充学习下json的用法1用的是这个jar包,虽然用的时候要导6个包,但用起来很方便。importnet.sf.json.JSONObject;2单个的jsonResult实体类对应json的字段Stringstr="{\"result\":\"success\",\"message\":\"成功!\"}…

    2022年6月20日
    46
  • 小程序生命周期(onLaunch、onShow、onHide、onReady、onLoad、onUnload)[通俗易懂]

    小程序生命周期(onLaunch、onShow、onHide、onReady、onLoad、onUnload)[通俗易懂]onlaunch:当小程序初始化完成时,会触发onLaunch(全局只触发一次)(app.js);onLoad:页面加载小程序注册完成后,加载页面,触发onLoad方法。一个页面只会调用一次,可以在onLoad中获取打开当前页面所调用的query参数(页面js)。onShow:页面显示页面载入后触发onShow方法,显示页面。每次打开页面都会调用一次(比如当小程序有后台进入到…

    2022年6月20日
    93

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号