同济大学开源镜像

Welcome to Tongji Open Source Software Mirror

CRAN

本镜像站为CRAN官方安全镜像,通过ssh同步上游仓库,支持HTTPS安全传输。

上游仓库

rsync over ssh: cran-rsync@cran.r-project.org:

镜像地址

https://mirrors.tongji.edu.cn/CRAN/

使用方法

  • 在初次执行install.packages安装软件包时,可以进入镜像设置界面,选择China (Shanghai) [https]镜像即可;
  • 已经设置过镜像的话,也可以执行chooseCRANmirror()进入镜像设置界面来更换镜像。

Kali Linux

上游仓库

rsync://ftp.nluug.nl/kali/

使用方法

编辑/etc/apt/sources.list文件,添加以下配置:

deb https://mirrors.tongji.edu.cn/kali kali-rolling main non-free contrib
deb-src https://mirrors.tongji.edu.cn/kali kali-rolling main non-free contrib

更新软件库索引

$ sudo apt-get update

Maven Central

上游仓库

https://repo.maven.apache.org/maven2/

使用方法

在用户目录下的.m2文件夹中创建settings.xml配置文件。具体配置文件路径如下:

  • Windows:%HOMEPATH%\.m2\settings.xml
  • Linux或macOS:$HOME/.m2/settings.xml

settings.xml中增加mirror配置,示例配置如下:

<settings>
  <mirrors>
    <mirror>
      <id>Tongji</id>
      <name>Tongji Maven Central Cache</name>
      <url>https://mirrors.tongji.edu.cn/nexus/repository/maven-central/</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>
</settings>

相关链接

CentOS

收录版本

  • 3
  • 4
  • 5
  • 6
  • 7

使用说明

备份CentOS-Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

下载对应版本的CentOS-Base.repo, 放入/etc/yum.repos.d/, 以CentOS 5为例

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#
 
[base]
name=CentOS-$releasever - Base - mirrors.tongji.edu.cn
baseurl=http://mirrors.tongji.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirrors.tongji.edu.cn/centos/RPM-GPG-KEY-CentOS-5
 
#released updates 
[updates]
name=CentOS-$releasever - Updates - mirrors.tongji.edu.cn
baseurl=http://mirrors.tongji.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirrors.tongji.edu.cn/centos/RPM-GPG-KEY-CentOS-5
 
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.tongji.edu.cn
baseurl=http://mirrors.tongji.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirrors.tongji.edu.cn/centos/RPM-GPG-KEY-CentOS-5
 
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons - mirrors.tongji.edu.cn
baseurl=http://mirrors.tongji.edu.cn/centos/$releasever/addons/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.tongji.edu.cn
baseurl=http://mirrors.tongji.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirrors.tongji.edu.cn/centos/RPM-GPG-KEY-CentOS-5
 
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.tongji.edu.cn
baseurl=http://mirrors.tongji.edu.cn/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirrors.tongji.edu.cn/centos/RPM-GPG-KEY-CentOS-5

Homebrew Bottles

使用说明

bash用户:

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tongji.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile 

zsh用户:

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tongji.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc 

Ubuntu

收录版本

  • precise
  • trusty
  • vivid
  • wily
  • xenial
  • yakkety
  • zesty

使用方法

修改配置文件/etc/apt/sources.list,将系统自带的该文件做个备份,将该文件替换为下面内容

示例:

Ubuntu 16.04 xenial

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tongji.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tongji.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tongji.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tongji.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tongji.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tongji.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tongji.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tongji.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tongji.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tongji.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse

precise:

deb https://mirrors.tongji.edu.cn/ubuntu/ precise main restricted universe multiverse
deb-src https://mirrors.tongji.edu.cn/ubuntu/ precise main restricted universe multiverse

deb https://mirrors.tongji.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb-src https://mirrors.tongji.edu.cn/ubuntu/ precise-security main restricted universe multiverse

deb https://mirrors.tongji.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
deb-src https://mirrors.tongji.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

deb https://mirrors.tongji.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src https://mirrors.tongji.edu.cn/ubuntu/ precise-backports main restricted universe multiverse

## Not recommended
# deb https://mirrors.tongji.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
# deb-src https://mirrors.tongji.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse

trusty:

deb https://mirrors.tongji.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb-src https://mirrors.tongji.edu.cn/ubuntu/ trusty main restricted universe multiverse

deb https://mirrors.tongji.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb-src https://mirrors.tongji.edu.cn/ubuntu/ trusty-security main restricted universe multiverse

deb https://mirrors.tongji.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb-src https://mirrors.tongji.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse

deb https://mirrors.tongji.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb-src https://mirrors.tongji.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse

## Not recommended
# deb https://mirrors.tongji.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src https://mirrors.tongji.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse