CentOS 6 yum源   更换成阿里云扩展源

第一种:

1、rm -rf /etc/yum.repos.d/*    (执行此操作的时候记得事先装好wget    不然 你就得挂载光盘用rpm装wget了。)
2、wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo http://mirrors.aliyun.com/repo/Centos-6.repo

这个时候,执行 yum repolist的结果如下

[[email protected] ~]# yum repolist

已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com

3.换源成功

第二种:

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/

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

3:执行以下命令生成缓存

yum clean all

yum makecache

4:执行命令 yum repolist,结果如下换源成功

时间: 2024-08-08 18:13:13

CentOS 6 yum源   更换成阿里云扩展源的相关文章

CentOS 7 配置yum本地base源和阿里云epel源

yum仓库的配置文件都存放在/etc/yum.repo.d/目录下,并且文件名必须以.repo结尾. base源:解决rpm依赖性关系 epel源:Extra Packages for Enterprise Linux的缩写,包含许多基源没有软件,仍然保留base源的好处 目录 设置本地base源 设置阿里云epel源 priority的设置 建立缓存 设置本地base源 mount /dev/sr0 /media/dvd/    # 这里的挂载目录随自己创建 vim /etc/yum.repo

[Linux] 纯净ubuntu系统仓库更换为阿里云的源

1.先apt-get update一下当前默认的源,更新完成后先把vim命令安装一下,再修改源仓库为阿里云,否则无法直接编辑文件 2.先添加阿里云的源,编辑文件/etc/apt/sources.list,编辑完再次更新一下 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-security main

centos下将系统预置yum源更换为阿里云源

参考:http://mirrors.aliyun.com/help/centos?spm=5176.bbsr150321.0.0.d6ykiD 步骤1:备份 步骤2:更新CentOS-Base.repo 到/etc/yum.repos.d/ 步骤3:运行yum makecache生成缓存 至此,阿里云yum源更换完成,希望对你有帮助~

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 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo CentOS 6 wget -O /etc/yum

linux 更新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 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo 或者 curl -o /etc/yum.repos.d/C

[转载]linux 更新yum源 改成阿里云源

原文链接:https://www.cnblogs.com/bincoding/p/7892762.html 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/CentOS-Base.repo http://mirrors.aliyu

更换为阿里云的源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo yum makecache 下载rpm包,但是不安装: yum install sshpass-1.05-1.el6.x86_64  -y --downloadonly

【嵌入式硬件Esp32】Ubuntu18.04 更换阿里云软件源

使用Ubuntu 的apt-get来安装软件是总是因为官方源的速度太慢而抓狂. 但是用阿里云的源就很快,下面总结一下如何更换Ubuntu的软件源. 一.备份sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak  二.修改sudo vim /etc/apt/sources.list 将source.list文件内容替换成下面的 deb http://mirrors.aliyun.com/ubuntu/ trusty main restric

利用阿里云的源yum方式安装Mongodb

今天在线上服务器上安装MongoDB,从Mongo官网直接下载链接,结果在下载时发觉速度慢的可怜.迫于无奈,只能找国内的镜像下载.这里选择阿里云的源进行安装,记录如下: 1)在/etc/yum.repos.d 创建一个mongodb-org.repo 源文件 [[email protected] ~]$ cd /etc/yum.repos.d/ [[email protected] yum.repos.d]$ touch mongodb-org.repo [[email protected] y