Linux换源笔记

发布于 2022-12-10 19:32 181 字 1 min read ... 访问量

linux配置centos8yum配置,详细保姆图文教学

centos8

yum 配置

我只推荐使用网络 yum

  • 网络源:阿里 yum centos8
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    centos7
    wget -O /etc/yum.repo.d/CentOS-Linux-BaseOS.repo http://mirrors.aliyun.com/repo/Centos-8.repo
    等等
  • 本地 yum 挂载:速度慢,不建议捏。
  1. 第一步:
    • 检查 dvd 光驱是否连接,使用lsblk df查看都可以
  2. 第二步:
    • 创建挂载点mkdir /mnt/a,并用mount /dev/cdrom /mnt/a进行挂载
    • 使用df -hT /mnt/a查看挂载记录
  3. 第三步:
    • 使用cd /etc/yum.repo.d/到 yum 配置目录
    • mkdir /aa
    • 进行备份mv *.repo aa
    • 拷贝一份 yum.base.repo 出来cp -p . (这里的点是当前目录意思)
  4. 第四步:
    • vim /etc/yum.Base.repo
    • 改目录为创建的挂载点
    • wq 保存

麻烦捏,直接网络源就好了。

喜欢的话,留下你的评论吧~

... 访问量
© 2021 - 2026 Vullfin @VV
Powered by theme astro-koharu · Inspired by Shoka