Centos的阿里源-yellowcong
来源:互联网 发布:吉首大学教务网络系统 编辑:程序博客网 时间:2024/06/06 19:18
Centos的源配置,都在目录
/etc/yum.repos.d
,给大家看一下阿里云的源文件,然后需要更新源sudo yum makecache
直接从阿里下载
#直接将阿里的repo下载到本机的源目录wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
阿里源文件-CentOS-Base-Aliyun.repo
#新建repo文件vim CentOS-Base-Aliyun.repo#将下面的源配置,复制到文件,然后保存退出就可以了
#CentOS-Base-Aliyun.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 - mirrors.aliyun.comfailovermethod=prioritybaseurl=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=osgpgcheck=1gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#released updates[updates]name=CentOS-$releasever - Updates - mirrors.aliyun.comfailovermethod=prioritybaseurl=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=updatesgpgcheck=1gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that may be useful[extras]name=CentOS-$releasever - Extras - mirrors.aliyun.comfailovermethod=prioritybaseurl=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=extrasgpgcheck=1gpgkey=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.comfailovermethod=prioritybaseurl=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=centosplusgpgcheck=1enabled=0gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#contrib - packages by Centos Users[contrib]name=CentOS-$releasever - Contrib - mirrors.aliyun.comfailovermethod=prioritybaseurl=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=contribgpgcheck=1enabled=0gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
修改为默认源
CentOS-Base.repo 为系统的默认源,我们覆盖一下就可以了
#更改阿里的源为默认的系统yum源,即:mv /etc/yum.repos.d/CentOS-Base-Aliyun.repo /etc/yum.repos.d/CentOS-Base.repo
配置生成缓存
#通过生成配置缓存,这样软件安装的效率会高一点yum makecache
此时可能会出现HTTP ERORR 404-Not Found Trying othermirror,原因可能是yum查找软件包
使用的过时的缓存(此时可能需要去cd/etc/yum.repos.d目录,找到过时的缓存,把它去掉),
清空更新之后,再次安装软件,问题消失,具体见如下指令:
yum clean all(等同于 yum cleanheaders ; yum cleanpackages);
yum update;这之后,重新运行 yum makecache生成缓存,yummakecache主要目的是将服 务器上的软件包信息在本地缓存,以提高搜索安装软件的速度。(第五步很重要哈,我也是弄了好一会 儿的)
阅读全文
0 0
- Centos的阿里源-yellowcong
- Centos源修改-yellowcong
- CentOS修改Terminal的快捷键-yellowcong
- CentOS之Tomcat的安装-yellowcong
- CentOS修改eth0网卡的名字-yellowcong
- CentOS 7 更换阿里云的源
- CentOS安装阿里云的源
- CentOS 7 yum 源改为阿里 的
- CentOS之iptables-yellowcong
- CentOS 6.7使用阿里云CentOS的yum源
- CentOS之SSH的安装与连接-yellowcong
- CentOS之Mysql安装-yellowcong
- CentOS之Java安装-yellowcong
- Centos之Keepalived安装-yellowcong
- Centos的yum源更换为国内的阿里云
- Centos的yum源更换为阿里云源
- 更换CentOS的下载源为阿里源
- 设置centos的YUM源为国内阿里云源
- Convolutional Neural Networks卷积神经网络
- 人最重要的品质
- jquery.offset()使用方法总结
- 在嵌入式linux串口终端中,如何烧录内核和上传文件?
- json字符串转JSONObject及JSONArray
- Centos的阿里源-yellowcong
- Java线程池原理与使用实例
- 深圳H5精英班户外活动
- 模拟实现memcpy和memmove函数
- 编写一个通信录
- Spring4.0 的validation验证
- c语言---位域
- 前台JSON对象和JSON字符串互转
- 二叉树的建立与遍历详解 菜鸟都能看懂的教程