Giter Site home page Giter Site logo

xmlgrg / thanks-mirror Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eryajf/thanks-mirror

0.0 1.0 0.0 46 KB

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

License: MIT License

thanks-mirror's Introduction

Thanks-Mirror

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

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

Gitee:https://gitee.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

Mirrors

目前代理外部私仓有:

Maven

Configuration

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

  • JDK:1.8.0_292
  • MVN:3.3.9

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

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository>~/.m2/repository</localRepository>
  <pluginGroups>
  </pluginGroups>
  <proxies>
  </proxies>

  <servers>
    <server>
      <id>releases</id>
      <username>username</username>
      <password>password</password>
    </server>
    <server>
      <id>snapshots</id>
      <username>username</username>
      <password>password</password>
   </server>
  </servers>

  <mirrors>
    <mirror>
      <id>nexus-eryajf</id>
      <mirrorOf>*</mirrorOf>
      <name>Nexus osc</name>
      <url>http://nexus.eryajf.net/repository/maven/</url>
    </mirror>
  </mirrors>

  <profiles>
    <profile>
      <id>developer</id>
    <activation>
      <jdk>jdk-1.8</jdk>
    </activation>
    <repositories>
    <repository>
      <id>nexus-eryajf-local</id>
      <name>local private nexus</name>
      <url>http://nexus.eryajf.net/repository/maven/</url>
    <releases>
      <enabled>true</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
      <updatePolicy>always</updatePolicy>
    </snapshots>
    </repository>
    </repositories>
    <pluginRepositories>
    <pluginRepository>
      <id>nexus-eryajf</id>
      <name>local private nexus</name>
      <url>http://nexus.eryajf.net/repository/maven/</url>
    <releases>
      <enabled>true</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
    </pluginRepository>
    </pluginRepositories>
    </profile>
  </profiles>

  <activeProfiles>
    <activeProfile>developer</activeProfile>
  </activeProfiles>
</settings>

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

目前代理外部源:

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

Software-Mirror

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

Docker

Official

Mirrors

Kubernetes

Official

Mirrors

Jenkins

Official

Mirrors

ElasticSearch

Official

Mirrors

Logstash

Official

Mirrors

Kibana

Official

Mirrors

Filebeat

Official

Mirrors

MySQL

Official

Mirrors

MariaDB

Official

Mirrors

MongoDB

Official

Mirrors

Redis

Official

Mirrors

PostgreSQL

Official

Mirrors

Golang

Official

Mirrors

Node

Official

Mirrors

Python

Official

Mirrors

Zabbix

Official

Mirrors

Grafana

Official

Mirrors

Apache

Official

Mirrors

Nginx

Official

Mirrors

System-Mirror

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

CentOS

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

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

Official

Mirrors

Stargazers over time

Stargazers over time

thanks-mirror's People

Contributors

eryajf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.