4 Star 30 Fork 2

eryajf-world / Thanks-Mirror

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Thanks Mirror

Auth GitHub contributors GitHub Issues GitHub Pull Requests GitHub Pull Requests HitCount GitHub license

整理记录各个包管理器,系统镜像,以及常用软件的好用镜像


本项目灵感来自:package-manager-proxy-settings,该项目分享的是包管理器配置代理的方法,这里分享的是包管理器直接可用,质量好,速度快的镜像,以及一些其他常用软件,系统镜像的国内镜像。

在此,对那些提供公共仓库镜像的企业或组织,致以感谢🫡!

Gitee:https://gitee.com/eryajf/Thanks-Mirror

GitHub:https://github.com/eryajf/Thanks-Mirror

每天自动运行一次链接检查,以保证项目中提供的链接都还正常可用,检查详情查看。

🥳 欢迎关注我的其他项目:

目录

Package-Mirror

以往工作中经历过建设企业内部私服的经历,私服的建设离不开国内一些优秀的镜像代理,这里记录下来,以供大家参考。

注意:假如所有的镜像都已经被本地nexus私服代理,那么对应的地址为nexus.eryajf.net/repository/***/。(这只是个域名示例,不代表实际可用!)

Go

Configuration

如果go版本用的go1.11或者go1.12,需进行如下配置:

export GO111MODULE=on
export GOPROXY="http://nexus.eryajf.net/repository/go/"

如果使用 go1.13以上的版本则可以用如下配置:

export GOPROXY="http://nexus.eryajf.net/repository/go/"
GONOPROXY="gitlab.eryajf.net"
GONOSUMDB="gitlab.eryajf.net"
GOPRIVATE="gitlab.eryajf.net"
GOSUMDB="sum.golang.google.cn"

关于如上两个版本配置差异,以及配置参数详解可参考:https://wiki.eryajf.net/pages/4941.html

Mirrors

其中GOSUMDB在国内可用的两个镜像分别如下:

🔝回到顶部

Npm

Configuration

配置npm代理,需进行如下配置:

# npm配置
$ echo 'registry=http://nexus.eryajf.net/repository/npm' > ~/.npmrc
# 查看
$ npm config get registry
http://nexus.eryajf.net/repository/npm

# yarn配置
$ echo 'registry "http://nexus.eryajf.net/repository/npm"' > ~/.yarnrc
# 查看
$ yarn config get registry
http://nexus.eryajf.net/repository/npm

Mirrors

🔝回到顶部

Pip

Configuration

配置Python代理,需进行如下配置:

$ mkdir ~/.pip

$ cat > ~/.pip/pip.conf << EOF
[global]
timeout = 60
trusted-host =  nexus.eryajf.net
index-url = http://nexus.eryajf.net/repository/pypi/simple
EOF

注意:通常在配置文件后边,我们会添加一个simple

# 简洁配置方式 1
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# 简洁配置方式 2
pip3 install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple yt-dlp

Mirrors

目前代理外部私仓有:

🔝回到顶部

Composer

Composer 是PHP 的一个依赖管理工具,需要PHP 5.3.2 以上才能运行。

Configuration

配置PHP代理,需进行如下配置:

  • 全局配置(推荐)
    • 所有项目都会使用该镜像地址:
      composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
    • 取消配置:
      composer config -g --unset repos.packagist
  • 项目配置
    • 仅修改当前工程配置,仅当前工程可使用该镜像地址:
      composer config repo.packagist composer https://mirrors.aliyun.com/composer/
    • 取消配置:
      composer config --unset repos.packagist

参考:https://developer.aliyun.com/composer

Mirrors

目前代理外部私仓有:

🔝回到顶部

Rubygems

RubyGems 是Ruby 的一个包管理器,它提供一个分发Ruby 程序和库的标准格式,还提供一个管理程序包安装的工具。

Configuration

配置Ruby代理,需进行如下配置:

# 首先,查看当前源:
$ gem sources -l
*** CURRENT SOURCES ***
https://rubygems.org/


# 接着,移除 https://rubygems.org/ ,并添加国内下载源 https://gems.ruby-china.com/ 。
$ gem sources --remove https://rubygems.org/
$ gem sources -a https://gems.ruby-china.com/
$ gem sources -l
*** CURRENT SOURCES ***

https://gems.ruby-china.com/

# 请确保只有 gems.ruby-china.com
$ gem install rails

参考:https://www.runoob.com/ruby/ruby-rubygems.html

Mirrors

目前代理外部私仓有:

🔝回到顶部

Maven

Configuration

Java系的工具版本规范如下:

  • JDK:1.8.0_292
  • MVN:3.3.9

