美文网首页
CentOS配置网络yum源

CentOS配置网络yum源

作者: misaka去年夏天 | 来源:发表于2017-05-21 11:43 被阅读0次

    centOS自带的yum源,一般软件包的版本比较低,在需要编译安装一些服务和软件时,会发生缺包少包的问题。可以通过配置网络yum源来升级本地的软件包。

  CentOS6:

# rm -rf etc/yum.repos.d/*                             #删除原先的yum配置文件

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

# sed -i 's/$releasever/6.8/g' /etc/yum.repos.d/CentOS-Base.repo

# yum clean all             #清除yum缓存

# yum list                     #生成新的yum缓存(升级软件包)

CentOS7:

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

[root@localhost ~]# sed -i 's/$releasever/7.2.1511/g' /etc/yum.repos.d/CentOS-Base.repo(定位到镜像站的CentOS7.2)

[root@localhost ~]# sed -i 's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo(定位到镜像站的CentOS7.0)

[root@localhost ~]# yum clean all

[root@localhost ~]# yum list

相关文章

  • yum源的配置

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

  • 第四周作业

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

  • 网络http的yum源

    网络http的yum源 配置网络http的yum源比较简单,我们先到CentOS官方的yum源镜像网址选择合适的y...

  • Centos Issue

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

  • 常用yum源介绍及配置

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

  • centos环境搭建

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

  • 69.修改网络yum源

    网络yum源保存的位置在/etc/yum.repos.d/Centos-Base.repo。 配置说明[base]...

  • php5.6 install

    配置yum源 追加CentOS 6.5的epel及remi源。 以下是CentOS 7.0的源。 使用yum li...

  • CentOS 7 安装php5.6

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

  • Linux配置C++11编译环境

    配置yum源 此处我们使用163的yum源,配置如下 首先备份/etc/yum.repos.d/CentOS-Ba...

网友评论

      本文标题:CentOS配置网络yum源

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