diff --git a/404.html b/404.html index 1d4ec75..a3d29b5 100644 --- a/404.html +++ b/404.html @@ -11,12 +11,16 @@ permalink: /404.html
-
+ {% if site.meow_404 %} +
+ {% endif %}
404 NOT FOUND
- 呜喵,金枪鱼被吃掉了 + {% if site.meow_404 %} + 呜喵,金枪鱼被吃掉了 + {% endif %}
如果您认为这一定是出了什么问题,或者正在寻找暂未包含的镜像,欢迎您前往 @@ -43,14 +47,15 @@ permalink: /404.html {% include footer.html %} {% endraw %} diff --git a/_posts/help/1970-01-01-binutils-gdb.git.md b/_posts/help/1970-01-01-binutils-gdb.git.md index 17098ee..07093b3 100644 --- a/_posts/help/1970-01-01-binutils-gdb.git.md +++ b/_posts/help/1970-01-01-binutils-gdb.git.md @@ -9,19 +9,19 @@ mirrorid: binutils-gdb.git 如需克隆 Binutils 等项目的代码,使用 ``` -git clone https://mirrors.tuna.tsinghua.edu.cn/git/binutils-gdb.git +git clone https://{{ site.hostname }}/git/binutils-gdb.git ``` 若要将 tuna mirror 加入已有代码库,可在已有仓库中运行 ``` -git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/binutils-gdb.git +git remote add tuna https://{{ site.hostname }}/git/binutils-gdb.git ``` 或运行 ``` -git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/binutils-gdb.git +git remote set-url origin https://{{ site.hostname }}/git/binutils-gdb.git ``` 将默认上游设置为 TUNA 镜像 diff --git a/_posts/help/1970-01-01-centos.md b/_posts/help/1970-01-01-centos.md index b22462c..d8376a3 100644 --- a/_posts/help/1970-01-01-centos.md +++ b/_posts/help/1970-01-01-centos.md @@ -12,7 +12,7 @@ mirrorid: centos sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak ``` -然后编辑 /etc/yum.repos.d/CentOS-Base.repo 文件,在 `mirrorlist=` 开头行前面加 `#` 注释掉;并将 `baseurl=` 开头行取消注释(如果被注释的话),把该行内的域名(例如`mirror.centos.org`)替换为 `mirrors.tuna.tsinghua.edu.cn`。 +然后编辑 /etc/yum.repos.d/CentOS-Base.repo 文件,在 `mirrorlist=` 开头行前面加 `#` 注释掉;并将 `baseurl=` 开头行取消注释(如果被注释的话),把该行内的域名(例如`mirror.centos.org`)替换为 `{{ site.hostname }}`。 或者,你也可以直接使用如下内容覆盖掉 /etc/yum.repos.d/CentOS-Base.repo 文件:(未经充分测试) @@ -45,7 +45,7 @@ sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak {{if release_name|between>5>7}} [base] name=CentOS-$releasever - Base -baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/ +baseurl=https://{{ site.hostname }}/centos/$releasever/os/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os enabled=1 gpgcheck=1 @@ -54,7 +54,7 @@ gpgkey=file:///etc/pki/rpm-gpg/{{release_security}} #released updates [updates] name=CentOS-$releasever - Updates -baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/ +baseurl=https://{{ site.hostname }}/centos/$releasever/updates/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates enabled=1 gpgcheck=1 @@ -63,7 +63,7 @@ gpgkey=file:///etc/pki/rpm-gpg/{{release_security}} {{if release_name|equals>8}} [Base OS] name=CentOS-$releasever - Base -baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/BaseOS/$basearch/os/ +baseurl=https://{{ site.hostname }}/centos/$releasever/BaseOS/$basearch/os/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra enabled=1 gpgcheck=1 @@ -71,7 +71,7 @@ gpgkey=file:///etc/pki/rpm-gpg/{{release_security}} [AppStream] name=CentOS-$releasever - AppStream -baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/AppStream/$basearch/os/ +baseurl=https://{{ site.hostname }}/centos/$releasever/AppStream/$basearch/os/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra enabled=1 gpgcheck=1 @@ -79,7 +79,7 @@ gpgkey=file:///etc/pki/rpm-gpg/{{release_security}} [PowerTools] name=CentOS-$releasever - PowerTools -baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/PowerTools/$basearch/os/ +baseurl=https://{{ site.hostname }}/centos/$releasever/PowerTools/$basearch/os/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra enabled=0 gpgcheck=1 @@ -89,7 +89,7 @@ gpgkey=file:///etc/pki/rpm-gpg/{{release_security}} #additional packages that may be useful [extras] name=CentOS-$releasever - Extras -baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/{{os_name}} +baseurl=https://{{ site.hostname }}/centos/$releasever/extras/$basearch/{{os_name}} #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras enabled=1 gpgcheck=1 @@ -99,7 +99,7 @@ gpgkey=file:///etc/pki/rpm-gpg/{{release_security}} #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons -baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/addons/$basearch/ +baseurl=https://{{ site.hostname }}/centos/$releasever/addons/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons enabled=1 gpgcheck=1 @@ -109,7 +109,7 @@ gpgkey=file:///etc/pki/rpm-gpg/{{release_security}} #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus -baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/{{os_name}} +baseurl=https://{{ site.hostname }}/centos/$releasever/centosplus/$basearch/{{os_name}} #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus gpgcheck=1 enabled=0 @@ -119,7 +119,7 @@ gpgkey=file:///etc/pki/rpm-gpg/{{release_security}} #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib -baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/contrib/$basearch/ +baseurl=https://{{ site.hostname }}/centos/$releasever/contrib/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 diff --git a/_posts/help/1970-01-01-chromiumos.md b/_posts/help/1970-01-01-chromiumos.md index 1fce8b4..c9a58fa 100644 --- a/_posts/help/1970-01-01-chromiumos.md +++ b/_posts/help/1970-01-01-chromiumos.md @@ -20,7 +20,7 @@ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo ``` -或者使用tuna的[git-repo镜像](https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/) +或者使用tuna的[git-repo镜像](https://{{ site.hostname }}/help/git-repo/) #### 下载代码 @@ -34,7 +34,7 @@ cd WORKING_DIRECTORY 初始化仓库: ``` -repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/chromiumos/chromiumos/manifest +repo init -u https://{{ site.hostname }}/git/chromiumos/chromiumos/manifest ``` **注意: 本镜像是 Chromium OS 的 master 分支的镜像,如果使用本镜像下载 Chromium OS 的其他版本很大概率会失败** @@ -50,7 +50,7 @@ repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/chromiumos/chromiumos/mani 替换为 ``` -"https://mirrors.tuna.tsinghua.edu.cn/git/chromiumos/" +"https://{{ site.hostname }}/git/chromiumos/" ``` 接着将 @@ -62,7 +62,7 @@ repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/chromiumos/chromiumos/mani 替换为 ``` -"https://aosp.tuna.tsinghua.edu.cn/" +"https://{{ site.aosp }}/" ``` diff --git a/_posts/help/1970-01-01-clickhouse.md b/_posts/help/1970-01-01-clickhouse.md index da491d9..802251c 100644 --- a/_posts/help/1970-01-01-clickhouse.md +++ b/_posts/help/1970-01-01-clickhouse.md @@ -13,7 +13,7 @@ mirrorid: clickhouse 新建 `/etc/apt/sources.list.d/clickhouse.list`,内容为 ``` -deb https://mirrors.tuna.tsinghua.edu.cn/clickhouse/deb/stable/ main/ +deb https://{{ site.hostname }}/clickhouse/deb/stable/ main/ ``` @@ -24,6 +24,6 @@ deb https://mirrors.tuna.tsinghua.edu.cn/clickhouse/deb/stable/ main/ ``` [repo.yandex.ru_clickhouse_rpm_stable_x86_64] name=clickhouse stable -baseurl=https://mirrors.tuna.tsinghua.edu.cn/clickhouse/rpm/stable/x86_64 +baseurl=https://{{ site.hostname }}/clickhouse/rpm/stable/x86_64 enabled=1 ``` diff --git a/_posts/help/1970-01-01-crates.io-index.git.md b/_posts/help/1970-01-01-crates.io-index.git.md index e0d4358..d6f87c1 100644 --- a/_posts/help/1970-01-01-crates.io-index.git.md +++ b/_posts/help/1970-01-01-crates.io-index.git.md @@ -13,7 +13,7 @@ mirrorid: crates.io-index.git replace-with = 'tuna' [source.tuna] -registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git" +registry = "https://{{ site.hostname }}/git/crates.io-index.git" ``` 该镜像可加快 cargo 读取软件包索引的速度。 diff --git a/_posts/help/1970-01-01-cygwin.md b/_posts/help/1970-01-01-cygwin.md index 41f37e1..913c82b 100644 --- a/_posts/help/1970-01-01-cygwin.md +++ b/_posts/help/1970-01-01-cygwin.md @@ -12,10 +12,10 @@ Cygwin 镜像使用帮助 选择`Install from Internet`, 在"User URL"处输入以下地址: ``` -https://mirrors.tuna.tsinghua.edu.cn/cygwin/ +https://{{ site.hostname }}/cygwin/ ``` -点击"Add"按钮, 然后选中"https://mirrors.tuna.tsinghua.edu.cn", 点击"下一步"进行安装。 +点击"Add"按钮, 然后选中"https://{{ site.hostname }}", 点击"下一步"进行安装。 注意,该列表为可多选列表,注意把上面不需要的镜像点掉。 diff --git a/_posts/help/1970-01-01-debian.md b/_posts/help/1970-01-01-debian.md index 93e9418..697c698 100644 --- a/_posts/help/1970-01-01-debian.md +++ b/_posts/help/1970-01-01-debian.md @@ -37,14 +37,14 @@ $ sudo apt install apt-transport-https {% raw %} diff --git a/_posts/help/1970-01-01-docker-ce.md b/_posts/help/1970-01-01-docker-ce.md index c137de1..2eda811 100644 --- a/_posts/help/1970-01-01-docker-ce.md +++ b/_posts/help/1970-01-01-docker-ce.md @@ -51,7 +51,7 @@ sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-pr

 sudo add-apt-repository \
