centos 7-aarch64如何替换yum源「建议收藏」

centos 7-aarch64如何替换yum源「建议收藏」一、进入yum.repo.d[root@node-01~]#cd/etc/yum.repos.d/[root@node-01yum.repos.d]#lsCentOS-Base.repoCentOS-Sources.repo二、备份原yum源[root@node-01yum.repos.d]#mkdiryum-back[root@node-01yu…

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

Jetbrains全系列IDE稳定放心使用

一、进入yum.repo.d

[root@node-01 ~]# cd /etc/yum.repos.d/

[root@node-01 yum.repos.d]# ls
CentOS-Base.repo  CentOS-Sources.repo

二、备份原yum源

[root@node-01 yum.repos.d]# mkdir yum-back

[root@node-01 yum.repos.d]# mv CentOS-* yum-back/

[root@node-01 yum.repos.d]# ls
yum-back

三、替换yum源为阿里源

[root@node-01 yum.repos.d]# cat 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-$releasever - Base
baseurl=https://mirrors.aliyun.com/centos-altarch/$releasever/os/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#released updates 
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.aliyun.com/centos-altarch/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

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

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.aliyun.com/centos-altarch/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

[root@node-01 yum.repos.d]# cat epel.repo 
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch/debug
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/SRPMS
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

四、替换认证秘钥

[root@node-01 yum.repos.d]# cd /etc/pki/rpm-gpg/

[root@node-01 rpm-gpg]# ls
RPM-GPG-KEY-CentOS-7  RPM-GPG-KEY-CentOS-7-aarch64
[root@node-01 rpm-gpg]# cat RPM-GPG-KEY-CentOS-7
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU/Linux)

mQINBFOn/0sBEADLDyZ+DQHkcTHDQSE0a0B2iYAEX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0QXJjaC9BQXJjaDY0KSA8c2VjdXJpdHlAY2VudG9zLm9y
Zz6JATkEEwECACMFAlW3h2gCGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAK
CRBsfLbvMF1J1pSFCACQbLvjwCFdgr0DpVJZ0o50Dcl8jYzZtd/NZOBNYXi/TQza
c6DFhiAj72zkgOGb+xznUXJJIiOLCgyJBUdJQSRx/EfVb9ftd4kSOA/wErOhDV71
Hyww9M/gz82SjHF9qq8ofDto6ZfJMfiLX4aZwR39jZzS5Gm+bH5FfgxlwG0V88fu
aKlzsn3p975uD659tSKae4xLysxkBG6oDaXvnWI2/UGC724gN+R3aKe9kI0wk8wA
h5Qzf7+jRk0qb859rryno1rBpuzxJcwg5qvN2PXG3xDFOHG+3LX3mV3UnVAqCjHO
zyGnzAAiNfBwgMyu6bu4lXd4hbZKy73RwnouQkuA
=qiwp
-----END PGP PUBLIC KEY BLOCK-----

五、运行yum生成缓存

[root@node-01 ~]#  yum makecache

[root@node-01 ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64

[root@node-01 ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

六、验证

[root@node-01 ~]# yum -y install gcc-c++

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.aarch64 0:4.8.5-36.el7 will be installed
--> Processing Dependency: libstdc++-devel = 4.8.5-36.el7 for package: gcc-c++-4.8.5-36.el7.aarch64
--> Processing Dependency: libstdc++ = 4.8.5-36.el7 for package: gcc-c++-4.8.5-36.el7.aarch64
--> Processing Dependency: gcc = 4.8.5-36.el7 for package: gcc-c++-4.8.5-36.el7.aarch64
......
......
......
Installed:
  gcc-c++.aarch64 0:4.8.5-36.el7                                                                                                       

Dependency Installed:
  cpp.aarch64 0:4.8.5-36.el7    gcc.aarch64 0:4.8.5-36.el7    libmpc.aarch64 0:1.0.1-3.el7    libstdc++-devel.aarch64 0:4.8.5-36.el7   

Dependency Updated:
  libgcc.aarch64 0:4.8.5-36.el7              libgomp.aarch64 0:4.8.5-36.el7              libstdc++.aarch64 0:4.8.5-36.el7             

Complete!

 

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

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/189560.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • 比特币p2p协议_协议栈p2p

    比特币p2p协议_协议栈p2p比特币网络节点具有所有四个功能(理论上的很多来自《精通比特币》):钱包:用户钱包也可以作为全节点的一部分(桌面比特币客户端中比较常见);当前,越来越多的用户钱包都是SPV节点(诸如智能手机)矿工:挖矿节点通过运行在特殊硬件设备上的工作量证明(proof-of-work)算法,以相互竞争的方式创建新的区块,一些挖矿节点同时也是全节点,保有区块链的完整拷贝;还有一些参与矿池挖矿的节点是轻量级节…

  • chrome小恐龙源代码_chrome小恐龙代码

    chrome小恐龙源代码_chrome小恐龙代码Chrome小恐龙前端修改代码代码总结偶然间发现谷歌浏览器的离线小恐龙游戏,上网查找的攻略总结。Chrome小恐龙是什么?在Chrome(谷歌浏览器)断网之后访问在线页面,如a.com会出现以下

  • 常用正则表达式—邮箱(Email)

    常用正则表达式—邮箱(Email)本文针对有一点正则基础的同学,如果你对正则一无所知,请移步“正则表达式30分钟入门教程”学习。要验证一个字符串是否为邮箱的话,首先要了解邮箱账号的格式。我尝试过在网上找出一个标准的格式,但是很遗憾我没有找到。我也尝试使用RFC标准来判断邮箱的格式,但是也没有结果。网上些博客说不应该使用RFC标准来验证邮箱是否合法,有兴趣的可以看看“isthisemailval

  • IIS防盗链技术

    IIS防盗链技术 “盗链”的定义是:此内容不在自己服务器上,而通过技术手段,绕过别人放广告有利益的最终页,直接在自己的有广告有利益的页面上向最终用户提供此内容。常常是一些名不见经传的小网站来盗取一些有实力的大网站的地址(比如一些音乐、图片、软件的下载地址)然后放置在自己的网站中,通过这种方法盗取大网站的空间和流量。  为什么会产生盗链  一般浏览有一个重要的现象就是一个完整的页面并不是一次全部传送到客户

  • Silverlight群建立了,欢迎加入SilverlightQQ群!

    Silverlight群建立了,欢迎加入SilverlightQQ群!Silverlight群建立了,欢迎加入SilverlightQQ群,一切关于WPF(Windows Presentation Foundation)&Silverlight(RIA程序开发),欢迎大家上传Silverlight共享文档 加群者:”Silverlight爱好者或WPF爱好者”即可,拒绝潜水份子…群号:50992947论坛上的http://topic.csdn.n

  • pytest的使用_pytest测试框架从入门到精通

    pytest的使用_pytest测试框架从入门到精通Pytest执行用例规则Pytest在命令行中支持多种方式来运行和选择测试用例1.对某个目录下所有的用例pytest2.对模块中进行测试pytesttest_mod.py3.对文件夹进行

发表回复

您的电子邮箱地址不会被公开。

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