常用国内镜像源

CentOS 换源

1、yum -y install wget

2、备份旧源
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

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


4、添加EPEL

CentOS 6:
wget -O /etc/yum.repos.d/epel-6.repo http://mirrors.aliyun.com/repo/epel-6.repo

CentOS 7:
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

5、清理缓存并生成新的缓存
yum clean all
yum makecache

Ubuntu Linux 换源

/etc/apt/sources.list 编辑软件源配置文件

apt-get update 更新索引

apt-get upgrade 更新软件

apt-get dist-upgrade 升级

apt-get clean 删除缓存包

apt-get autoclean 删除未安装的deb包

kali源

# kali官方源
deb http://http.kali.org/kali kali-rolling main no-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib

# 中科大Kali镜像源
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib

# 阿里云Kali镜像源
deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib

# 清华大学Kali镜像源
deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free

# 浙大Kali镜像源
deb http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free

# 东软大学Kali镜像源
deb http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib
deb-src http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib

# 重庆大学Kali镜像源
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib

linux源

阿里云开源镜像:http://mirrors.aliyun.com/

搜狐开源镜像:http://mirrors.sohu.com/

网易开源镜像:http://mirrors.163.com/

清华大学开源镜像:https://mirror.tuna.tsinghua.edu.cn/

浙江大学开源镜像:http://mirrors.zju.edu.cn/

华中科技大学开源镜像:http://mirror.hust.edu.cn/

南阳理工学院开源镜像:http://mirror.nyist.edu.cn/

中国电信天翼云开源镜像:http://mirrors.ctyun.cn/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/

豆瓣:http://pypi.douban.com/simple/

pip源

# 阿里云
http://mirrors.aliyun.com/pypi/simple/

# 清华大学
https://pypi.tuna.tsinghua.edu.cn/simple/

# 豆瓣
http://pypi.douban.com/simple/

# 中国科学技术大学
http://pypi.mirrors.ustc.edu.cn/simple/

# 华中科技大学
http://pypi.hustunique.com/


# 永久换源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

npm源

# 清华
https://pypi.tuna.tsinghua.edu.cn/simple

# 阿里云
http://mirrors.aliyun.com/pypi/simple/

# 中国科技大学
https://pypi.mirrors.ustc.edu.cn/simple/

# 山东理工大学
http://pypi.sdutlinux.org/

# 豆瓣
http://pypi.douban.com/simple/

# 网易
http://mirrors.163.com/

# 搜狐
http://mirrors.sohu.com/

# 浙江大学
http://mirrors.zju.edu.cn/

# 北大
http://mirror.bit.edu.cn/web/

# 兰州大学
http://mirror.lzu.edu.cn/

# 全局切换镜像源
npm config set registry http://registry.npm.taobao.org

# 全局切换官方镜像源
npm config set registry http://www.npmjs.org

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值