• centos 8 安装阿里yum源


    首先进入阿里官网:https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11AmH9v0

    官网中给出了详细的配置流程,这里为了方便复制了一份:

     1 配置方法
     2 通知:CentOS 8操作系统版本结束了生命周期(EOL),Linux社区已不再维护该操作系统版本。建议您切换到Anolis或Alinux。如果您的业务过渡期仍需要使用CentOS 8系统中的一些安装包,请根据下文切换CentOS 8的源。
     3 
     4 1. 备份
     5 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
     6 2. 下载新的 CentOS-Base.repo 到 /etc/yum.repos.d/
     7 centos8(centos8官方源已下线,建议切换centos-vault源)
     8 wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
     9 或者
    10 
    11 curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
    12 centos6(centos6官方源已下线,建议切换centos-vault源)
    13 
    14 wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
    15 或者
    16 
    17 curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
    18 CentOS 7
    19 
    20 wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
    21 或者
    22 
    23 curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
    24 3. 运行 yum makecache 生成缓存

    其中用到了wget,在centos 8 mini版中没有此命令,可以使用curl。

    安装上边的操作安装完以后,下载vim,会得到以下提示信息:

     提示信息中说没有匹配到vim,解决此问题也很简单,将/etc/yum.repos.d/目录下除CentOS-Base.repo其他文件全部删除并执行 yum clean all & yum makecache即可。

  • 相关阅读:
    MD5工具类
    新搭建mysql容易出现问题
    docker自动化部署
    k8s入门案例
    docker单一部署jenkins
    Sentinel 学习-简介
    mysql innerjoin,leftjoin,group by,having
    批量更新 分割list 多线程处理
    redis 3.0+ cluser 集群搭建
    ELK 和 Logstach
  • 原文地址:https://www.cnblogs.com/coolYuan/p/15976943.html
Copyright © 2020-2023  润新知