开发者社区> 问答> 正文

centos5.8怎么更新yum源,手动修改配置文件变量404

centos5.8怎么更新yum源

展开
收起
游客igbjc65lcktqo 2020-08-11 16:35:14 2316 0
1 条回答
写回答
取消 提交回答
  • 专注大数据、架构框架、集群、中间件、分布式、数据库、监控、开源、基础架构等技术分享,助力数字化转型。

    我的yum源配置如下

    vim /etc/yum.repos.d/CentOS-Base.repo

    CentOS-Base.repo

    The mirror system uses the connecting IP address of the client and the

    update status of each mirror to pick mirrors that are updated to and

    geographically close to the client. You should use this for CentOS updates

    unless you are manually picking other mirrors.

    If the mirrorlist= does not work for you, as a fall back you can try the

    remarked out baseurl= line instead.

    [base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/ gpgcheck=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

    #released updates

    [updates] name=CentOS-$releasever - Updates #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/ gpgcheck=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

    #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/ gpgcheck=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

    #additional packages that may be useful [extras] name=CentOS-$releasever - Extras #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/ gpgcheck=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

    #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/ gpgcheck=0 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

    最后 yum makecache

    2020-08-12 11:43:33
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
低代码开发师(初级)实战教程 立即下载