-   "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/{{deb_release}} \
+   "deb [arch=amd64] https://{{ site.hostname }}/docker-ce/linux/{{deb_release}} \
    $(lsb_release -cs) \
    stable"
 
@@ -63,7 +63,7 @@ sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-pr {% raw %}

-echo "deb [arch=armhf] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/{{deb_release}} \
+echo "deb [arch=armhf] https://{{ site.hostname }}/docker-ce/linux/{{deb_release}} \
      $(lsb_release -cs) stable" | \
     sudo tee /etc/apt/sources.list.d/docker.list
 
@@ -112,7 +112,7 @@ sudo yum install -y yum-utils device-mapper-persistent-data lvm2 把软件仓库地址替换为 TUNA: ```bash -sudo sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo +sudo sed -i 's+download.docker.com+{{ site.hostname }}/docker-ce+' /etc/yum.repos.d/docker-ce.repo ``` 最后安装: diff --git a/_posts/help/1970-01-01-elpa.md b/_posts/help/1970-01-01-elpa.md index de90bbe..1dfa3a8 100644 --- a/_posts/help/1970-01-01-elpa.md +++ b/_posts/help/1970-01-01-elpa.md @@ -11,18 +11,18 @@ ELPA 是 Emacs 内建包管理器 `package.el` 的软件源,本镜像支持了 | ELPA | 镜像地址 | |-------------------|---------------------------------------------| -| [GNU ELPA](http://elpa.gnu.org/) | http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/ | -| [MELPA](https://melpa.org/) | http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/ | -| [MELPA Stable](http://stable.melpa.org/#/) | http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa-stable/ | -| [Marmalade](https://marmalade-repo.org/) | http://mirrors.tuna.tsinghua.edu.cn/elpa/marmalade/ | -| [Org](http://orgmode.org/elpa.html) | http://mirrors.tuna.tsinghua.edu.cn/elpa/org/ | +| [GNU ELPA](http://elpa.gnu.org/) | http://{{ site.hostname }}/elpa/gnu/ | +| [MELPA](https://melpa.org/) | http://{{ site.hostname }}/elpa/melpa/ | +| [MELPA Stable](http://stable.melpa.org/#/) | http://{{ site.hostname }}/elpa/melpa-stable/ | +| [Marmalade](https://marmalade-repo.org/) | http://{{ site.hostname }}/elpa/marmalade/ | +| [Org](http://orgmode.org/elpa.html) | http://{{ site.hostname }}/elpa/org/ | 根据你的需求,设置 package-archives ,比如用 GNU ELPA 和 MELPA: ```lisp -(setq package-archives '(("gnu" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/") - ("melpa" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/"))) +(setq package-archives '(("gnu" . "http://{{ site.hostname }}/elpa/gnu/") + ("melpa" . "http://{{ site.hostname }}/elpa/melpa/"))) (package-initialize) ;; You might already have this line ``` @@ -36,9 +36,9 @@ Spacemacs 用户 ```lisp (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/"))) + '(("melpa-cn" . "http://{{ site.hostname }}/elpa/melpa/") + ("org-cn" . "http://{{ site.hostname }}/elpa/org/") + ("gnu-cn" . "http://{{ site.hostname }}/elpa/gnu/"))) ``` ### develop 分支 @@ -46,9 +46,9 @@ Spacemacs 用户 ```lisp (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/"))) + '(("melpa-cn" . "http://{{ site.hostname }}/elpa/melpa/") + ("org-cn" . "http://{{ site.hostname }}/elpa/org/") + ("gnu-cn" . "http://{{ site.hostname }}/elpa/gnu/"))) ``` Cask 用户 @@ -57,8 +57,8 @@ Cask 用户 [Cask](https://github.com/cask/cask) 是一个 Emacs Lisp 的项目管理工具。这里还是以 GNU ELPA 和 MELPA 为例,在添加下面的代码到 Cask ```lisp -(source "gnu" "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/") -(source "melpa" "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/") +(source "gnu" "http://{{ site.hostname }}/elpa/gnu/") +(source "melpa" "http://{{ site.hostname }}/elpa/melpa/") ``` 关于 ELPA 的选择 @@ -86,10 +86,10 @@ URL Bug 事实上,末尾没有`/`的话,emacs会去尝试取以下链接: - - + - 而正常的链接应该是 - - + - 这个是emacs自己的bug。在 中有描述。 diff --git a/_posts/help/1970-01-01-epel.md b/_posts/help/1970-01-01-epel.md index e4f198e..89f6a32 100644 --- a/_posts/help/1970-01-01-epel.md +++ b/_posts/help/1970-01-01-epel.md @@ -12,7 +12,7 @@ EPEL(Extra Packages for Enterprise Linux)是由Fedora Special Interest Group维 下面以CentOS 7为例讲解如何使用tuna的epel镜像。 -首先从CentOS Extras这个源([tuna](https://mirrors.tuna.tsinghua.edu.cn/help/centos)也有镜像)里安装epel-release: +首先从CentOS Extras这个源([tuna](https://{{ site.hostname }}/help/centos)也有镜像)里安装epel-release: ``` yum install epel-release @@ -21,14 +21,14 @@ yum install epel-release 当前tuna已经在epel的官方镜像列表里,所以不需要其他配置,mirrorlist机制就能让你的服务器就近使用tuna的镜像。如果你想强制 你的服务器使用tuna的镜像,可以修改`/etc/yum.repos.d/epel.repo`,将`mirrorlist`和`metalink`开头的行注释掉。 -接下来,取消注释这个文件里`baseurl`开头的行,并将其中的`http://download.fedoraproject.org/pub`替换成`https://mirrors.tuna.tsinghua.edu.cn`。 +接下来,取消注释这个文件里`baseurl`开头的行,并将其中的`http://download.fedoraproject.org/pub`替换成`https://{{ site.hostname }}`。 可以用如下命令自动替换:(来自 https://github.com/tuna/issues/issues/687) ``` sed -e 's!^metalink=!#metalink=!g' \ -e 's!^#baseurl=!baseurl=!g' \ - -e 's!//download\.fedoraproject\.org/pub!//mirrors.tuna.tsinghua.edu.cn!g' \ + -e 's!//download\.fedoraproject\.org/pub!//{{ site.hostname }}!g' \ -e 's!http://mirrors\.tuna!https://mirrors.tuna!g' \ -i /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel-testing.repo ``` @@ -38,7 +38,7 @@ sed -e 's!^metalink=!#metalink=!g' \ ``` [epel] name=Extra Packages for Enterprise Linux 7 - $basearch -baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch +baseurl=https://{{ site.hostname }}/epel/7/$basearch #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch failovermethod=priority enabled=1 @@ -47,7 +47,7 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 [epel-debuginfo] name=Extra Packages for Enterprise Linux 7 - $basearch - Debug -baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch/debug +baseurl=https://{{ site.hostname }}/epel/7/$basearch/debug #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch failovermethod=priority enabled=0 @@ -56,7 +56,7 @@ gpgcheck=1 [epel-source] name=Extra Packages for Enterprise Linux 7 - $basearch - Source -baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/SRPMS +baseurl=https://{{ site.hostname }}/epel/7/SRPMS #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch failovermethod=priority enabled=0 diff --git a/_posts/help/1970-01-01-fdroid.md b/_posts/help/1970-01-01-fdroid.md index 86995c5..eba447d 100644 --- a/_posts/help/1970-01-01-fdroid.md +++ b/_posts/help/1970-01-01-fdroid.md @@ -8,10 +8,10 @@ mirrorid: fdroid 用 F-Droid 客户端打开此链接: -https://mirrors.tuna.tsinghua.edu.cn/fdroid/repo/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB +https://{{ site.hostname }}/fdroid/repo/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB 或复制此链接后在客户端中添加存储库,可以将此镜像添加为用户镜像。 如果需要添加 Archive 库,可以使用如下链接: -https://mirrors.tuna.tsinghua.edu.cn/fdroid/archive?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB \ No newline at end of file +https://{{ site.hostname }}/fdroid/archive?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB diff --git a/_posts/help/1970-01-01-fedora.md b/_posts/help/1970-01-01-fedora.md index ae1dccc..3c48b8d 100644 --- a/_posts/help/1970-01-01-fedora.md +++ b/_posts/help/1970-01-01-fedora.md @@ -26,7 +26,7 @@ Fedora 29 及更旧版本已不再受官方支持,Fedora 官方已将 Fedora 2 [fedora] name=Fedora $releasever - $basearch failovermethod=priority -baseurl=https://mirrors.tuna.tsinghua.edu.cn/fedora/releases/$releasever/Everything/$basearch/os/ +baseurl=https://{{ site.hostname }}/fedora/releases/$releasever/Everything/$basearch/os/ metadata_expire=28d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch @@ -39,7 +39,7 @@ skip_if_unavailable=False [updates] name=Fedora $releasever - $basearch - Updates failovermethod=priority -baseurl=https://mirrors.tuna.tsinghua.edu.cn/fedora/updates/$releasever/Everything/$basearch/ +baseurl=https://{{ site.hostname }}/fedora/updates/$releasever/Everything/$basearch/ enabled=1 gpgcheck=1 metadata_expire=6h @@ -53,7 +53,7 @@ skip_if_unavailable=False [fedora-modular] name=Fedora Modular $releasever - $basearch failovermethod=priority -baseurl=https://mirrors.tuna.tsinghua.edu.cn/fedora/releases/$releasever/Modular/$basearch/os/ +baseurl=https://{{ site.hostname }}/fedora/releases/$releasever/Modular/$basearch/os/ enabled=1 metadata_expire=7d gpgcheck=1 @@ -67,7 +67,7 @@ skip_if_unavailable=False [updates-modular] name=Fedora Modular $releasever - $basearch - Updates failovermethod=priority -baseurl=https://mirrors.tuna.tsinghua.edu.cn/fedora/updates/$releasever/Modular/$basearch/ +baseurl=https://{{ site.hostname }}/fedora/updates/$releasever/Modular/$basearch/ enabled=1 gpgcheck=1 metadata_expire=6h diff --git a/_posts/help/1970-01-01-gcc.git.md b/_posts/help/1970-01-01-gcc.git.md index 6b54da8..0bdd3e5 100644 --- a/_posts/help/1970-01-01-gcc.git.md +++ b/_posts/help/1970-01-01-gcc.git.md @@ -9,19 +9,19 @@ mirrorid: gcc.git 如需克隆 GCC 代码,使用 ``` -git clone https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git +git clone https://{{ site.hostname }}/git/gcc.git ``` 若要将 tuna mirror 加入已有代码库,可在已有仓库中运行 ``` -git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git +git remote add tuna https://{{ site.hostname }}/git/gcc.git ``` 或运行 ``` -git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git +git remote set-url origin https://{{ site.hostname }}/git/gcc.git ``` 将默认上游设置为 TUNA 镜像 diff --git a/_posts/help/1970-01-01-git-repo.md b/_posts/help/1970-01-01-git-repo.md index 981819c..95cae57 100644 --- a/_posts/help/1970-01-01-git-repo.md +++ b/_posts/help/1970-01-01-git-repo.md @@ -13,7 +13,7 @@ mirrorid: git-repo ### 下载 ``` -curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo +curl https://{{ site.hostname }}/git/git-repo -o repo chmod +x repo ``` @@ -24,7 +24,7 @@ chmod +x repo repo的运行过程中会尝试访问官方的git源更新自己,如果想使用tuna的镜像源进行更新,可以将如下内容复制到你的`~/.bashrc`里 ``` -export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo' +export REPO_URL='https://{{ site.hostname }}/git/git-repo' ``` 并重启终端模拟器。 diff --git a/_posts/help/1970-01-01-gitlab-ce.md b/_posts/help/1970-01-01-gitlab-ce.md index a8850f4..d5128c7 100644 --- a/_posts/help/1970-01-01-gitlab-ce.md +++ b/_posts/help/1970-01-01-gitlab-ce.md @@ -47,7 +47,7 @@ sudo apt-get install gitlab-ce {% raw %} {%endraw%} @@ -60,7 +60,7 @@ deb {{if os_name|equals>ubuntu}}https{{else}}http{{/if}}://mirrors.tuna.tsinghua ``` [gitlab-ce] name=Gitlab CE Repository -baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/ +baseurl=https://{{ site.hostname }}/gitlab-ce/yum/el$releasever/ gpgcheck=0 enabled=1 ``` diff --git a/_posts/help/1970-01-01-gitlab-ci-multi-runner.md b/_posts/help/1970-01-01-gitlab-ci-multi-runner.md index 5dcad69..0f6ac8a 100644 --- a/_posts/help/1970-01-01-gitlab-ci-multi-runner.md +++ b/_posts/help/1970-01-01-gitlab-ci-multi-runner.md @@ -7,7 +7,7 @@ mirrorid: gitlab-ci-multi-runner ## Gitlab CI Multi Runner 镜像使用帮助 **注意: gitlab-ci-multi-runner 镜像仅支持 x86-64 架构**,如果你需要安装版本 10 及以上的 -Runner,由于官方名称发生变化,请前往 [gitlab-runner帮助页面](https://mirrors.tuna.tsinghua.edu.cn/help/gitlab-runner/)。 +Runner,由于官方名称发生变化,请前往 [gitlab-runner帮助页面](https://{{ site.hostname }}/help/gitlab-runner/)。 ### Debian/Ubuntu 用户 @@ -48,7 +48,7 @@ sudo apt-get install gitlab-ci-multi-runner {% raw %} {%endraw%} @@ -86,7 +86,7 @@ sudo yum install gitlab-ci-multi-runner {%endraw%} @@ -86,7 +86,7 @@ sudo yum install gitlab-runner {%endraw%} @@ -47,7 +47,7 @@ deb https://mirrors.tuna.tsinghua.edu.cn/kubernetes/apt kubernetes-{{release_nam ``` [kubernetes] name=kubernetes -baseurl=https://mirrors.tuna.tsinghua.edu.cn/kubernetes/yum/repos/kubernetes-el7-x86_64 +baseurl=https://{{ site.hostname }}/kubernetes/yum/repos/kubernetes-el7-x86_64 enabled=1 ``` @@ -55,4 +55,4 @@ enabled=1 ### Minikube -请到 [minikube 镜像](https://mirrors.tuna.tsinghua.edu.cn/github-release/kubernetes/minikube/LatestRelease/) 下载。 +请到 [minikube 镜像](https://{{ site.hostname }}/github-release/kubernetes/minikube/LatestRelease/) 下载。 diff --git a/_posts/help/1970-01-01-lineage-rom.md b/_posts/help/1970-01-01-lineage-rom.md index dcbb9de..75bd69d 100644 --- a/_posts/help/1970-01-01-lineage-rom.md +++ b/_posts/help/1970-01-01-lineage-rom.md @@ -13,6 +13,6 @@ Lineage OS 是全球最大的 Android 发行版之一,前身是 Cyanogenmod。 正常情况下,Lineage会根据你的地址来定向请求到最近的镜像站,因此通常情况下不需要手动选择镜像站进行下载,直接前往官方的下载网站下载即可。 -但是如果你是校内的同学,或者因为其他原因希望一定从tuna下载Lineage的rom,可以直接访问 选择设备代码及时间进行下载,或者在镜像站的主页右边或下方找到"获取下载链接",在 操作系统 -> LineageOS 下找到最新的 rom 进行下载。 +但是如果你是校内的同学,或者因为其他原因希望一定从tuna下载Lineage的rom,可以直接访问 选择设备代码及时间进行下载,或者在镜像站的主页右边或下方找到"获取下载链接",在 操作系统 -> LineageOS 下找到最新的 rom 进行下载。 zip文件的使用方式请参考lineage的官方文档或自行Google。 diff --git a/_posts/help/1970-01-01-lineageos.md b/_posts/help/1970-01-01-lineageos.md index fbcb66b..8cf14f7 100644 --- a/_posts/help/1970-01-01-lineageos.md +++ b/_posts/help/1970-01-01-lineageos.md @@ -7,7 +7,7 @@ permalink: /help/lineageOS/ ## lineageOS 源代码镜像使用帮助 -**注意: 本镜像是 lineageOS 源代码的镜像,如果是希望下载lineage的rom,请访问 。** +**注意: 本镜像是 lineageOS 源代码的镜像,如果是希望下载lineage的rom,请访问 。** ### 过程摘录 @@ -20,7 +20,7 @@ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo ``` -或者使用tuna的[git-repo镜像](https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/) +或者使用tuna的[git-repo镜像](https://{{ site.hostname }}/help/git-repo/) 建立工作目录: @@ -32,7 +32,7 @@ cd WORKING_DIRECTORY 初始化仓库: ``` -repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git -b cm-14.1 +repo init -u https://{{ site.hostname }}/git/lineageOS/LineageOS/android.git -b cm-14.1 ``` (如果已经有从github同步的lineageOS源代码,可以从这里直接开始) @@ -53,7 +53,7 @@ repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/androi fetch="https://github.com/" /> ``` @@ -68,7 +68,7 @@ repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/androi ```xml > ~/.bash_profile +echo 'export HOMEBREW_BOTTLE_DOMAIN=https://{{ site.hostname }}/linuxbrew-bottles' >> ~/.bash_profile source ~/.bash_profile ``` diff --git a/_posts/help/1970-01-01-lxc-images.md b/_posts/help/1970-01-01-lxc-images.md index 53e1d3d..51f7039 100644 --- a/_posts/help/1970-01-01-lxc-images.md +++ b/_posts/help/1970-01-01-lxc-images.md @@ -9,10 +9,10 @@ mirrorid: lxc-images LXC 1.0 以上版本增加了 `download` 模版,支持下载定义好的系统镜像。 欲使用 TUNA 镜像进行下载加速,可以在 `lxc-create -t download` 的选项部分, -增加 `--server mirrors.tuna.tsinghua.edu.cn/lxc-images` 即可,例如: +增加 `--server {{ site.hostname }}/lxc-images` 即可,例如: ``` -# lxc-create -t download -n my-container -- --server mirrors.tuna.tsinghua.edu.cn/lxc-images +# lxc-create -t download -n my-container -- --server {{ site.hostname }}/lxc-images ``` **LXD/LXC 2.0使用镜像加速的方法**: @@ -20,6 +20,6 @@ LXC 1.0 以上版本增加了 `download` 模版,支持下载定义好的系统 创建一个remote链接,指向镜像站即可,或替换掉默认的images链接。 ``` -# lxc remote add tuna-images https://mirrors.tuna.tsinghua.edu.cn/lxc-images/ --protocol=simplestreams --public +# lxc remote add tuna-images https://{{ site.hostname }}/lxc-images/ --protocol=simplestreams --public # lxc image list tuna-images: ``` diff --git a/_posts/help/1970-01-01-mariadb.md b/_posts/help/1970-01-01-mariadb.md index 4a381f8..829db25 100644 --- a/_posts/help/1970-01-01-mariadb.md +++ b/_posts/help/1970-01-01-mariadb.md @@ -20,7 +20,7 @@ https://apt.mariadb.org/mariadb/repo 换为 ``` -https://mirrors.tuna.tsinghua.edu.cn/mariadb/repo +https://{{ site.hostname }}/mariadb/repo ``` ### RHEL/CentOS 等基于 yum 的系统 @@ -34,5 +34,5 @@ http://yum.mariadb.org 换为 ``` -https://mirrors.tuna.tsinghua.edu.cn/mariadb/yum -``` \ No newline at end of file +https://{{ site.hostname }}/mariadb/yum +``` diff --git a/_posts/help/1970-01-01-mongodb.md b/_posts/help/1970-01-01-mongodb.md index f66536c..84d57e2 100644 --- a/_posts/help/1970-01-01-mongodb.md +++ b/_posts/help/1970-01-01-mongodb.md @@ -38,7 +38,7 @@ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 {% raw %} {%endraw%} @@ -57,7 +57,7 @@ sudo apt-get install -y mongodb-org ``` [mongodb-org] name=MongoDB Repository -baseurl=https://mirrors.tuna.tsinghua.edu.cn/mongodb/yum/el$releasever/ +baseurl=https://{{ site.hostname }}/mongodb/yum/el$releasever/ gpgcheck=0 enabled=1 ``` diff --git a/_posts/help/1970-01-01-msys2.md b/_posts/help/1970-01-01-msys2.md index c101af1..57b2a99 100644 --- a/_posts/help/1970-01-01-msys2.md +++ b/_posts/help/1970-01-01-msys2.md @@ -16,7 +16,7 @@ MSYS2 镜像使用帮助 安装 -------------- -请访问该镜像目录下的 `distrib/` 目录([x86_64](https://mirrors.tuna.tsinghua.edu.cn/msys2/distrib/x86_64) 、[i686](https://mirrors.tuna.tsinghua.edu.cn/msys2/distrib/i686/)),找到名为 `msys2-<架构>-<日期>.exe` 的文件(如 `msys2-x86_64-20141113.exe`),下载安装即可。 +请访问该镜像目录下的 `distrib/` 目录([x86_64](https://{{ site.hostname }}/msys2/distrib/x86_64) 、[i686](https://{{ site.hostname }}/msys2/distrib/i686/)),找到名为 `msys2-<架构>-<日期>.exe` 的文件(如 `msys2-x86_64-20141113.exe`),下载安装即可。 pacman 的配置 ------------- @@ -24,19 +24,19 @@ pacman 的配置 编辑 `/etc/pacman.d/mirrorlist.mingw32` ,在文件开头添加: ```bash -Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686 +Server = https://{{ site.hostname }}/msys2/mingw/i686 ``` 编辑 `/etc/pacman.d/mirrorlist.mingw64` ,在文件开头添加: ```bash -Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64 +Server = https://{{ site.hostname }}/msys2/mingw/x86_64 ``` 编辑 `/etc/pacman.d/mirrorlist.msys` ,在文件开头添加: ```bash -Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/$arch +Server = https://{{ site.hostname }}/msys2/msys/$arch ``` 然后执行 `pacman -Sy` 刷新软件包数据即可。 diff --git a/_posts/help/1970-01-01-mysql.md b/_posts/help/1970-01-01-mysql.md index 94ca6c2..c2106b3 100644 --- a/_posts/help/1970-01-01-mysql.md +++ b/_posts/help/1970-01-01-mysql.md @@ -37,7 +37,7 @@ mirrorid: mysql {% raw %} {%endraw%} @@ -68,35 +68,35 @@ deb https://mirrors.tuna.tsinghua.edu.cn/mysql/apt/{{os_name}} {{release_name}} {%endraw%} -ISO安装文件下载:[https://mirrors.tuna.tsinghua.edu.cn/proxmox/iso/](https://mirrors.tuna.tsinghua.edu.cn/proxmox/iso/) \ No newline at end of file +ISO安装文件下载:[https://{{ site.hostname }}/proxmox/iso/](https://{{ site.hostname }}/proxmox/iso/) diff --git a/_posts/help/1970-01-01-pybombs.md b/_posts/help/1970-01-01-pybombs.md index 4c09c8e..12432fb 100644 --- a/_posts/help/1970-01-01-pybombs.md +++ b/_posts/help/1970-01-01-pybombs.md @@ -22,8 +22,8 @@ PyBOMBS 镜像使用帮助 ```bash sudo pip install pybombs rm -rf ~/.pybombs -pybombs recipes add gr-recipes git+https://mirrors.tuna.tsinghua.edu.cn/pybombs/recipes/gr-recipes.git -pybombs recipes add gr-etcetera git+https://mirrors.tuna.tsinghua.edu.cn/pybombs/recipes/gr-etcetera.git +pybombs recipes add gr-recipes git+https://{{ site.hostname }}/pybombs/recipes/gr-recipes.git +pybombs recipes add gr-etcetera git+https://{{ site.hostname }}/pybombs/recipes/gr-etcetera.git mkdir gnuradio-prefix cd gnuradio-prefix pybombs prefix init @@ -41,8 +41,8 @@ pybombs install rtl-sdr hackrf bladeRF gr-osmosdr gr-bluetooth gr-ieee-80211 ```bash pybombs recipes remove gr-recipes pybombs recipes remove gr-etcetera -pybombs recipes add gr-recipes git+https://mirrors.tuna.tsinghua.edu.cn/pybombs/recipes/gr-recipes.git -pybombs recipes add gr-etcetera git+https://mirrors.tuna.tsinghua.edu.cn/pybombs/recipes/gr-etcetera.git +pybombs recipes add gr-recipes git+https://{{ site.hostname }}/pybombs/recipes/gr-recipes.git +pybombs recipes add gr-etcetera git+https://{{ site.hostname }}/pybombs/recipes/gr-etcetera.git ``` - 本镜像使用 脚本进行构建。 diff --git a/_posts/help/1970-01-01-pypi.md b/_posts/help/1970-01-01-pypi.md index 9ac1f31..51d98b7 100644 --- a/_posts/help/1970-01-01-pypi.md +++ b/_posts/help/1970-01-01-pypi.md @@ -11,7 +11,7 @@ pypi 镜像每 5 分钟同步一次。 ### 临时使用 ``` -pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package +pip install -i https://{{ site.pypi }}/simple some-package ``` 注意,`simple` 不能少, 是 `https` 而不是 `http` @@ -22,11 +22,11 @@ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package ``` pip install pip -U -pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple +pip config set global.index-url https://{{ site.pypi }}/simple ``` 如果您到 pip 默认源的网络连接较差,临时使用本镜像站来升级 pip: ``` -pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U +pip install -i https://{{ site.pypi }}/simple pip -U ``` diff --git a/_posts/help/1970-01-01-qemu.git.md b/_posts/help/1970-01-01-qemu.git.md index a890764..2640b7e 100644 --- a/_posts/help/1970-01-01-qemu.git.md +++ b/_posts/help/1970-01-01-qemu.git.md @@ -9,19 +9,19 @@ mirrorid: qemu.git 如需克隆 QEMU 代码,使用 ``` -git clone https://mirrors.tuna.tsinghua.edu.cn/git/qemu.git +git clone https://{{ site.hostname }}/git/qemu.git ``` 若要将 tuna mirror 加入已有代码库,可在已有仓库中运行 ``` -git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/qemu.git +git remote add tuna https://{{ site.hostname }}/git/qemu.git ``` 或运行 ``` -git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/qemu.git +git remote set-url origin https://{{ site.hostname }}/git/qemu.git ``` 将默认上游设置为 TUNA 镜像 diff --git a/_posts/help/1970-01-01-raspbian.md b/_posts/help/1970-01-01-raspbian.md index bb53f69..7f5354b 100644 --- a/_posts/help/1970-01-01-raspbian.md +++ b/_posts/help/1970-01-01-raspbian.md @@ -66,11 +66,11 @@ testing 版本的 7.0/wheezy,所以 Raspbian 不倾向于使用 stable/testing {% raw %} {% endraw %} diff --git a/_posts/help/1970-01-01-repo-ck.md b/_posts/help/1970-01-01-repo-ck.md index 7d97d0f..63cd745 100644 --- a/_posts/help/1970-01-01-repo-ck.md +++ b/_posts/help/1970-01-01-repo-ck.md @@ -18,7 +18,7 @@ mirrorid: repo-ck ``` [repo-ck] -Server = https://mirrors.tuna.tsinghua.edu.cn/repo-ck/$arch +Server = https://{{ site.hostname }}/repo-ck/$arch ``` 再增加 GPG 信任: diff --git a/_posts/help/1970-01-01-ros.md b/_posts/help/1970-01-01-ros.md index 47ff171..2369fdd 100644 --- a/_posts/help/1970-01-01-ros.md +++ b/_posts/help/1970-01-01-ros.md @@ -31,7 +31,7 @@ mirrorid: ros {% raw %} {%endraw%} @@ -40,4 +40,4 @@ deb https://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ {{release_name}} main ``` sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 sudo apt update -``` \ No newline at end of file +``` diff --git a/_posts/help/1970-01-01-rpmfusion.md b/_posts/help/1970-01-01-rpmfusion.md index eb7b187..9a1aca2 100644 --- a/_posts/help/1970-01-01-rpmfusion.md +++ b/_posts/help/1970-01-01-rpmfusion.md @@ -17,19 +17,19 @@ sudo yum install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusi 或者如下直接用 TUNA 镜像中的 rpm 包: ``` -sudo yum install --nogpgcheck https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm +sudo yum install --nogpgcheck https://{{ site.hostname }}/rpmfusion/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://{{ site.hostname }}/rpmfusion/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm ``` 注意:没有将当前用户设为管理员的用户,需要将 `sudo CMD` 替换为 `su -c 'CMD'`,并输入 root 密码。 ### 修改链接指向 TUNA 镜像 -安装成功后,修改 `/etc/yum.repos.d/` 目录下以 `rpmfusion` 开头,以 `.repo` 结尾的文件。具体而言,需要将文件中的 `baseurl=` 开头的行等号后面链接中的 `http://download1.rpmfusion.org/` 替换为 `https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/`,替换后的文件类似如下: +安装成功后,修改 `/etc/yum.repos.d/` 目录下以 `rpmfusion` 开头,以 `.repo` 结尾的文件。具体而言,需要将文件中的 `baseurl=` 开头的行等号后面链接中的 `http://download1.rpmfusion.org/` 替换为 `https://{{ site.hostname }}/rpmfusion/`,替换后的文件类似如下: ``` [rpmfusion-free] name=RPM Fusion for Fedora $releasever - Free -baseurl=https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/free/fedora/releases/$releasever/Everything/$basearch/os/ +baseurl=https://{{ site.hostname }}/rpmfusion/free/fedora/releases/$releasever/Everything/$basearch/os/ mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-$releasever&arch=$basearch enabled=1 metadata_expire=7d @@ -46,7 +46,7 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever-$ba [rpmfusion-free-source] name=RPM Fusion for Fedora $releasever - Free - Source -baseurl=https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/free/fedora/releases/$releasever/Everything/source/SRPMS/ +baseurl=https://{{ site.hostname }}/rpmfusion/free/fedora/releases/$releasever/Everything/source/SRPMS/ mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-source-$releasever&arch=$basearch enabled=0 metadata_expire=7d diff --git a/_posts/help/1970-01-01-stackage.md b/_posts/help/1970-01-01-stackage.md index e34e724..e3b5f31 100644 --- a/_posts/help/1970-01-01-stackage.md +++ b/_posts/help/1970-01-01-stackage.md @@ -6,16 +6,16 @@ mirrorid: stackage ## stackage 镜像使用帮助 -本镜像推荐与 TUNA 的 [Hackage 镜像](https://mirrors.tuna.tsinghua.edu.cn/help/hackage/)配合使用。 +本镜像推荐与 TUNA 的 [Hackage 镜像](https://{{ site.hostname }}/help/hackage/)配合使用。 ### stack >= v2.1.1 修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`), 加上: ```yaml -setup-info: "http://mirrors.tuna.tsinghua.edu.cn/stackage/stack-setup.yaml" +setup-info: "http://{{ site.hostname }}/stackage/stack-setup.yaml" urls: - latest-snapshot: http://mirrors.tuna.tsinghua.edu.cn/stackage/snapshots.json + latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json ``` ### stack < v2.1.1 @@ -23,9 +23,9 @@ urls: 修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`), 加上: ```yaml -setup-info: "http://mirrors.tuna.tsinghua.edu.cn/stackage/stack-setup.yaml" +setup-info: "http://{{ site.hostname }}/stackage/stack-setup.yaml" urls: - latest-snapshot: http://mirrors.tuna.tsinghua.edu.cn/stackage/snapshots.json - lts-build-plans: http://mirrors.tuna.tsinghua.edu.cn/stackage/lts-haskell/ - nightly-build-plans: http://mirrors.tuna.tsinghua.edu.cn/stackage/stackage-nightly/ + latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json + lts-build-plans: http://{{ site.hostname }}/stackage/lts-haskell/ + nightly-build-plans: http://{{ site.hostname }}/stackage/stackage-nightly/ ``` diff --git a/_posts/help/1970-01-01-termux.md b/_posts/help/1970-01-01-termux.md index 879dfa7..0d41834 100644 --- a/_posts/help/1970-01-01-termux.md +++ b/_posts/help/1970-01-01-termux.md @@ -33,9 +33,9 @@ Termux 是运行在 Android 上的 terminal。不需要root,运行于内部存 使用如下命令自动替换官方源为 TUNA 镜像源 ``` bash -sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/termux-packages-24 stable main@' $PREFIX/etc/apt/sources.list -sed -i 's@^\(deb.*games stable\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/game-packages-24 games stable@' $PREFIX/etc/apt/sources.list.d/game.list -sed -i 's@^\(deb.*science stable\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/science-packages-24 science stable@' $PREFIX/etc/apt/sources.list.d/science.list +sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://{{ site.hostname }}/termux/termux-packages-24 stable main@' $PREFIX/etc/apt/sources.list +sed -i 's@^\(deb.*games stable\)$@#\1\ndeb https://{{ site.hostname }}/termux/game-packages-24 games stable@' $PREFIX/etc/apt/sources.list.d/game.list +sed -i 's@^\(deb.*science stable\)$@#\1\ndeb https://{{ site.hostname }}/termux/science-packages-24 science stable@' $PREFIX/etc/apt/sources.list.d/science.list apt update && apt upgrade ``` @@ -45,21 +45,21 @@ apt update && apt upgrade ``` # The termux repository mirror from TUNA: -deb https://mirrors.tuna.tsinghua.edu.cn/termux/termux-packages-24 stable main +deb https://{{ site.hostname }}/termux/termux-packages-24 stable main ``` 编辑 `$PREFIX/etc/apt/sources.list.d/science.list` 修改为如下内容 ``` # The termux repository mirror from TUNA: -deb https://mirrors.tuna.tsinghua.edu.cn/termux/science-packages-24 science stable +deb https://{{ site.hostname }}/termux/science-packages-24 science stable ``` 编辑 `$PREFIX/etc/apt/sources.list.d/game.list` 修改为如下内容 ``` # The termux repository mirror from TUNA: -deb https://mirrors.tuna.tsinghua.edu.cn/termux/game-packages-24 games stable +deb https://{{ site.hostname }}/termux/game-packages-24 games stable ``` 请使用内置或安装在 Termux 里的文本编辑器,例如 `vi` / `vim` / `nano` 等,**不要使用 RE 管理器等其他具有 ROOT 权限的外部 APP** 来修改 Termux 的文件 @@ -67,9 +67,9 @@ deb https://mirrors.tuna.tsinghua.edu.cn/termux/game-packages-24 games stable 镜像站还提供了如下社区维护的源,如需使用请自行添加: -- https://mirrors.tuna.tsinghua.edu.cn/termux/x11-packages -- https://mirrors.tuna.tsinghua.edu.cn/termux/unstable-packages -- https://mirrors.tuna.tsinghua.edu.cn/termux/termux-root-packages-24 +- https://{{ site.hostname }}/termux/x11-packages +- https://{{ site.hostname }}/termux/unstable-packages +- https://{{ site.hostname }}/termux/termux-root-packages-24 ### 警告 diff --git a/_posts/help/1970-01-01-ubuntu.md b/_posts/help/1970-01-01-ubuntu.md index 1d55cd0..c96998d 100644 --- a/_posts/help/1970-01-01-ubuntu.md +++ b/_posts/help/1970-01-01-ubuntu.md @@ -35,18 +35,18 @@ TUNA 的软件源镜像。 {% raw %} {% endraw %} diff --git a/_posts/help/1970-01-01-voidlinux.md b/_posts/help/1970-01-01-voidlinux.md index 5df25a5..6eca8b3 100644 --- a/_posts/help/1970-01-01-voidlinux.md +++ b/_posts/help/1970-01-01-voidlinux.md @@ -11,9 +11,9 @@ mirrorid: voidlinux ``` # mkdir -p /etc/xbps.d # cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/ -# sed -i 's|https://alpha.de.repo.voidlinux.org|https://mirrors.tuna.tsinghua.edu.cn/voidlinux|g' /etc/xbps.d/*-repository-*.conf +# sed -i 's|https://alpha.de.repo.voidlinux.org|https://{{ site.hostname }}/voidlinux|g' /etc/xbps.d/*-repository-*.conf ``` 之后可用 `xbps-query -L` 检查是否正确替换。 -参考[官方教程](https://docs.voidlinux.org/xbps/repositories/mirrors/changing.html)。 \ No newline at end of file +参考[官方教程](https://docs.voidlinux.org/xbps/repositories/mirrors/changing.html)。 diff --git a/_posts/help/2007-08-31-alpine.md b/_posts/help/2007-08-31-alpine.md index f6ed489..b56caab 100644 --- a/_posts/help/2007-08-31-alpine.md +++ b/_posts/help/2007-08-31-alpine.md @@ -13,5 +13,5 @@ Alpine Linux 是一个面向安全,轻量级的基于musl libc与busybox项目 在终端输入以下命令以替换TUNA镜像源: ``` -sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories +sed -i 's/dl-cdn.alpinelinux.org/{{ site.hostname }}/g' /etc/apk/repositories ``` diff --git a/_posts/help/2016-06-19-virtualbox.md b/_posts/help/2016-06-19-virtualbox.md index 98e9e72..7b3c4f8 100644 --- a/_posts/help/2016-06-19-virtualbox.md +++ b/_posts/help/2016-06-19-virtualbox.md @@ -10,12 +10,12 @@ mirrorid: virtualbox ## Microsoft Windows -[点击下载 Windows 最新版](https://mirrors.tuna.tsinghua.edu.cn/virtualbox/virtualbox-Win-latest.exe) +[点击下载 Windows 最新版](https://{{ site.hostname }}/virtualbox/virtualbox-Win-latest.exe) ## Macintosh OS X -[点击下载 OS X 最新版](https://mirrors.tuna.tsinghua.edu.cn/virtualbox/virtualbox-osx-latest.dmg) +[点击下载 OS X 最新版](https://{{ site.hostname }}/virtualbox/virtualbox-osx-latest.dmg) # Linux @@ -76,7 +76,7 @@ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key a {% raw %} {% endraw %} @@ -95,7 +95,7 @@ sudo apt-get install virtualbox-5.0 ``` [virtualbox] name=Virtualbox Repository -baseurl=https://mirrors.tuna.tsinghua.edu.cn/virtualbox/rpm/el$releasever/ +baseurl=https://{{ site.hostname }}/virtualbox/rpm/el$releasever/ gpgcheck=0 enabled=1 ``` diff --git a/_posts/help/2016-06-21-repoforge.md b/_posts/help/2016-06-21-repoforge.md index 1eb3b59..a5ade2b 100644 --- a/_posts/help/2016-06-21-repoforge.md +++ b/_posts/help/2016-06-21-repoforge.md @@ -13,7 +13,7 @@ mirrorid: repoforge 1. 运行 `cat /etc/redhat-release` 获取 EL 版本号(如 EL6, EL7 等) 2. 向系统中添加 Repoforge 的 GPG 公钥: ``` -rpm --import https://mirrors.tuna.tsinghua.edu.cn/repoforge/RPM-GPG-KEY.dag.txt +rpm --import https://{{ site.hostname }}/repoforge/RPM-GPG-KEY.dag.txt ``` 3. 运行下列命令: @@ -35,7 +35,7 @@ rpm --import https://mirrors.tuna.tsinghua.edu.cn/repoforge/RPM-GPG-KEY.dag.txt sudo cat > /etc/yum.repos.d/rpmforge.repo << EOF [rpmforge] name = RHEL $releasever - RPMforge.net - dag -baseurl = https://mirrors.tuna.tsinghua.edu.cn/repoforge/redhat/{{release_name}}/en/$basearch/rpmforge +baseurl = https://{{ site.hostname }}/repoforge/redhat/{{release_name}}/en/$basearch/rpmforge mirrorlist = http://mirrorlist.repoforge.org/{{release_name}}/mirrors-rpmforge enabled = 1 protect = 0 @@ -44,7 +44,7 @@ gpgcheck = 1 [rpmforge-extras] name = RHEL $releasever - RPMforge.net - extras -baseurl = https://mirrors.tuna.tsinghua.edu.cn/repoforge/redhat/{{release_name}}/en/$basearch/extras +baseurl = https://{{ site.hostname }}/repoforge/redhat/{{release_name}}/en/$basearch/extras mirrorlist = http://mirrorlist.repoforge.org/{{release_name}}/mirrors-rpmforge-extras enabled = 0 protect = 0 @@ -53,7 +53,7 @@ gpgcheck = 1 [rpmforge-testing] name = RHEL $releasever - RPMforge.net - testing -baseurl = https://mirrors.tuna.tsinghua.edu.cn/repoforge/redhat/{{release_name}}/en/$basearch/testing +baseurl = https://{{ site.hostname }}/repoforge/redhat/{{release_name}}/en/$basearch/testing mirrorlist = http://mirrorlist.repoforge.org/{{release_name}}/mirrors-rpmforge-testing enabled = 0 protect = 0 diff --git a/_posts/help/2016-08-18-rubygems.md b/_posts/help/2016-08-18-rubygems.md index 5db2c92..413936a 100644 --- a/_posts/help/2016-08-18-rubygems.md +++ b/_posts/help/2016-08-18-rubygems.md @@ -12,19 +12,19 @@ mirrorid: rubygems ```bash # 添加 TUNA 源并移除默认源 -gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/ +gem sources --add https://{{ site.hostname }}/rubygems/ --remove https://rubygems.org/ # 列出已有源 gem sources -l # 应该只有 TUNA 一个 ``` -或者,编辑 `~/.gemrc`,将 `https://mirrors.tuna.tsinghua.edu.cn/rubygems/` 加到 `sources` 字段。 +或者,编辑 `~/.gemrc`,将 `https://{{ site.hostname }}/rubygems/` 加到 `sources` 字段。 ## `bundler` 使用以下命令替换 bundler 默认源 ```bash -bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems +bundle config mirror.https://rubygems.org https://{{ site.hostname }}/rubygems ``` 官方文档: http://bundler.io/v1.16/man/bundle-config.1.html#MIRRORS-OF-GEM-SOURCES diff --git a/_posts/help/2017-01-12-bioconductor.md b/_posts/help/2017-01-12-bioconductor.md index 5c39117..3815464 100644 --- a/_posts/help/2017-01-12-bioconductor.md +++ b/_posts/help/2017-01-12-bioconductor.md @@ -13,7 +13,7 @@ Bioconductor 镜像源配置文件之一是 `.Rprofile` (linux 下位于 `~/.Rpr 在文末添加如下语句: ``` -options(BioC_mirror="https://mirrors.tuna.tsinghua.edu.cn/bioconductor") +options(BioC_mirror="https://{{ site.hostname }}/bioconductor") ``` 打开R即可使用该 Bioconductor 镜像源安装 Bioconductor 软件包。 diff --git a/_posts/help/2017-01-17-CRAN.md b/_posts/help/2017-01-17-CRAN.md index d6bda33..ccd44cd 100644 --- a/_posts/help/2017-01-17-CRAN.md +++ b/_posts/help/2017-01-17-CRAN.md @@ -13,7 +13,7 @@ CRAN 镜像使用帮助 在文末添加如下语句: ``` -options("repos" = c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/")) +options("repos" = c(CRAN="https://{{ site.hostname }}/CRAN/")) ``` 打开 R 即可使用该 CRAN 镜像源安装 R 软件包。 diff --git a/_posts/help/2017-05-28-llvm.md b/_posts/help/2017-05-28-llvm.md index a58a4c3..f84e177 100644 --- a/_posts/help/2017-05-28-llvm.md +++ b/_posts/help/2017-05-28-llvm.md @@ -15,7 +15,7 @@ http://llvm.org/git/{llvm,clang,libcxx,lldb,clang-tools-extra,polly,zorg,compile 使用方法: ``` -git clone https://mirrors.tuna.tsinghua.edu.cn/git/llvm/{reponame}.git +git clone https://{{ site.hostname }}/git/llvm/{reponame}.git ``` 其中`{reponame}`为上述的仓库名称之一。请注意:由于仓库体积均较大,执行`git clone`可能需要较长时间,并且没有进度提示,请耐心等候。 @@ -23,13 +23,13 @@ git clone https://mirrors.tuna.tsinghua.edu.cn/git/llvm/{reponame}.git 若要将 TUNA mirror 加入已有代码库,可在已有仓库中运行 ``` -git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/llvm/{reponame}.git +git remote add tuna https://{{ site.hostname }}/git/llvm/{reponame}.git ``` 或运行 ``` -git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/llvm/{reponame}.git +git remote set-url origin https://{{ site.hostname }}/git/llvm/{reponame}.git ``` 将默认上游设置为 TUNA 镜像 diff --git a/_posts/help/2017-08-10-CTAN.md b/_posts/help/2017-08-10-CTAN.md index b14fe48..297dcdd 100644 --- a/_posts/help/2017-08-10-CTAN.md +++ b/_posts/help/2017-08-10-CTAN.md @@ -12,7 +12,7 @@ CTAN 镜像使用帮助 在命令行中执行 ``` -tlmgr option repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet +tlmgr option repository https://{{ site.hostname }}/CTAN/systems/texlive/tlnet ``` 即可永久更改镜像源。 @@ -20,7 +20,7 @@ tlmgr option repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texliv 如果只需要临时切换,可以用如下命令: ``` -tlmgr update --all --repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet +tlmgr update --all --repository https://{{ site.hostname }}/CTAN/systems/texlive/tlnet ``` 其中的 `update --all` 指令可根据需要修改。 diff --git a/_posts/help/2017-11-28-openthos-src.md b/_posts/help/2017-11-28-openthos-src.md index 9e768ff..ddf1c93 100644 --- a/_posts/help/2017-11-28-openthos-src.md +++ b/_posts/help/2017-11-28-openthos-src.md @@ -6,7 +6,7 @@ mirrorid: openthos-src # OpenTHOS 源代码镜像使用帮助 -**注意: 本镜像是 OpenTHOS 源代码的镜像,如果是希望下载 OpenTHOS 的安装镜像,请访问 。** +**注意: 本镜像是 OpenTHOS 源代码的镜像,如果是希望下载 OpenTHOS 的安装镜像,请访问 。** OpenTHOS 是基于 Android x86 的一套具有自主知识产权的开源桌面操作系统。其源代码获取方式类似于 AOSP, -但需要将上游地址指向 `https://mirrors.tuna.tsinghua.edu.cn/git/openthos-src/manifest`。 +但需要将上游地址指向 `https://{{ site.hostname }}/git/openthos-src/manifest`。 diff --git a/_posts/help/2017-12-29-gentoo-portage.md b/_posts/help/2017-12-29-gentoo-portage.md index 15c9bdf..83729b5 100644 --- a/_posts/help/2017-12-29-gentoo-portage.md +++ b/_posts/help/2017-12-29-gentoo-portage.md @@ -11,7 +11,7 @@ mirrorid: gentoo-portage 在 `/etc/portage/make.conf` 中加入: ``` -GENTOO_MIRRORS="https://mirrors.tuna.tsinghua.edu.cn/gentoo" +GENTOO_MIRRORS="https://{{ site.hostname }}/gentoo" ``` 执行 `emerge --sync` 或者 `eix-sync` 进行更新。 diff --git a/_posts/help/2019-02-15-grafana.md b/_posts/help/2019-02-15-grafana.md index c87636b..431d270 100644 --- a/_posts/help/2019-02-15-grafana.md +++ b/_posts/help/2019-02-15-grafana.md @@ -47,7 +47,7 @@ sudo apt-get install grafana {% raw %} {%endraw%} @@ -83,7 +83,7 @@ sudo yum install grafana