41、linux-yum源管理-阿里云仓库配置

·yum的管理

  1、清理原有的yum配置 

    ·把本地或者官方的/etc/yum.repos.d/路径下的所有repo配置文件移走

    ·确保/etc/yum.repos.d/这里没有其它文件

  2、下载配置阿里巴巴开源镜像站官网配置:https://developer.aliyun.com/mirror/

    ·在这个位置/etc/yum.repos.d/下载阿里云的yum源文件

    ·登陆阿里云官方网站:https://developer.aliyun.com/mirror/

                 

         

    ·wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

      ···-O指定下载位置:/etc/yum.repos.d/

      ···CentOS-Base.repo文件名

                   

     ·再下载epel源(企业版linux的扩展包):wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo

                   

  3、更新yum仓库

    ·运行 yum makecache 生成缓存

  4、执行安装软件即可

 

 

 

#列出仓库列表:yum repolist

 

posted @ 2024-06-30 22:04  little小新  阅读(11)  评论(0编辑  收藏  举报