常用镜像地址
有时候需要设置常用的镜像地址,找到了一些可能能用的镜像地址,留作以后备份使用:
阿里云镜像站 https://developer.aliyun.com/mirror/
网易云镜像站 http://mirrors.163.com/
清华大学镜像站 https://mirror.tuna.tsinghua.edu.cn/
华中科技大镜像站 http://mirror.hust.edu.cn/
北京交通大学镜像站 https://mirror.bjtu.edu.cn/
中国科学技术大学镜像站 https://mirror.bjtu.edu.cn/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
兰州大学:http://mirror.lzu.edu.cn/
搜狐镜像站 http://mirrors.sohu.com/
豆瓣:http://pypi.douban.com/simple/
修改centos7的yum的镜像源地址
1、 备份系统自带的yum源配置文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、删除其他的.repo文件
rm -rf /etc/yum.repos.d/*.repo
3、设置镜像地址
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
4、缓存处理
#清除缓存
yum clean all
#创建缓存
yum makecache
5、更新
yum update -y
6、使用yum安装软件时提示 “没有可用软件包”时,可以通过安装EPEL(Extra Packages for Enterprise Linux,企业版Linux额外包),RHEL分布非标准包的社区类库来更新epel第三方软件库后,再使用yum命令安装对应的软件包,可能就可以了。
#更新epel第三方软件库
yum install -y epel-release