精华内容
下载资源
问答
  • 修改CentOS源为国内阿里云

    千次阅读 2015-09-04 07:30:35
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/ CentOS 5  wget -O /etc/yum.repos.d/CentOS-Base.rep
    

    1、备份CentOS-Base.repo
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

    2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
    CentOS 5
     wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo 

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

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

    3、之后运行yum makecache生成缓存

    展开全文
  • 修改CentOS yum

    千次阅读 2012-05-16 22:37:50
    解决在CentOS yum下载慢的办法最近在虚拟机下面安装了个CentOS 5.5,使用yum更新时发现下载速度异常慢。可以修改yum的配置文件,把其镜像指向国内的服务器即可。方案一:# cd /etc/yum.repos.d/# mv CentOS-Base....
    解决在CentOS  yum源下载慢的办法
    


    最近在虚拟机下面安装了个CentOS 5.5,使用yum更新时发现下载速度异常慢。可以修改yum的配置文件,把其镜像指向国内的服务器即可。
    方案一:
    # cd /etc/yum.repos.d/
    # mv CentOS-Base.repo CentOS-Base.repo.bak
    # wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
    方案二:
    手段修改CentOS-Base.repo文件,将baseurl设置成baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
    详细配置如下:


    [base]


    name=CentOS-5-Base


    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&repo=os


    #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/


    baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/


    gpgcheck=1


    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5


    #released updates


    [update]


    name=CentOS-5-Updates


    #mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates


    baseurl=http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/


    gpgcheck=1


    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5


    #packages used/produced in the build but not released


    [addons]


    name=CentOS-5-Addons


    #mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons


    baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/


    gpgcheck=1


    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5


    #additional packages that may be useful


    [extras]


    name=CentOS-5-Extras


    #mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras


    baseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/


    gpgcheck=1


    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5


    #additional packages that extend functionality of existing packages


    [centosplus]


    name=CentOS-5-Plus


    #mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus


    baseurl=http://ftp.sjtu.edu.cn/centos/5/centosplus/$basearch/


    gpgcheck=1


    enabled=0


    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5


    #contrib – packages by Centos Users


    [contrib]


    name=CentOS-5-Contrib


    #mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib


    baseurl=http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/


    gpgcheck=1


    enabled=0


    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5


    导入 key
    # rpm –import http://ftp.sjtu.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
    运行,测试
    # yum update  
    全部删除临时文件

    #yum clean all


    原文地址:http://www.cnblogs.com/codebean/archive/2011/05/27/2059900.html

    展开全文
  • 修改linux操作系统 修改centos系统的yum为阿里云详解
  • CentOS 修改源

    2017-03-31 18:26:38
    CentOS源更改为国内163源 1.备份系统源 cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.backup2.更改源为163源 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo mv CentOS6-Base-163....

    CentOS源更改为国内163源
    1.备份系统源
    cd /etc/yum.repos.d
    mv CentOS-Base.repo CentOS-Base.repo.backup

    2.更改源为163源
    wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
    mv CentOS6-Base-163.repo CentOS-Base.repo

    3.执行yum源更新
    yum clean all
    yum makecache
    yum update


    参考:
    1.CentOS6.5系统更改yum源为163

    展开全文
  • Centos源修改-yellowcong

    千次阅读 2017-07-23 11:45:06
    Centos默认有一个自己的,但是是国外的,同Ubuntu类是,天朝的网络比较的费,所以 需要修改成国内的,这样就比较的快,修改的思路将/etc/yum.repos.d/CentOS-Base.repo修改为国内的,我们可以使用wget来获取,...

    Centos默认有一个自己的源,但是源是国外的,同Ubuntu类是,天朝的网络比较的费,所以 需要修改成国内的源,这样就比较的快,修改的思路将/etc/yum.repos.d/CentOS-Base.repo修改为国内的源,我们可以使用wget来获取,然后替换掉/CentOS-Base.repo,然后使用yum update来更新源

    文件替换

    #Centos-7.repo 换成自己的Centos的版本
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

    wget没有安装的情况

    当wget没有安装的情况,我们需要安装wget

    yum -y install wget

    手动替换

    通过 vi来替换源里面的类容,将文件替换

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

    更新源

    源替换后,同ubuntu 类是,需要做更新源的操作

    yum update

    或则使用下面

    yum clean all
    yum makecache```

    阿里云的源

    阿里云源的地址:http://mirrors.aliyun.com/repo/
    这个是CentOS-7的源

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

    网易源

    网易源地址 http://mirrors.163.com/centos/

    网易帮助源地址,http://mirrors.163.com/.help/centos.html

    # 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
    
    展开全文
  • 修改CentOS默认yum为国内yum镜像

    万次阅读 多人点赞 2017-01-07 19:08:41
    有时候CentOS默认的yum不一定是国内镜像,导致yum在线安装及更新速度不是很理想。...修改CentOS默认yum为mirrors.163.com 1、首先备份系统自带yum配置文件/etc/yum.repos.d/CentOS-Base.repo 1
  • 修改centOS yum的方法,修改到阿里云镜像 1、备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/ CentOS 5 ...
  • linux 修改CENTOS镜像

    2016-12-06 10:49:25
    小编就拿Centos来进行做教程。 阿里云Linux安装软件镜像 阿里云是最近新出的一个镜像。得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像。 阿里云Linux安装镜像地址:http://mirrors
  • 修改CentOS默认yum为 mirrors.aliyun.com 1、首先备份系统自带yum配置文件/etc/yum.repos.d/CentOS-Base.repo [root@localhost ~]# cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo....
  • CentOS修改更新

    千次阅读 2018-10-06 11:48:46
    方法步骤: 先进入yum配置文件夹。...mv ./CentOS-Base.repo ./CentOS-Base.repo.bak 下载网易163的。 http://mirrors.163.com/.help/CentOS7-Base-163.repo 【注】此处是CentOS7 把下载下来的文件Cen...
  • CentOS修改镜像

    2020-07-11 12:30:40
    CentOS修改镜像 环境:VMware Workstation 操作系统:CentOS7 操作用户:root 镜像:aliyun 安装步骤: 查看是否安装wget工具 yum list wget 没有安装则使用以下命令安装 yum -y install wget 安全起见...
  • 修改CentOS6.5的更新

    千次阅读 2019-01-12 16:45:15
    最近由于企业项目需要,需要用到CentOS6.5,在修改更新源后,yum命名却无法使用了,显示“File contains no section headers.”。我参考了上面博客的内容,成功解决了问题,为了...国内常用的CentOS源有:  ...
  • 在进行了痛 苦的一天之后终于把这个把这个可以用了,原本只是打算安装个nginx ,可是没有想到redhat 6.4服务器需要注册,无法在线安装,于是各种折腾了大半天之后,发现无果,百度了半天终于找到了下面的方法,...
  • centos修改yum

    2015-12-04 14:52:53
    在安装完CentOS后一般需要修改yum,才能够在安装更新rpm包时获得比较理想的速度。国内比较快的有163、sohu。这里以163为例子。 1. cd /etc/yum.repos.d 2. mv CentOS-Base.repo CentOS-Base.repo.backu
  • CentOS 7 修改pip

    万次阅读 2019-01-24 17:51:34
    建议修改pip,使用国内镜像服务,这里提供的是使用清华提供的pipy国内镜像服务,当然也可以使用阿里等其它镜像。 一次性方法是在pip指令后面加上 -i 属性指定 后面的–trusted-host 是指设置为受信源,否则在...
  • CentOS如何修改yum

    2017-11-30 08:55:09
    我们经常使用CentOS做服务器系统,但是由于国内网络问题,通过yum下载软件的速度经常不理想,这时候,我们就需要修改yum为国内。 备份yum配置文件 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/...
  • 修改CentOS 7的默认yum为阿里yum 1.安装wget # yum install wget -y 2.备份原来的yum # cd /etc/yum.repos.d/ # mv CentOS-Base.repo CentOS-Base.repo_bak 3.下载阿里yum的配置 # wget -O /etc/yum....
  • Centos 8.2 修改镜像

    2020-09-17 11:01:51
    Centos 8.2 修改镜像 备份镜像配置文件: cd /etc/yum.repos.d cp CentOS-Base.repo CentOS-Base.repo.bak cp CentOS-AppStream.repo CentOS-AppStream.repo.bak cp CentOS-Extras.repo CentOS-Extras.repo.bak ...
  • Centos6.9修改yum

    2021-03-20 09:31:11
    Centos6.9修改yum 整个CentOS 6已经“死”了,不应该在任何地方使用
  • CentOS下载源修改

    千次阅读 2018-12-30 22:51:48
    由于centos系统的yum默认是到国外网站下载,有时下载速度会很慢,故我们可以换一个yum的下载,这里我们换一个国内的下载 阿里云镜像。 1. 备份原镜像文件,出错可恢复 cp /etc/yum.repos.d/CentOS-Base.repo /...
  • 修改centos6.5的yum

    2017-09-21 15:55:36
    centos6.5默认的yum改成163的镜像 cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.backup wget http://mirrors.163.com/.help/CentOS6-Base-163.repo mv CentOS6-Base-163.repo CentOS-Base....
  • CentOS修改yum地址

    千次阅读 2018-06-18 15:00:26
    CentOS修改yum地址 CentOS 1、备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/ CentOS 5 wget -O /etc/yum.repos.d...
  • Linux修改centos:7数据

    2019-08-12 00:34:37
    修改下载数据操作1 进行备份2 进入数据的目录3 下载yum的数据配置文件4 清除yum之前的缓存5 建立yum的下载内容缓存注意第三步骤:出现不能访问网易的地址 操作 1 进行备份 mv /etc/yum.repos.d/CentOS-Base....

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 118,558
精华内容 47,423
关键字:

修改centos源