arm架构服务器 centos7 更换yum源
创始人
2025-01-17 18:03:38
0

 原创

不再年轻的小方还很年轻2023-02-07 13:23:25博主文章分类:Linux©著作权

文章标签CentOSyum文章分类运维阅读数1049

1.清除缓存

yum clean all

2.创建备份目录

mkdir /etc/yum.repos.d/bak

3.备份

mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak

4.在 /etc/yum.repos.d/目录下创建一下三个文件

文件1: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 - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/7/os/$basearch/
#baseurl=http://mirrors.aliyun.com/centos/7/os/$basearch/
gpgcheck=1
enabled=1
#gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32



#released updates
[updates]
#name=CentOS-7 - Updates - mirrors.aliyun.com
#failovermethod=priority
#baseurl=http://mirrors.aliyun.com/centos/7/updates/$basearch/
#gpgcheck=1
#gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
name=CentOS-$releasever - Updates
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/updates/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32


#additional packages that may be useful
[extras]
#name=CentOS-7 - Extras - mirrors.aliyun.com
#failovermethod=priority
#baseurl=http://mirrors.aliyun.com/centos/7/extras/$basearch/
#gpgcheck=1
#gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
name=CentOS-$releasever - Extras
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/extras/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32



[centosplus]
#name=CentOS-7 - Plus - mirrors.aliyun.com
#failovermethod=priority
#baseurl=http://mirrors.aliyun.com/centos/7/centosplus/$basearch/
#gpgcheck=1
#enabled=0
#gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

name=CentOS-$releasever - Plus
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32



#contrib - packages by Centos Users
#[contrib]
#name=CentOS-7 - Contrib - mirrors.aliyun.com
#failovermethod=priority
#baseurl=http://mirrors.aliyun.com/centos/7/contrib/$basearch/
#gpgcheck=1
#enabled=0
#gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

文件2:ceph.repo

 

[ceph]
name=ceph
baseurl=http://mirrors.163.com/ceph/rpm-jewel/el7/aarch64/
gpgcheck=0
[ceph-noarch]
name=cephnoarch
baseurl=http://mirrors.163.com/ceph/rpm-jewel/el7/noarch/
gpgcheck=0

文件3:epel.repo

 

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://mirrors.aliyun.com/epel/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=http://mirrors.aliyun.com/epel/7/$basearch/debug
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=0

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=http://mirrors.aliyun.com/epel/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=0

5.建立缓存

yum makecache

6.成功

相关内容

热门资讯

第9分钟辅助挂!皇豪互众智能辅... 皇豪互众智能辅助器开挂教程视频分享装挂详细步骤在当今的网络游戏中,皇豪互众智能辅助器作为一种经典的娱...
透视教程!hhpoker德州有... 透视教程!hhpoker德州有挂吗,红龙poker辅助器免费观看,教你教程(有挂教程)您好:红龙po...
必备教程!八闽掌上十八卦脚本,... 必备教程!八闽掌上十八卦脚本,新蛮王辅助器(竟然有挂辅助工具);亲,八闽掌上十八卦脚本这款游戏原来确...
1分钟辅助挂!微信多乐跑得快辅... 微信多乐跑得快辅助工具是一款可以让一直输的玩家,快速成为一个“必胜”的ai辅助神器,有需要的用户可以...
透视脚本!樱花之盛挂,越乡游义... 透视脚本!樱花之盛挂,越乡游义乌透视软件,解说技巧(有挂教学);无需打开直接搜索微信(1367043...
科技新动态!功夫川麻bug,玄... 大家好,今天小编来为大家解答功夫川麻bug这个问题咨询软件客服可以免费测试直接加微信(1367043...
第1分钟辅助挂!闲来山水广西辅... 第1分钟辅助挂!闲来山水广西辅助,小唐家乐园辅助(指导开挂辅助透视软件);无需打开直接搜索打开薇:1...
透视苹果版!青鸟辅助器,财神1... >>您好:财神13张辅助器下载确实是有挂的,很多玩家在这款财神13张辅助器下载游戏中打牌都会发现很多...
一分钟了解!微信小程序多功能辅... 大家好,今天小编来为大家解答微信小程序多功能辅助这个问题咨询软件客服可以免费测试直接加微信(1367...
第一分钟辅助挂!金杯竞技辅助,... 第一分钟辅助挂!金杯竞技辅助,顺欣茶楼软件(指导透视开挂辅助工具)1、下载安装好金杯竞技辅助,进入游...