更换阿里云yum源

发表于 LINUX 分类,标签:
yum -y install wget curl
mkdir /etc/yum.repos.d/bak
mv /etc/yum.repos.d/* /etc/yum.repos.d/bak/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache

 

mkdir /etc/yum.repos.d/bak
mv /etc/yum.repos.d/* /etc/yum.repos.d/bak/
curl http://mirrors.aliyun.com/repo/Centos-7.repo > /etc/yum.repos.d/CentOS-Base.repo  
curl http://mirrors.aliyun.com/repo/epel-7.repo > /etc/yum.repos.d/epel.repo 
yum clean all
yum makecache


cd ~
mkdir .pip
vim ~/.pip/pip.conf


[global]
index-url=http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com


[global]
timeout=6000
index-url=http://pypi.douban.com/simple/
[install]
use-mirrors=true
mirrors=http://pypi.douban.com/simple/
trusted-host=pypi.douban.com


0 篇评论

发表我的评论