首页 > 系统相关 >arm架构服务器 centos7 更换yum源

arm架构服务器 centos7 更换yum源

时间:2023-02-07 14:03:14浏览次数:44  
标签:http centos CentOS mirrors centos7 yum aliyun com arm

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.成功

标签:http,centos,CentOS,mirrors,centos7,yum,aliyun,com,arm
From: https://blog.51cto.com/u_15302476/6042052

相关文章

  • 如何实现OpenHarmony的OTA升级
     OTA简介随着设备系统日新月异,用户如何及时获取系统的更新,体验新版本带来的新的体验,以及提升系统的稳定性和安全性成为了每个厂商都面临的严峻问题。OTA(OvertheAir)......
  • 使用 pycharm pip install 问题
    1. 出现trusted_host问题,说明没有配置信任证书,需要在pip.ini里面配置trusted_host;2.设置代理:settings>HTTPProxy>ManualSet127.0.0.1>ConnectionTest......
  • VMWARE安装CentOS7
                           安装完成后,把启动盘改成如下,重新启动,进入系统 ......
  • Pycharm + robotframework自动化框架搭建
    前面讲过在Eclipse环境中搭建robotframework框架,这里基于PyCharm开发工具说说怎么实现写robot自动化。(使用体验:Robot还是配Eclipse比较好使)一、基础环境配置1.安装Pyt......
  • pycharm无限续30天试用
    使用步骤:1.打开pycharm忽略错误2.下载如下链接zip并解压,将jar包拖拽到pycharm即可续期30天试用ps:仅限Windows使用https://files.cnblogs.com/files/blogs/780699/pyc......
  • centos7中关闭防火墙命令
    1、命令行界面输入命令“systemctlstatusfirewalld.service”并按下回车键。2、然后在下方可以查看得到“active(running)”,此时说明防火墙已经被打开了。3、在命令行中......
  • pycharm格式的正则替换key:value到‘key’:'value',
    CTRL+R进入替换......
  • Yum 安装 Elasticsearch + Kibana教程
    Yum安装Elasticsearch+Kibana教程安装Elasticsearch准备elasticsearch(下面称为ES)是一个基于Lucene的搜索服务器。所以他需要java的环境即jdk#yuminstalljava*#vim......
  • HarmonyOS初探01——下载安装DevEco Studio
    HUAWEIDevEcoStudio(简称DevEcoStudio)是基于IntelliJIDEACommunity开源版本打造,面向华为终端全场景多设备的一站式集成开发环境(IDE),为开发者提供工程模板创建、开发、编......
  • 用 HarmonyOS ArkUI 来开发一个健康饮食应用
    本文演示如果在DevEcoStudio3里面,用HarmonyOS的ArkUI来开发一个健康饮食应用。体验HarmonyOS3最新API9!获取HarmonyOS应用HarmonyOS的ArkUI来开发一个健康饮食的ArkUI程......