CentOS 能否配置 yum的下载镜像的优先级

weixin_38050493 weixin_38050493 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

我装的CentOS系统,在内网部署了一台更新源,是用以前更新的软件包做成的(通过createrepo)。现在又想部署新的环境,我希望用yum更新或安装软件的时候,如果内网的软件版本和官方映像上的一致,就下载内网的;如果官网的要新就下官网的。各位可有什么好的方法?


内网网速是千兆的,二下外网只有几十K,很明显内网的网速要快,fastestmirror插件似乎不能准确的工作,通常是下载外网的而不下内网的,我如果把内网的优先级设置高一些,结果,软件版本就以内网为标准了,即使外网的要新,也不下外网的了。
...全文

相关推荐

centos9ISO镜像及yum源配置文件

centos9_StreamISO镜像及yum源配置文件和配置方法

qq_40655080

CentOS配置本地yum源

CentOS配置本地yum源,本文档详细介绍了CentOS配置本地yum源的操作步骤,最全

阿祥仔

CentOS配置本地yum源/阿里云yum源/163yuan源并配置yum源的优先级

主要介绍了CentOS配置本地yum源/阿里云yum源/163yuan源并配置yum源的优先级,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

weixin_38735804

centos7 本地yum源配置

1.查看系统本身存在的版本 rpm -qa | grep yum 2.卸载centos7上存在的yum安装源包 rpm -e 源包 --nodeps 3.下载yum源包(http://mirrors.163.com/centos/7/os/x86_64/Packages/) yum-metadata-parser-1.1.4-10.el7.x86_64 PackageKit-yum-1.0.7-6.el7.centos.x86_64 yum-utils-1.1.31-40.el7.noarch 下方两个一起装 yum-plugin-fastestmirror-1.1.31-40.el7.noarch yum-langpacks-0.4.2-7.el7.noarch yum-3.4.3-150.el7.centos.noarch yum-rhn-plugin-2.0.1-6.el7.noarch 4.安装yum源包 rpm -ivh yum* 5.创建配置文件(/etc/yum.repos.d/CentOS-Base.repo) vi /etc/yum.repos.d/CentOS-Base.repo [base] name=CentOS-$releasever - Base - 163.com #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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-$releasever - Updates - 163.com #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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-$releasever - Extras - 163.com #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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=$releasever - 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 每一个baseurl的centos后都改成自己系统的版本号 6.执行命令 yum clean all yum makecache yum install telnet

danpianjiliuqiang

Linux系列:RPM安装 + yum安装 + 源码安装的区别&优缺点、CentOS下的yum安装 + yum源配置 + yum镜像源、Linux下的源码安装

RPM安装 + yum安装 + 源码安装的区别&优缺点、CentOS下的yum安装 + yum源配置 + yum镜像源、Linux下的源码安装

坦笑&&life
评论 1
收藏 已收藏
分享
返回顶部