配置Maven代理,参考配置文件: settings.xml

Mirrors

🔝回到顶部

Yum

Configuration

如果CentOS服务器要接入私服yum源,则清空本地 /etc/yum.repos.d的内容,添加如下内容:

$ cat >> /etc/yum.repos.d/nexus.repo << 'EOF'
[nexus]
name=Nexus Repository
baseurl=http://nexus.eryajf.net/repository/yum/$releasever/os/$basearch/
enabled=1
gpgcheck=0

[nexus-local]
name=Nexus Repository
baseurl=http://nexus.eryajf.net/repository/eryajf-yum-local/
enabled=1
gpgcheck=0
EOF

然后执行如下命令:

yum clean all
yum makecache

Mirrors

目前代理外部源:

🔝回到顶部

Remi

Remi repository 是包含最新版本 PHP 和 MySQL 包的 Linux 源,由 Remi 提供维护。

官方地址:https://rpms.remirepo.net/

Configuration

详情参考:https://wiki.eryajf.net/pages/f35986

yum install -y epel-release
yum install -y https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm

Mirrors

目前代理外部源:

🔝回到顶部

Epel

EPEL 的全称叫 Extra Packages for Enterprise Linux。EPEL 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。

官方地址:https://docs.fedoraproject.org/en-US/epel/

Configuration

# 备份
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup

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

Mirrors

目前代理外部源:

🔝回到顶部

Homebrew

Configuration

如果你使用了zsh,那么配置方式如下:

echo 'export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"' >> ~/.zshrc
echo 'export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"' >> ~/.zshrc
echo 'export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"' >> ~/.zshrc

source ~/.zshrc
brew update

参考:Homebrew 替换国内镜像源

Mirrors

🔝回到顶部

cargo

rust 包管理镜像源

Configuration

修改文件~/.cargo/config(没有则新建)

[source.crates-io]
replace-with = 'rsproxy'

[source.rsproxy]
registry = "https://rsproxy.cn/crates.io-index"

[registries.rsproxy]
index = "https://rsproxy.cn/crates.io-index"

[net]
git-fetch-with-cli = true

Mirrors

🔝回到顶部

Software-Mirror

还有一些软件,直接通过官方下载比较困难,也整理出方便下载的国内优质镜像。

Docker

Official

Mirrors

🔝回到顶部

Kubernetes

Official

Mirrors

🔝回到顶部

K3s

Official

Mirrors

🔝回到顶部

Minikube

Official

Mirrors

🔝回到顶部

Helm

Official

Mirrors

🔝回到顶部

Harbor

Official

Mirrors

🔝回到顶部

Jenkins

Official

Mirrors

🔝回到顶部

GitLab-ce

Official

Mirrors

🔝回到顶部

GitLab-runner

Official

Mirrors

🔝回到顶部

ElasticSearch

Official

Mirrors

🔝回到顶部

Logstash

Official

Mirrors

🔝回到顶部

Kibana

Official

Mirrors

🔝回到顶部

Filebeat

Official

Mirrors

🔝回到顶部

MySQL

Official

Mirrors

🔝回到顶部

MariaDB

Official

Mirrors

🔝回到顶部

Percona

Official

Mirrors

🔝回到顶部

MongoDB

Official

Mirrors

🔝回到顶部

Redis

Official

Mirrors

🔝回到顶部

PostgreSQL

Official

Mirrors

🔝回到顶部

Golang

Official

Mirrors

🔝回到顶部

Node

Official

Mirrors

🔝回到顶部

Yarn

Official

Mirrors

🔝回到顶部

Python

Official

Mirrors

🔝回到顶部

Rust

Official

Mirrors

🔝回到顶部

Maven

Official

Mirrors

🔝回到顶部

Zabbix

Official

Mirrors

🔝回到顶部

Prometheus

Official

Mirrors

🔝回到顶部

Grafana

Official

Mirrors

🔝回到顶部

Pinpoint

Official

Mirrors

🔝回到顶部

Apache

Official

Mirrors

🔝回到顶部

Nginx

Official

Mirrors

🔝回到顶部

OpenResty

Official

Mirrors

🔝回到顶部

Keepalived

Official

Mirrors

🔝回到顶部

Ceph

Official

Mirrors

🔝回到顶部

Influxdata

Official

Mirrors

🔝回到顶部

ClickHouse

Official

Mirrors

🔝回到顶部

Rabbitmq

Official

Mirrors

🔝回到顶部

ETCD

Official

Mirrors

🔝回到顶部

WireShark

Official

Mirrors

🔝回到顶部

Virtualbox

Official

Mirrors

🔝回到顶部

iina

Official

Mirrors

🔝回到顶部

