centos7 更换yum、pip源

更换yum源:

centos7

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 clean all

yum makecache

 

更换pip源:

mkdir /root/.pip

vim pip.conf

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

[install]
trusted-host=mirrors.aliyun.com

保存

posted @ 2019-12-24 10:41  土豆真好吃呀  阅读(1685)  评论(0编辑  收藏  举报