加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

yum源

发布时间:2020-12-15 23:08:26 所属栏目:安全 来源:网络整理
导读:为各版本linux添加yum源 这里我就以Centos 6.5 来做演示 首先先百度下对应版本的yun源 国内比较好的yum源主要是阿里云、163以及搜狐的,更新yum的命令如下: //更新为阿里云的源 wget -O /etc/yum.repos.d/CentOS-Base.repo http: //mirrors.aliyun.com/repo

为各版本linux添加yum源

这里我就以Centos 6.5 来做演示 首先先百度下对应版本的yun源

国内比较好的yum源主要是阿里云、163以及搜狐的,更新yum的命令如下:

//更新为阿里云的源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo //更新为163的源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo //更新为搜狐的源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

1.进入yum源配置目录

cd /etc/yum.repos.d

2.做什么改动前最后都做个备份 以防出错 还能恢复

mv CentOS-Base.repo CentOS-Base.repo.bak

3.下载新的CentOS-Base.repo 到/etc/yum.repos.d/

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

4.运行yum makecache生成缓存

yum clean all yum makecache

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读