Skip to content

中国内访问一些开发所用的网站比较慢,更换对应的源,可以提高速度。

License

Notifications You must be signed in to change notification settings

ginhton/change-mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

change-mirror

  • 中国内访问一些开发所用的网站比较慢,更换对应的源,可以提高速度。
  • 个人知识和接触面有限,欢迎大家多提issue和PR哈~~~

npm

淘宝源

  • 使用方法: 下载cnpm代替默认的npm。其他方法可以参考链接内容。
$ npm install -g cnpm --registry=https://registry.npm.taobao.org

Ubuntu

系统自带

  • 打开系统程序“软件和更新”(或Software & Update), 点击“下载自”对应的下拉列表。然后选择“其他”。弹出的对话框右侧,点击“选择最好的服务器”。程序会自动帮你选择附近速度最快的源。 程序界面截图

spacemacs

清华ELPA

  • 链接
  • master分支的用户,添加下面的代码到.spacemacsdotspacemacs/user-init()
(setq configuration-layer--elpa-archives
    '(("melpa-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")
      ("org-cn"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/org/")
      ("gnu-cn"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")))
  • develop分支的用户使用configuration-layer-elpa-archives代替原来的configuration-layer--elpa-archives( -- 换成 - )
(setq configuration-layer-elpa-archives
    '(("melpa-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")
      ("org-cn"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/org/")
      ("gnu-cn"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")))

Emacs China ELPA

  • 链接
  • master分支的用户,添加下面的代码到.spacemacsdotspacemacs/user-init()
(setq configuration-layer--elpa-archives
    '(("melpa-cn" . "http://elpa.emacs-china.org/melpa/")
      ("org-cn"   . "http://elpa.emacs-china.org/org/")
      ("gnu-cn"   . "http://elpa.emacs-china.org/gnu/")))
  • develop 分支的用户使用configuration-layer-elpa-archives代替原来的configuration-layer--elpa-archives( -- 换成 - )
(setq configuration-layer-elpa-archives
    '(("melpa-cn" . "http://elpa.emacs-china.org/melpa/")
      ("org-cn"   . "http://elpa.emacs-china.org/org/")
      ("gnu-cn"   . "http://elpa.emacs-china.org/gnu/")))

Docker

Docker中国官方镜像加速

  • 链接
  • 可以直接使用以下命令直接从该镜像加速地址进行拉取。
$ docker pull registry.docker-cn.com/myname/myrepo:mytag
  • 为了永久性保留修改,您可以修改/etc/docker/daemon.json文件并添上registry-mirrors键值。
{
  "registry-mirrors": ["https://registry.docker-cn.com"]
}

阿里云官方镜像加速

  • 链接
  • 当您下载安装的Docker Version不低于1.10时,建议直接通过daemon config进行配置。使用配置文件/etc/docker/daemon.json(没有时新建该文件)。
{
    "registry-mirrors": ["<your accelerate address>"]
}
  • 当您的Docker版本较旧时,只能根据系统的不同修改对应的配置文件了。具体可查看链接
  • 对应的加速器地址,需要登陆阿里云控制台后,到容器镜像服务控制台查看。

Yarn

淘宝源

  • 使用下面的命令来设置使用淘宝源。
yarn config set regsitry https://registry.npm.taobao.org -g
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/note-sass -g

Anaconda

清华源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes

About

中国内访问一些开发所用的网站比较慢,更换对应的源,可以提高速度。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published