美文网首页
个人-将你的CentOS 7 配置yum源

个人-将你的CentOS 7 配置yum源

作者: MineG | 来源:发表于2019-07-12 14:40 被阅读0次

将你的CentOS 7 配置yum源

1、方法1

1.1 备份系统的 repo

ls /etc/yum.repos.d/
mkdir -p /etc/yum.repos.d/bak  <-->创建备份目录
/bin/mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak  <-->备份系统原先的源
!ls
image image

1.2 安装阿里云的 repo 源(以CentOS 7 为例)

curl -s -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -s -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all   <-->清除缓存
!ls
image image

1.3 安装软件测试一下

rpm -qa wget   <-->先查看有没有wget(下载工具)软件
yum install -y wget   <-->然后安装
!rpm
image image image

2、方法2

2.1 将方法1的 repo 源移动到 bak

cd /etc/yum.repos.d/
ls
\mv *.repo bak/
image image

2.2 下载对应版本repo文件,放入/etc/yum.repos.d/(操作前请做好相应备份)

  • CentOS5http://mirrors.163.com/.help/CentOS5-Base-163.repo
  • CentOS6http://mirrors.163.com/.help/CentOS6-Base-163.repo
  • CentOS7http://mirrors.163.com/.help/CentOS7-Base-163.repo
ls
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
ls
image image

2.3 生成缓存

yum clean all
yum makecache
image image

【本文图片下载地址】【006-配置yum源】点我快速打开分享(若异常,请私信,万分感谢) 【提取码:5gow 】

今天你学习了吗?若有疑问,请留言、私信或加QQ群:647033350,大家一起进步吧!

相关文章

  • 常用yum源介绍及配置

    参考: CentOS 7下配置本地yum源及yum客户端 Centos7 配置本地源+阿里yum源/epel-yu...

  • 个人-将你的CentOS 7 配置yum源

    将你的CentOS 7 配置yum源 1、方法1 1.1 备份系统的 repo 源 1.2 安装阿里云的 repo...

  • yum源的配置

    centos7yum源配置 本地yum源 网络yum源vim CentOS-Base.repo 后续会更新ubun...

  • CentOS 7 安装php5.6

    CentOS 7 yum 安装php5.6 配置yum源 追加CentOS 6.5的epel及remi源。 # r...

  • 第四周作业

    1、自建yum仓库,分别为网络源和本地源网络源repo配置(centos7): 本地源repo配置(centos7...

  • Centos Issue

    CentOS配置本地Yum源、阿里云Yum源、163Yum源、并配置Yum源的优先级

  • Ambari2.6.2 和HDP2.6.5搭建Hadoop集群-

    配置yum源 把系统自带的源移动到别处,也可以直接删了 配置阿里云基础yum源和epel源 CentOS7默认没有...

  • 安装CentOS 7系统后的必要配置

    配置yum源 请参看我的博客安装CentOS 7双系统(三)——yum源的高级配置。 Linux下读取NTFS格式...

  • Nginx入门1-CentOS7安装

    参考文档nginx: Linux packages 配置CentOS7 yum源 进入/etc/yum.repos...

  • centos环境搭建

    工具安装 初装CentOS环境配置(CentOS7网络配置)Centos更改yum源为国内源 ifconfig y...

网友评论

      本文标题:个人-将你的CentOS 7 配置yum源

      本文链接:https://www.haomeiwen.com/subject/zjgekctx.html