01_Linux软件源配置

 

一、国内软件源

  1. 阿里源:https://mirrors.aliyun.com/
  2. 清华大学:https://mirrors.tuna.tsinghua.edu.cn/
  3. 中科大 : https://mirrors.ustc.edu.cn/

有很多,大家可以百度。

二、以Centos 6.7为例配置

1.备份系统默认的源配置

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

2.进入阿里源官网

 

3.下载新的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/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 

curl -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 

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

 

 三、生成yum缓存

yum makecache

 

posted @ 2018-01-20 19:13  短毛兔  阅读(268)  评论(0编辑  收藏  举报