chromium

Official

Mirrors

🔝回到顶部

System-Mirror

系统镜像,又大又远,更需要找到好用优秀的国内镜像。

CentOS

尽管CentOS不再更新了,但它仍旧并且还将持续是国内企业系统主力军。

可能官方考虑到下载困难的问题,官方也列出了距离使用者更近的镜像列表,可谓贴心。

Official

Mirrors

🔝回到顶部

CentOS-altarch

ARM架构下的CentOS镜像。

Official

Mirrors

🔝回到顶部

Ubuntu

Official

Mirrors

🔝回到顶部

Debian

Official

Mirrors

🔝回到顶部

Deepin

Official

Mirrors

🔝回到顶部

Fedora

Official

Mirrors

🔝回到顶部

Alpine

Official

Mirrors

🔝回到顶部

Void

Official

Mirrors

🔝回到顶部

Gentoo

Official

Mirrors

🔝回到顶部

kali

Official

Mirrors

🔝回到顶部

Opensuse

Official

Mirrors

🔝回到顶部

FreeBSD

Official

Mirrors

注意:FreeBSD 有四类源:pkg、ports、portsnap、update。不是所有镜像站都同时支持上述四类源。目前在大陆境内没有官方镜像站,以下均为非官方镜像站。

pkg 源:pkg 源提供二进制安装包

pkg 的下载路径是 /var/cache/pkg/

FreeBSD 中 pkg 源分为系统级和用户级两个配置文件。不建议直接修改 /etc/pkg/FreeBSD.conf ,因为该文件会随着基本系统的更新而发生改变。

创建用户级源目录:   

# mkdir -p /usr/local/etc/pkg/repos
网易开源镜像站

创建用户级源文件:

# ee /usr/local/etc/pkg/repos/163.conf

写入以下内容:

