精华内容
下载资源
问答
  • centos7 更换163yum
    2016-01-19 17:09:00

    1. cd /etc/yum.repos.d

    2. mv CentOS-Base.repo CentOS-Base.repo.bk

    3. vim CentOS-Base-163.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 - 163.com
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

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

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

    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

     

    4. yum clean

    5. yum makecache

    转载于:https://www.cnblogs.com/lsyu/p/5142765.html

    更多相关内容
  • centos更换163官网yum

    2021-12-22 10:39:12
    因为用centos的时候出现过用yum命令安装不了工具的时候,当时很郁闷,所以特此把更新yum的过程记录下来,方便后来者。1.备份首先备份文件CentOS-Base.repo,如果没有此文件,则跳过此步:mv /etc/yum.repos.d/CentOS...

        因为用centos的时候出现过用yum命令安装不了工具的时候,当时很郁闷,所以特此把更新yum的过程记录下来,方便后来者。

    1.备份

        首先备份文件CentOS-Base.repo,如果没有此文件,则跳过此步:

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

    2.下载

        然后下载对应版本的centos系统的yum源

    2.1 centos 5.x

        如果是centos 5.x则:

    wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
    mv CentOS5-Base-163.repo  
    
    vi /etc/yum.repos.d/CentOS-Base.repo

        如果下载不下来,则直接编辑文件

    vi /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 - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
    
    #released updates 
    [updates]
    name=CentOS-$releasever - Updates - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    gpgcheck=1
    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 - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
    
    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
    
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
    gpgcheck=1
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
    
    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-$releasever - Contrib - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
    gpgcheck=1
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
    

    2.2 centos 6.x

        如果是centos 6.x则:

    wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
    mv CentOS6-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo
    

        如果下载不下来,则直接编辑文件

    vi /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 - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    
    #released updates 
    [updates]
    name=CentOS-$releasever - Updates - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    
    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
    gpgcheck=1
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    
    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-$releasever - Contrib - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
    gpgcheck=1
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    

    3.重建

        最后,清空并且重新生成缓存,就大功告吉了。

    yum clean all
    yum makecache
    展开全文
  • 因为将yum源设置为国内如163 yum后,可以提升软件包安装和更新的速度。用过的朋友就知道了,速度非常快。 第一步,首先备份/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos...

    为何要更新yum源?

    因为将yum源设置为国内如163 yum后,可以提升软件包安装和更新的速度。用过的朋友就知道了,速度非常快。

    第一步,首先备份/etc/yum.repos.d/CentOS-Base.repo

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    

    在这里插入图片描述

    第二步,下载对应版本repo文件, 放入/etc/yum.repos.d/

    这里提供CentOS7下载地址:http://mirrors.163.com/.help/CentOS7-Base-163.repo

    切换到yum.repos.d目录

    cd /etc/yum.repos.d/
    

    下载163 repo文件

    wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
    

    在这里插入图片描述

    接着,运行下面的命令生成缓存:

    yum clean all
    yum makecache
    

    其他国内yum源推荐:
    比如中科大的yum源,安装方法查看:https://lug.ustc.edu.cn/wiki/mirrors/help/centos

    展开全文
  • 安装了CentOS系统,自带的YUM源更新太慢,下面介绍centos6.4配置163 yum源的方法,大家参考使用吧
  • Centos系统更改yum源为163 Centos安装好之后,按照网上教程对yum源进行修改,但更新之后发现总是提示更新失败,发现其中一些是有错误的,下面是我修正后的,有待完善。 请参考 1、进入存放源配置的文件夹  cd /etc/...
  • CentOS 7更换阿里或者163 yum源和epel源

    千次阅读 2020-06-04 13:10:05
    163源 –阿里源 #清理缓存文件 //可以不用执行 #生成新源的元文件 //可以不用执行 #安装epel源 #查看yum源和epel源 #备份默认的yum源 [root@localhost ~]# cd /etc/yum.repos.d/ //进入yum文件目录 [root@...

    #备份默认的yum源
    #下载国内的yum源
    –163源
    –阿里源
    #清理缓存文件 //可以不用执行
    #生成新源的元文件 //可以不用执行
    #安装epel源
    #查看yum源和epel源

    #备份默认的yum源
    [root@localhost ~]# cd /etc/yum.repos.d/ //进入yum文件目录
    [root@localhost yum.repos.d]# ls //查看目录下文件
    CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
    CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
    [root@localhost yum.repos.d]# mv *.repo /tmp //将所有文件移动到tmp目录

    #下载国内的yum源 //二者任意选一个
    –163源
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo //下载163 yum源文件到当前目录
    –阿里源
    [root@localhost yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo //下载阿里yum源文件到当前目录
    –2020-05-15 10:17:49-- http://mirrors.aliyun.com/repo/Centos-7.repo
    Resolving mirrors.aliyun.com (mirrors.aliyun.com)… 202.104.186.227, 119.147.156.227, 113.96.181.211, …
    Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|202.104.186.227|:80… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 2523 (2.5K) [application/octet-stream]
    Saving to: ?etc/yum.repos.d/CentOS-Base.repo?

    100%[===================================================>] 2,523 --.-K/s in 0s

    2020-05-15 10:17:50 (6.18 MB/s) - ?etc/yum.repos.d/CentOS-Base.repo?saved [2523/2523]
    [root@localhost yum.repos.d]# sed -i s/\$basearch/x86_64/g CentOS-Base.repo //将下载的文件中$basearch替换成x86_64
    [root@localhost yum.repos.d]# sed -i s/\$releasever/7/g CentOS-Base.repo //将下载的文件中$releasever替换成7

    #清理缓存文件
    [root@localhost yum.repos.d]# yum clean all
    Loaded plugins: fastestmirror
    Cleaning repos: base extras updates
    Cleaning up everything
    Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
    Cleaning up list of fastest mirrors

    #生成新源的元文件
    [root@localhost yum.repos.d]# yum makecache
    Loaded plugins: fastestmirror
    Determining fastest mirrors

    • base: mirrors.aliyun.com
    • extras: mirrors.aliyun.com
    • updates: mirrors.aliyun.com
      http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: (28, ‘Connection timed out after 30002 milliseconds’)
      Trying other mirror.
      http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - “Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error”
      Trying other mirror.
      base | 3.6 kB 00:00:00
      extras | 2.9 kB 00:00:00
      updates | 2.9 kB 00:00:00
      (1/10): base/group_gz | 153 kB 00:00:00
      (2/10): base/filelists_db | 7.1 MB 00:00:02
      (3/10): base/primary_db | 6.1 MB 00:00:02
      (4/10): base/other_db | 2.6 MB 00:00:00
      (5/10): extras/primary_db | 194 kB 00:00:00
      (6/10): extras/filelists_db | 205 kB 00:00:00
      (7/10): extras/other_db | 122 kB 00:00:00
      (8/10): updates/primary_db | 1.3 MB 00:00:00
      (9/10): updates/other_db | 192 kB 00:00:00
      (10/10): updates/filelists_db | 997 kB 00:00:00
      Metadata Cache Created

    #安装epel源
    [root@localhost yum.repos.d]# yum list|grep epel-release //查看epel文件
    epel-release.noarch 7-11 extras

    [root@localhost yum.repos.d]# yum install epel-release -y //安装epel源
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile

    • base: mirrors.aliyun.com
    • extras: mirrors.aliyun.com
    • updates: mirrors.aliyun.com
      Resolving Dependencies
      –> Running transaction check
      —> Package epel-release.noarch 0:7-11 will be installed
      –> Finished Dependency Resolution

      Installing:
      epel-release noarch 7-11 extras 15 k

      Install 1 Package

    Total download size: 15 k
    Installed size: 24 k
    Downloading packages:
    epel-release-7-11.noarch.rpm | 15 kB 00:00:00
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
    Installing : epel-release-7-11.noarch 1/1
    Verifying : epel-release-7-11.noarch 1/1

    Installed:
    epel-release.noarch 0:7-11

    Complete!

    #查看yum源和epel源
    [root@localhost yum.repos.d]# yum repolist enabled //所有enable 的源
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile

    • base: mirrors.aliyun.com
    • epel: hkg.mirror.rackspace.com
    • extras: mirrors.aliyun.com
    • updates: mirrors.aliyun.com
      repo id repo name status
      base CentOS-7 - Base - mirrors.aliyun.com 10,070
      epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,306
      extras CentOS-7 - Extras - mirrors.aliyun.com 397
      updates CentOS-7 - Updates - mirrors.aliyun.com 722
      repolist: 24,495
    展开全文
  • RHEL7更换yum源为163

    2020-09-16 15:00:40
    RHEL7更换yum源 本文综合两个作者文章 https://www.cnblogs.com/woodman/p/6136868.html https://www.cnblogs.com/lanyincao/p/11829486.html 1,删除注册和订阅提示 查找subscription-manager相关组件: rpm -qa | ...
  • 1.检查yum包 rpm -qa |grep yum 2.删除自带包 rpm -aq | grep yum | xargs rpm -e –nodeps 3.再检查一下 rpm -qa |grep yum 4.下载更新包 wget ...
  • #mv /etc/yum.repos.d/CentOS6-Base.repo /etc/yum.repos.d/CentOS6-Base-163.repo_bak 2.卸载当前yum rpm -qa | grep yum | xargs rpm -e --nodeps 3.下载安装rpm文件 64位系统下载地址: ...
  • CentOS默认yum源是国外的,今天我们把默认源换成国内的163源,163是目前国内最好用的源,速度是相当快的,还有一些比较好的源,比如阿里源。 1,进入yum源配置文件 cd /etc/yum.repos.d 2,备份一下当前的源,以...
  • Centos7 更换yum软件源

    2022-04-05 19:36:50
    yum源的默认仓库文件夹是 /etc/yum.repos.d/,只有在这个目录第一层的.repo结尾的文件,才会被yum读取* 1.下载wget命令 yum install wget -y # wget命令就是在线下载一个url的静态资源 2.备份旧的yum仓库源 cd /etc...
  • centos6换用163yum

    千次阅读 2016-11-28 21:17:06
    CentOS6换用yum
  • 更换yum 163源报错

    2018-07-02 13:54:24
    一般百度更换163yum源,都是如下操作: mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.old cd /etc/yum.repos.d/ wget wget
  • CentOS 7 更新源 – 使用国内 163 yum 源1.切到源目录:[root@localhost ~]# cd /etc/yum.repos.d/[root@localhost yum.repos.d]# lsCentOS-Base.repoCentOS-Debuginfo.repoCentOS-Media.repo CentOS-Vault....
  • 如果只是修改yum的下载源不需要以下步骤,只要修改对应的repo文件里的路径就好了 如果配置本地源需要如下修改mount /dev/sr0 /mnt/cdromfile:///mnt/cdromgpgcheck=0-不管使用哪一家的源,都要下载相对应的repo文件...
  • CentOS7 Yum 更换国内163源查看本机linux版本信息备份/etc/yum.repos.d目录下CentOS-Base.repo文件下载163 yum 源 文件清缓存 yum clean all初始化 yum makecache 查看本机linux版本信息 cat /etc/redhat-release,...
  • 解决centos 6.6 更换yum 163源报错一般百度更换163yum源,都是如下操作:mv/etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo.oldcd/etc/yum.repos.d/wgetwgethttp://mirrors.163....
  • CENTOS 8更换163

    千次阅读 2021-07-07 15:51:16
    转载自163 centos帮助 进入源文件夹 cd /etc/yum.repos.d/ 备份原有源 mv /etc/yum.repos.d/CentOS-Linux-BaseOS.repo /etc/yum.repos.d/CentOS-Linux-BaseOS.repo.backup 下载源 wgethttp://mirrors.163....
  • CentOS7 中把yum更换163

    万次阅读 多人点赞 2018-01-25 13:45:43
    CentOS默认yum源是国外的, 速度无法保证,用起来很不爽,今天我们把默认源换成国内的163源,163是目前国内最好用的源,速度是相当快的,还有一些比较好的源,比如阿里源。  1,首先我们把CentOS7配置为可以上外网...
  • 解决centos 6 更换yum 163源报错 http://mirrors.sohu.com/centos/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found” Trying other mirror. ...
  • RHEL7更换yum

    2019-11-10 14:27:13
    查找subscription-manager相关组件: rpm -qa | grep subscription-manager ...sudo yum remove subscription-manager 查找rhn相关组件 rpm -qa | grep rhn 删除rhn相关组件: sudo yum re...
  • 更换163源】 1)备份当前yum源防止出现意外还可以还原回来 cd /etc/yum.repos.d/ cp /CentOS-Base.repo /CentOS-Base-repo.bak 2)使用wget下载163yum源repo文件 wget ...
  • 由于测试工作的需要,要求自己安装的linux测试系统得有编译软件 gcc,但是自己在使用yum命令在线安装gcc的过程中,提示系统中安装的yum不能访问对应的源地址。 这可能就是常见的yum源不可用的问题。当即就查了相关...
  • Cenots6更换163yum

    2014-10-09 10:52:59
    [b][size=large]如果发现自己的centos的yum源,速度缓慢,或出现异常不能下载安装东西,这个时候,我们可以尝试切换下yum源的配置,cenots自带的yum源,感觉还可以,下面看下如何,切换其他的指定的yum源。...
  • CentOS默认yum源是国外的, 速度无法保证,用起来很不爽,今天我们把默认源换成国内的163源,163是目前国内最好用的源,速度是相当快的,还有一些比较好的源,比如阿里源。 进入yum源配置文件 cd /etc/yum.repos....
  • Centos更换yum源,使用国内163

    万次阅读 2016-06-12 13:47:08
    这里以使用163源为例 确保已安装 下载组件wget yum -y install wget 先备份/etc/yum.repos.d/CentOS-Base.repo (改名) mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup ...
  • yum-utils-1.1.31-24.el7.noarch yum-langpacks-0.4.2-3.el7.noarch yum-metadata-parser-1.1.4-10.el7.x86_64 yum-rhn-plugin-2.0.1-4.el7.noarch PackageKit-yum-0.8.9-11.el7.x86_64 yum-3.4.3-118.el7.n...
  • CentOS更换163yum

    2015-12-04 11:01:36
    163的源还是挺全的,速度也很快。1. 下载repo文件: [root@localhost ~]# cd /etc/yum.repos.d/ [root@localhost ~]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo //注:可以去这里下载相应版本...
  • 更换163yum

    2017-10-28 21:22:00
    mv CentOS6-Base-163.repo CentOS-Base.repo yum clean all yum makecache   #python3 进行pip安装时使用豆瓣的源 pip3 install tornado -i https://pypi.douban.com/simple/   #Centos x64 6.9下载...
  • 更换yum

    2021-07-02 12:16:40
    Centos更换yum源国内的yum源操作步骤(网易)操作步骤(阿里) 更换yum源的目的是,Centos本身使用的是外国yum源,当我们下载一些辅助工具的时候下载速度比较慢,所以将yum更换为国内的yum源,提高下载速度。 国内的...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 3,187
精华内容 1,274
关键字:

更换163yum