常用Linux源小记

常用国内镜像站:

阿里云:http://mirrors.aliyun.com/

中科大:http://mirrors.ustc.edu.cn/

清华:https://mirrors.tuna.tsinghua.edu.cn/

浙大:http://mirrors.lifetoy.org/

 

kali源:

deb http://mirrors.aliyun.com/kali sana main contrib non-free

deb http://mirrors.aliyun.com/kali kali-rolling main contrib non-free

deb http://mirrors.ustc.edu.cn/kali kali-rolling main contrib non-free

deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free

说明:

1) kali-rolling版本使用sana的源在执行apt-get update时不会有问题但在安装软件时常会出现依赖问题,所以不推荐用。

2)kali-rolling版本有些时候会出现“hash sum mismatch”错误,逐个换过就好了,最新的情况是阿里源有问题清华源没有。

3)这些网站有的是用https的,但是源里写https时总提示“InRelease”文件找不到,改成http就没问题。

 

ubuntu 源:

deb http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse

ubuntu版本号--名称:

11.04--natty/11.10--oneiric/12.04--precise/12.10--quantal

 

CentOS源:

http://mirrors.aliyun.com/repo/Centos-6.repo

要修改为其他镜像源,将其中的baseurl和gpgkey中的网址修改为其他镜像站网址即可:

sed -i "s/原源网址/目标源网址/g" /etc/yum.repo.d/源文件名

比如你原先执行了以下命令,使用了阿里源:

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

现在要改成清华源,执行:

 

sed -i "s/mirrors.aliyun.com/mirrors.tuna.tsinghua.edu.cn/g" /etc/yum.repo.d/CentOS-Base.repo

 

 Linux源的格式分析见“Linux软件源书写格式分析”。

 

posted on 2017-03-03 14:45  诸子流  阅读(897)  评论(0编辑  收藏  举报