163: {
url: "pkg+http://mirrors.163.com/freebsd-pkg/${ABI}/quarterly",
mirror_type: "srv",
signature_type: "none",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
FreeBSD: { enabled: no }

故障排除

若要获取滚动更新的包,请将 quarterly 修改为 latest。二者区别见 FreeBSD 手册。请注意, CURRENT 版本只有 latest

# sed -i '' 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf

若要使用 https,请先安装 security/ca_root_nss,并将 http 修改为 https,最后使用命令 # pkg update -f 刷新缓存即可。

中国科学技术大学开源软件镜像站

创建用户级源文件:

# ee /usr/local/etc/pkg/repos/ustc.conf

写入以下内容:

ustc: {
url: "pkg+http://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/quarterly",
mirror_type: "srv",
signature_type: "none",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
FreeBSD: { enabled: no }
南京大学开源镜像站
# ee /usr/local/etc/pkg/repos/nju.conf

写入以下内容:

nju: {
url: "pkg+http://mirrors.nju.edu.cn/freebsd-pkg/${ABI}/quarterly",
mirror_type: "srv",
signature_type: "none",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
FreeBSD: { enabled: no }
FreeBSD.cn
# ee /usr/local/etc/pkg/repos/freebsdcn.conf

写入以下内容:

freebsdcn: {
url: "pkg+http://pkg.freebsd.cn/${ABI}/quarterly",
mirror_type: "srv",
signature_type: "none",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
FreeBSD: { enabled: no }
ports 源:以源代码方式安装软件的包管理器

ports 下载路径是 /usr/ports/distfiles

警告

只有 freebsd.cn 镜像站的 ports 镜像是完整的,其余的大概只镜像了不到十分之一。请优先考虑使用 FreeBSD.cn。见 https://github.com/ustclug/discussions/issues/408

FreeBSD.cn(推荐)

创建或修改文件 # ee /etc/make.conf:

写入以下内容(注意结尾的 / 是必须的!下同):

MASTER_SITE_OVERRIDE?=http://ports.freebsd.cn/ports-distfiles/${DIST_SUBDIR}/

网易开源镜像站(该镜像不完整)

创建或修改文件 # ee /etc/make.conf:

写入以下内容:

MASTER_SITE_OVERRIDE?=http://mirrors.163.com/freebsd-ports/distfiles/${DIST_SUBDIR}/

中国科学技术大学开源软件镜像站(该镜像不完整)

创建或修改文件 # ee /etc/make.conf:

写入以下内容:

MASTER_SITE_OVERRIDE?=http://mirrors.ustc.edu.cn/freebsd-ports/distfiles/${DIST_SUBDIR}/

portsnap 源:打包的 ports 文件
FreeBSD.cn

编辑 portsnap 配置文件 # ee /etc/portsnap.conf :

SERVERNAME=portsnap.FreeBSD.org 修改为 SERVERNAME=portsnap.FreeBSD.cn

freebsd-update 源:提供基本系统更新

注意:只有一级架构的 release 版本才提供该源。也就是说 current 和 stable 是没有 freebsd-update 源的。 关于架构的支持等级说明请看:

https://www.freebsd.org/platforms

FreeBSD.cn

编辑 # ee /etc/freebsd-update.conf 文件:

ServerName update.FreeBSD.org 修改为 ServerName update.FreeBSD.cn

🔝回到顶部

GNU

Official

Mirrors

🔝回到顶部

Other-Mirror

Docker-hub

没有整理Docker-hub的镜像的原因是,鉴于这种仓库的特殊性,国内也确实没有一家将之全站镜像的,果真如此,倒也并不科学了。

不过关于Docker-hub以及GitHub的使用,又的确会经常遇到网络方面的问题,因此也一直在留心这方面的解决方案,目前大多是提供加速的方案,算是镜像方案之下的一个折中策略。

Official

其他的镜像仓库不再单独列出。

Mirrors

方案一:

使用方式:

使用方式都是替换原来镜像的前缀域名即可实现加速效果,比如:

原来地址: eryajf/centos:7.4  # 这个是官方镜像,省略了前边的域名
替换地址: docker.mirrors.sjtug.sjtu.edu.cn/eryajf/centos:7.4

另外,加速通常只是针对某个源站进行的加速,国外对公开放的docker仓库并非官方一家,因此这里就以源站的维度进行区分,整理出经过测试可用的加速站。

  • Docker-hub
    • 上海交通大学
      • docker.mirrors.sjtug.sjtu.edu.cn
    • 中科大
      • docker.mirrors.ustc.edu.cn
    • docker proxy
      • dockerproxy.com
  • gcr.io
    • 南京大学
      • gcr.nju.edu.cn
    • docker proxy
      • gcr.dockerproxy.com
    • lank8s:后期可能会转成付费
      • gcr.lank8s.cn
  • k8s.gcr.io
    • 上海交通大学
      • k8s-gcr-io.mirrors.sjtug.sjtu.edu.cn
    • 南京大学
      • gcr.nju.edu.cn/google-containers
    • docker proxy
      • k8s.dockerproxy.com
    • lank8s
      • lank8s.cn
  • ghcr.io
    • docker proxy
      • ghcr.dockerproxy.com
    • 南京大学
      • ghcr.nju.edu.cn
  • quay.io
    • 中科大
      • quay.mirrors.ustc.edu.cn
    • 南京大学
      • quay.nju.edu.cn
  • nvcr.io
    • 南京大学
      • ngc.nju.edu.cn

方案二:

还有一种方案是通过将加速地址写入到docker配置文件当中实现加速。

/etc/docker/daemon.json 中写入如下内容(如果文件不存在请新建该文件):

{
  "registry-mirrors": [
    "https://hub-mirror.c.163.com",
    "https://mirror.baidubce.com"
  ]
}

注意,一定要保证该文件符合 json 规范,否则 Docker 将不能启动。

之后重新启动服务。

$ sudo systemctl daemon-reload
$ sudo systemctl restart docker

目前可用的加速地址有:

🔝回到顶部

GitHub

Official

Mirrors

GitHub相关的国内镜像,有不同的使用方式,这里仅列出目前可用的国内镜像,具体用法请查阅镜像的官方说明。

🔝回到顶部

Google

Official

Mirrors

目前所能使用到的,基本上都是一些加速方案,而且并不十分稳定。

🔝回到顶部

Nix

Official

Mirrors

🔝回到顶部

如何贡献

欢迎大家补充优秀的镜像,让我们一起建设好这个仓库!

贡献内容只需要注意目录的层级与原有内容格式对齐,术业有专攻,大家提交的镜像,最好都是有经过测试验证的!

贡献者

eryajf
二丫讲梵
ykla
Ykla
18183883296
Sunrise
Hanjingxue-Boling
Hanjingxue Boling
colinxu2020
Colinxu2020
danbai225
淡白
Goojoe
咕咕乔
jingjingxyk
好吧,你想说啥
hoochanlon
菠萝包趣多多

🔝回到顶部

MIT License Copyright (c) 2022 二丫讲梵 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

整理记录各个包管理器,系统镜像,以及常用软件的好用镜像,Thanks Mirror。 走过路过,如觉不错,麻烦点个赞👆🌟 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/eryajf-world/Thanks-Mirror.git
git@gitee.com:eryajf-world/Thanks-Mirror.git
eryajf-world
Thanks-Mirror
Thanks-Mirror
main

搜索帮助

14c37bed 8189591 565d56ea 8189591