当前位置: 首页 > news >正文

centos-stream-9 centos9 配置国内yum源 阿里云源

源配置

tips:
yum配置文件路径

/etc/yum.repos.d/centos.repo

1.备份源配置 [Very Important!]
mv /etc/yum.repos.d/centos.repo /etc/yum.repos.d/centos.repo.backup

2.Clean Cache:

yum clean all
3.Backup the Old CentOS-Base.repo
If exist this file.
cd /etc/yum.repos.d/
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
4.Create the new CentOS-Base.repo file with vim or other editor , and save to the directory '/etc/yum.repos.d/'  fill with the following contents below:
    # 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 - mirrors.aliyun.com#failovermethod=prioritybaseurl=https://mirrors.aliyun.com/centos-stream/$stream/BaseOS/$basearch/os/http://mirrors.aliyuncs.com/centos-stream/$stream/BaseOS/$basearch/os/http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/BaseOS/$basearch/os/gpgcheck=1gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official#additional packages that may be useful#[extras]#name=CentOS-$releasever - Extras - mirrors.aliyun.com#failovermethod=priority#baseurl=https://mirrors.aliyun.com/centos-stream/$stream/extras/$basearch/os/#        http://mirrors.aliyuncs.com/centos-stream/$stream/extras/$basearch/os/#        http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/extras/$basearch/os/#gpgcheck=1#gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official#additional packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever - Plus - mirrors.aliyun.com#failovermethod=prioritybaseurl=https://mirrors.aliyun.com/centos-stream/$stream/centosplus/$basearch/os/http://mirrors.aliyuncs.com/centos-stream/$stream/centosplus/$basearch/os/http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/centosplus/$basearch/os/gpgcheck=1enabled=0gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official[PowerTools]name=CentOS-$releasever - PowerTools - mirrors.aliyun.com#failovermethod=prioritybaseurl=https://mirrors.aliyun.com/centos-stream/$stream/PowerTools/$basearch/os/http://mirrors.aliyuncs.com/centos-stream/$stream/PowerTools/$basearch/os/http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/PowerTools/$basearch/os/gpgcheck=1enabled=0gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official[AppStream]name=CentOS-$releasever - AppStream - mirrors.aliyun.com#failovermethod=prioritybaseurl=https://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/os/http://mirrors.aliyuncs.com/centos-stream/$stream/AppStream/$basearch/os/http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/AppStream/$basearch/os/gpgcheck=1gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official

Press the “ESC” key and input “:wq” to save and quit vim, if you use vim.

阿里源配置, ok5. 更新缓存 
  yum makecache && yum update

or, you can use the follow tow commands.

yum makecache

then

yum update

Waiting for the “Complete!” notice in your terminal.

6.Finished.

http://www.lryc.cn/news/120309.html

相关文章:

  • 查看单元测试用例覆盖率新姿势:IDEA 集成 JaCoCo
  • js和nodejs如何将文件切片和合并
  • Java内存模型
  • [国产MCU]-BL602开发实例-看门狗定时器(WDG)
  • 28 | Boss直聘数据分析
  • Hash 缓存
  • 腾讯云CVM服务器标准型S5性能CPU处理器测试
  • 【左神算法刷题班】第16节:累加和为k的数组、逆序对问题、约瑟夫环问题
  • 【React | 前端】在React的前端页面中,判断某个变量值是否被定义?根据是否定义显示不同的内容?
  • 机器学习深度学习——seq2seq实现机器翻译(数据集处理)
  • 锁定Mac的内置键盘,防止外接键盘时的误触
  • 由于找不到d3dx9_42.dll,无法继续执行代码。重新安装程序可能会解决此问题
  • 解决Vue+Element UI使用el-dropdown(下拉菜单)国际化时菜单label信息没有刷新的情况
  • Prometheus技术文档-概念
  • JQuery判断radio(单选框)是否选中和获取选中值方法总结
  • Effective Python 读书笔记
  • Monge矩阵
  • (5)所有角色数据分析页面的构建-5
  • 专利进阶(三):专利撰写资料汇总
  • maven编译始终提示无效的目标发行版的解决方法
  • 系统架构设计高级技能 · 软件可靠性分析与设计(三)【系统架构设计师】
  • 界面控件DevExpress WPF Chart组件——拥有超快的数据可视化库!
  • 【网络安全】等保测评安全物理环境
  • Intellij IDEA 导入 eclipse web 项目详细操作
  • 安卓java A应用切换到B应用,来回切换不执行OnCreate
  • 【Linux】批量恢复文件权限
  • 数据可视化(八)堆叠图,双y轴,热力图
  • 前台自动化测试:基于敏捷测试驱动开发(TDD)的自动化测试原理
  • 基于SLAM的规划算法仿真复现|SLAM|智能规划
  • sqlite3多线程操作问题