1. 我是皮皮虾首页
  2. 网站部署

Centos配置国内源

默认centos是国外的源,不管下载还是更新,速度都差强人意,下面介绍如何改为国内源

Centos配置国内源

更换Yum源

### centos7

- wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
- 运行 yum makecache 生成缓存
- sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo

yum clean all     # 清除系统所有的yum缓存
yum makecache     # 生成yum缓存

更换pip源

mkdir -p ~/.pip
vim ~/.pip/pip.conf
[global] 
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn
timeout = 6000

更换docker源

vim /etc/docker/daemon.json

{

"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]

}

python3运行环境

yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

yum install python3-devel -y

原创文章,作者:站长,如若转载,请注明出处:https://wsppx.cn/524/%e7%bd%91%e7%ab%99%e9%83%a8%e7%bd%b2/

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注