From 1122afcb15f49de08d4fdcd0a503a06b9d73f5ce Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Sun, 22 Mar 2020 22:41:24 +0800 Subject: [PATCH] Bulk replace mirrors.tuna.tsinghua.edu.cn to site.host --- _config.yml | 3 ++ _includes/nav.html | 2 +- _layouts/index.html | 6 ++-- _posts/help/1970-01-01-CocoaPods.md | 6 ++-- _posts/help/1970-01-01-anaconda.md | 30 ++++++++-------- _posts/help/1970-01-01-aosp.md | 6 ++-- _posts/help/1970-01-01-archlinux.md | 2 +- _posts/help/1970-01-01-archlinuxcn.md | 4 +-- _posts/help/1970-01-01-bananian.md | 20 +++++------ _posts/help/1970-01-01-binutils-gdb.git.md | 6 ++-- _posts/help/1970-01-01-centos.md | 20 +++++------ _posts/help/1970-01-01-chromiumos.md | 6 ++-- _posts/help/1970-01-01-clickhouse.md | 4 +-- _posts/help/1970-01-01-crates.io-index.git.md | 2 +- _posts/help/1970-01-01-cygwin.md | 4 +-- _posts/help/1970-01-01-debian.md | 16 ++++----- _posts/help/1970-01-01-docker-ce.md | 6 ++-- _posts/help/1970-01-01-elpa.md | 34 +++++++++---------- _posts/help/1970-01-01-epel.md | 12 +++---- _posts/help/1970-01-01-fdroid.md | 4 +-- _posts/help/1970-01-01-fedora.md | 8 ++--- _posts/help/1970-01-01-gcc.git.md | 6 ++-- _posts/help/1970-01-01-git-repo.md | 4 +-- _posts/help/1970-01-01-gitlab-ce.md | 4 +-- .../help/1970-01-01-gitlab-ci-multi-runner.md | 6 ++-- _posts/help/1970-01-01-gitlab-runner.md | 4 +-- _posts/help/1970-01-01-glibc.git.md | 6 ++-- _posts/help/1970-01-01-hackage.md | 12 +++---- _posts/help/1970-01-01-homebrew-bottles.md | 6 ++-- _posts/help/1970-01-01-homebrew.md | 20 +++++------ _posts/help/1970-01-01-kubernetes.md | 6 ++-- _posts/help/1970-01-01-lineage-rom.md | 2 +- _posts/help/1970-01-01-lineageos.md | 8 ++--- _posts/help/1970-01-01-linux-firmware.git.md | 6 ++-- _posts/help/1970-01-01-linux-next.git.md | 6 ++-- _posts/help/1970-01-01-linux-stable.git.md | 6 ++-- _posts/help/1970-01-01-linux.git.md | 8 ++--- _posts/help/1970-01-01-linuxbrew-bottles.md | 6 ++-- _posts/help/1970-01-01-lxc-images.md | 6 ++-- _posts/help/1970-01-01-mariadb.md | 6 ++-- _posts/help/1970-01-01-mongodb.md | 4 +-- _posts/help/1970-01-01-msys2.md | 8 ++--- _posts/help/1970-01-01-mysql.md | 12 +++---- _posts/help/1970-01-01-nodejs-release.md | 2 +- _posts/help/1970-01-01-nodesource.md | 4 +-- _posts/help/1970-01-01-packagist.md | 2 +- _posts/help/1970-01-01-proxmox.md | 4 +-- _posts/help/1970-01-01-pybombs.md | 8 ++--- _posts/help/1970-01-01-qemu.git.md | 6 ++-- _posts/help/1970-01-01-raspbian.md | 6 ++-- _posts/help/1970-01-01-repo-ck.md | 2 +- _posts/help/1970-01-01-ros.md | 4 +-- _posts/help/1970-01-01-rpmfusion.md | 8 ++--- _posts/help/1970-01-01-stackage.md | 14 ++++---- _posts/help/1970-01-01-termux.md | 18 +++++----- _posts/help/1970-01-01-ubuntu.md | 20 +++++------ _posts/help/1970-01-01-voidlinux.md | 4 +-- _posts/help/2007-08-31-alpine.md | 2 +- _posts/help/2016-06-19-virtualbox.md | 8 ++--- _posts/help/2016-06-21-repoforge.md | 8 ++--- _posts/help/2016-08-18-rubygems.md | 6 ++-- _posts/help/2017-01-12-bioconductor.md | 2 +- _posts/help/2017-01-17-CRAN.md | 2 +- _posts/help/2017-05-28-llvm.md | 6 ++-- _posts/help/2017-08-10-CTAN.md | 4 +-- _posts/help/2017-11-28-openthos-src.md | 4 +-- _posts/help/2017-12-29-gentoo-portage.md | 2 +- _posts/help/2019-02-15-grafana.md | 4 +-- _posts/help/2019-02-15-rustup.md | 16 ++++----- _posts/help/2019-02-17-nix.md | 22 ++++++------ _posts/help/2019-02-25-dart-pub.md | 8 ++--- _posts/help/2019-02-27-flutter.md | 8 ++--- _posts/help/2019-03-18-arch4edu.md | 6 ++-- _posts/help/2019-05-03-qubesos.md | 2 +- _posts/help/2019-06-25-solus.md | 6 ++-- _posts/help/2019-07-23-kicad.md | 8 ++--- _posts/help/2020-02-21-gentoo-prefix.md | 10 +++--- _posts/help/2020-03-06-tlpretest.md | 4 +-- 78 files changed, 298 insertions(+), 295 deletions(-) diff --git a/_config.yml b/_config.yml index 2dc19b3..2957572 100644 --- a/_config.yml +++ b/_config.yml @@ -11,6 +11,9 @@ brand: Tsinghua Open Source Mirror baseurl: "" # the subpath of your site, e.g. /blog permalink: "/:categories/:title/" url: "https://mirrors.tuna.tsinghua.edu.cn" +host: "mirrors.tuna.tsinghua.edu.cn" +urlv4: "https://mirrors4.tuna.tsinghua.edu.cn" +urlv6: "https://mirrors6.tuna.tsinghua.edu.cn" # Build settings highlighter: rouge diff --git a/_includes/nav.html b/_includes/nav.html index 9053418..44f207d 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -34,7 +34,7 @@
  • BLOG
  • RSS
  • PODCAST
  • -
  • MIRRORS
  • +
  • MIRRORS
  • diff --git a/_layouts/index.html b/_layouts/index.html index ab08a40..ef6d5e8 100644 --- a/_layouts/index.html +++ b/_layouts/index.html @@ -91,9 +91,9 @@

    域名选择

    {% unless page.legacy %} diff --git a/_posts/help/1970-01-01-CocoaPods.md b/_posts/help/1970-01-01-CocoaPods.md index 33ed40e..b576ab7 100644 --- a/_posts/help/1970-01-01-CocoaPods.md +++ b/_posts/help/1970-01-01-CocoaPods.md @@ -12,7 +12,7 @@ CocoaPods 是一个 Cocoa 和 Cocoa Touch 框架的依赖管理器,具体原 ``` $ pod repo remove master -$ pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git +$ pod repo add master https://{{ site.host }}/git/CocoaPods/Specs.git $ pod repo update ``` @@ -21,11 +21,11 @@ $ pod repo update ``` $ cd ~/.cocoapods/repos $ pod repo remove master -$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master +$ git clone https://{{ site.host }}/git/CocoaPods/Specs.git master ``` 最后进入自己的工程,在自己工程的`podFile`第一行加上: ``` -source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git' +source 'https://{{ site.host }}/git/CocoaPods/Specs.git' ``` diff --git a/_posts/help/1970-01-01-anaconda.md b/_posts/help/1970-01-01-anaconda.md index 18680a6..da3cac8 100644 --- a/_posts/help/1970-01-01-anaconda.md +++ b/_posts/help/1970-01-01-anaconda.md @@ -8,9 +8,9 @@ mirrorid: anaconda Anaconda 是一个用于科学计算的 Python 发行版,支持 Linux, Mac, Windows, 包含了众多流行的科学计算、数据分析的 Python 包。 -Anaconda 安装包可以到 下载。 +Anaconda 安装包可以到 <{{ site.url }}/anaconda/archive/> 下载。 -TUNA 还提供了 Anaconda 仓库与第三方源(conda-forge、msys2、pytorch等,[查看完整列表](https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/))的镜像,各系统都可以通过修改用户目录下的 `.condarc` 文件。Windows 用户无法直接创建名为 `.condarc` 的文件,可先执行 `conda config --set show_channel_urls yes` 生成该文件之后再修改。 +TUNA 还提供了 Anaconda 仓库与第三方源(conda-forge、msys2、pytorch等,[查看完整列表]({{ site.url }}/anaconda/cloud/))的镜像,各系统都可以通过修改用户目录下的 `.condarc` 文件。Windows 用户无法直接创建名为 `.condarc` 的文件,可先执行 `conda config --set show_channel_urls yes` 生成该文件之后再修改。 注:由于更新过快难以同步,我们不同步`pytorch-nightly`, `pytorch-nightly-cpu`, `ignite-nightly`这三个包。 @@ -18,20 +18,20 @@ TUNA 还提供了 Anaconda 仓库与第三方源(conda-forge、msys2、pytorch channels: - defaults show_channel_urls: true -channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda +channel_alias: {{ site.url }}/anaconda default_channels: - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 + - {{ site.url }}/anaconda/pkgs/main + - {{ site.url }}/anaconda/pkgs/free + - {{ site.url }}/anaconda/pkgs/r + - {{ site.url }}/anaconda/pkgs/pro + - {{ site.url }}/anaconda/pkgs/msys2 custom_channels: - conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud - msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud - bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud - menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud - pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud - simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud + conda-forge: {{ site.url }}/anaconda/cloud + msys2: {{ site.url }}/anaconda/cloud + bioconda: {{ site.url }}/anaconda/cloud + menpo: {{ site.url }}/anaconda/cloud + pytorch: {{ site.url }}/anaconda/cloud + simpleitk: {{ site.url }}/anaconda/cloud ``` 即可添加 Anaconda Python 免费仓库。 @@ -44,7 +44,7 @@ custom_channels: Miniconda 是一个 Anaconda 的轻量级替代,默认只包含了 python 和 conda,但是可以通过 pip 和 conda 来安装所需要的包。 -Miniconda 安装包可以到 下载。 +Miniconda 安装包可以到 <{{ site.url }}/anaconda/miniconda/> 下载。 ### 其他三方源 diff --git a/_posts/help/1970-01-01-aosp.md b/_posts/help/1970-01-01-aosp.md index 3d69dd8..30260e9 100644 --- a/_posts/help/1970-01-01-aosp.md +++ b/_posts/help/1970-01-01-aosp.md @@ -40,13 +40,13 @@ 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镜像]({{ site.url }}/help/git-repo/) #### 使用每月更新的初始化包 由于首次同步需要下载约 30GB 数据,过程中任何网络故障都可能造成同步失败,我们强烈建议您使用初始化包进行初始化。 -下载 ,下载完成后记得根据 checksum.txt 的内容校验一下。 +下载 <{{ site.url }}/aosp-monthly/aosp-latest.tar>,下载完成后记得根据 checksum.txt 的内容校验一下。 由于所有代码都是从隐藏的 `.repo` 目录中 checkout 出来的,所以我们只保留了 `.repo` 目录,下载后解压 再 `repo sync` 一遍即可得到完整的目录。 @@ -54,7 +54,7 @@ chmod a+x ~/bin/repo 使用方法如下: ```bash -wget -c https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar # 下载初始化包 +wget -c {{ site.url }}/aosp-monthly/aosp-latest.tar # 下载初始化包 tar xf aosp-latest.tar cd AOSP # 解压得到的 AOSP 工程目录 # 这时 ls 的话什么也看不到,因为只有一个隐藏的 .repo 目录 diff --git a/_posts/help/1970-01-01-archlinux.md b/_posts/help/1970-01-01-archlinux.md index dd3e5ce..dda1af4 100644 --- a/_posts/help/1970-01-01-archlinux.md +++ b/_posts/help/1970-01-01-archlinux.md @@ -8,7 +8,7 @@ mirrorid: archlinux 编辑 /etc/pacman.d/mirrorlist, 在文件的最顶端添加: ``` -Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch +Server = https://{{ site.host }}/archlinux/$repo/os/$arch ``` 更新软件包缓存: diff --git a/_posts/help/1970-01-01-archlinuxcn.md b/_posts/help/1970-01-01-archlinuxcn.md index f79e43a..083e4e0 100644 --- a/_posts/help/1970-01-01-archlinuxcn.md +++ b/_posts/help/1970-01-01-archlinuxcn.md @@ -13,13 +13,13 @@ Arch Linux 中文社区仓库 是由 Arch Linux [点击这里](https://github.com/archlinuxcn/repo) 查看。 *  官方仓库地址: -*  镜像地址:  +*  镜像地址:  使用方法:在 `/etc/pacman.conf` 文件末尾添加以下两行: ``` [archlinuxcn] -Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch +Server = https://{{ site.host }}/archlinuxcn/$arch ``` 之后安装 `archlinuxcn-keyring` 包导入 GPG key。 diff --git a/_posts/help/1970-01-01-bananian.md b/_posts/help/1970-01-01-bananian.md index 0f8ad1f..e613073 100644 --- a/_posts/help/1970-01-01-bananian.md +++ b/_posts/help/1970-01-01-bananian.md @@ -9,7 +9,7 @@ mirrorid: bananian [Bananian](https://www.bananian.org/) 是为 [Banana Pi](http://www.banana-pi.org/) 制作的,基于官方 Debian 仓库的发行版, 其内核和 bootloader 为 Banana Pi 做了定制化。 -安装镜像可以到 获取。 +安装镜像可以到 获取。 ### 使用 TUNA 镜像作为软件仓库 @@ -37,19 +37,19 @@ gpg --armor --export 24BFF712 | sudo apt-key add - {% 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..caade9a 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.host }}/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.host }}/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.host }}/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..2f150d5 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.host }}`。 或者,你也可以直接使用如下内容覆盖掉 /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.host }}/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.host }}/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.host }}/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.host }}/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.host }}/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.host }}/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.host }}/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.host }}/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.host }}/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..3b45647 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.host }}/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.host }}/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.host }}/git/chromiumos/" ``` 接着将 diff --git a/_posts/help/1970-01-01-clickhouse.md b/_posts/help/1970-01-01-clickhouse.md index da491d9..7af1b3b 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.host }}/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.host }}/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..f226563 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.host }}/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..25bd966 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.host }}/cygwin/ ``` -点击"Add"按钮, 然后选中"https://mirrors.tuna.tsinghua.edu.cn", 点击"下一步"进行安装。 +点击"Add"按钮, 然后选中"https://{{ site.host }}", 点击"下一步"进行安装。 注意,该列表为可多选列表,注意把上面不需要的镜像点掉。 diff --git a/_posts/help/1970-01-01-debian.md b/_posts/help/1970-01-01-debian.md index 93e9418..6f37ed7 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..9a98239 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.host }}/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.host }}/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.host }}/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..da9161c 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.host }}/elpa/gnu/ | +| [MELPA](https://melpa.org/) | http://{{ site.host }}/elpa/melpa/ | +| [MELPA Stable](http://stable.melpa.org/#/) | http://{{ site.host }}/elpa/melpa-stable/ | +| [Marmalade](https://marmalade-repo.org/) | http://{{ site.host }}/elpa/marmalade/ | +| [Org](http://orgmode.org/elpa.html) | http://{{ site.host }}/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.host }}/elpa/gnu/") + ("melpa" . "http://{{ site.host }}/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.host }}/elpa/melpa/") + ("org-cn" . "http://{{ site.host }}/elpa/org/") + ("gnu-cn" . "http://{{ site.host }}/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.host }}/elpa/melpa/") + ("org-cn" . "http://{{ site.host }}/elpa/org/") + ("gnu-cn" . "http://{{ site.host }}/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.host }}/elpa/gnu/") +(source "melpa" "http://{{ site.host }}/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..9ed3454 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.host }}/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.host }}`。 可以用如下命令自动替换:(来自 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.host }}!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.host }}/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.host }}/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.host }}/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..e8e98a4 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.host }}/fdroid/repo/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB 或复制此链接后在客户端中添加存储库,可以将此镜像添加为用户镜像。 如果需要添加 Archive 库,可以使用如下链接: -https://mirrors.tuna.tsinghua.edu.cn/fdroid/archive?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB \ No newline at end of file +https://{{ site.host }}/fdroid/archive?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB diff --git a/_posts/help/1970-01-01-fedora.md b/_posts/help/1970-01-01-fedora.md index ae1dccc..b4902fd 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.host }}/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.host }}/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.host }}/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.host }}/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..605a8b5 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.host }}/git/gcc.git ``` 若要将 tuna mirror 加入已有代码库,可在已有仓库中运行 ``` -git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git +git remote add tuna https://{{ site.host }}/git/gcc.git ``` 或运行 ``` -git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git +git remote set-url origin https://{{ site.host }}/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..e184b0c 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.host }}/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.host }}/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..d813b3c 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.host }}/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..1ba990a 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.host }}/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.host }}/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.host }}/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..096f2d0 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..81e6327 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.host }}/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.host }}/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/" /> ``` diff --git a/_posts/help/1970-01-01-linux-firmware.git.md b/_posts/help/1970-01-01-linux-firmware.git.md index 8f28c8f..31184cf 100644 --- a/_posts/help/1970-01-01-linux-firmware.git.md +++ b/_posts/help/1970-01-01-linux-firmware.git.md @@ -9,19 +9,19 @@ mirrorid: linux-firmware.git 如需克隆 Linux 固件仓库,使用 ``` -git clone https://mirrors.tuna.tsinghua.edu.cn/git/linux-firmware.git +git clone https://{{ site.host }}/git/linux-firmware.git ``` 若要将 tuna mirror 加入已有仓库,可在已有仓库中运行 ``` -git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/linux-firmware.git +git remote add tuna https://{{ site.host }}/git/linux-firmware.git ``` 或运行 ``` -git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/linux-firmware.git +git remote set-url origin https://{{ site.host }}/git/linux-firmware.git ``` 将默认上游设置为 TUNA 镜像。 diff --git a/_posts/help/1970-01-01-linux-next.git.md b/_posts/help/1970-01-01-linux-next.git.md index b7ad7fd..da352d0 100644 --- a/_posts/help/1970-01-01-linux-next.git.md +++ b/_posts/help/1970-01-01-linux-next.git.md @@ -9,19 +9,19 @@ mirrorid: linux-next.git 如需克隆 linux 代码,使用 ``` -git clone https://mirrors.tuna.tsinghua.edu.cn/git/linux-next.git +git clone https://{{ site.host }}/git/linux-next.git ``` 若要将 tuna mirror 加入已有代码库,可在已有仓库中运行 ``` -git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/linux-next.git +git remote add tuna https://{{ site.host }}/git/linux-next.git ``` 或运行 ``` -git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/linux-next.git +git remote set-url origin https://{{ site.host }}/git/linux-next.git ``` 将默认上游设置为 TUNA 镜像。 diff --git a/_posts/help/1970-01-01-linux-stable.git.md b/_posts/help/1970-01-01-linux-stable.git.md index 07b7577..01227dc 100644 --- a/_posts/help/1970-01-01-linux-stable.git.md +++ b/_posts/help/1970-01-01-linux-stable.git.md @@ -9,19 +9,19 @@ mirrorid: linux-stable.git 如需克隆 linux 代码,使用 ``` -git clone https://mirrors.tuna.tsinghua.edu.cn/git/linux-stable.git +git clone https://{{ site.host }}/git/linux-stable.git ``` 若要将 tuna mirror 加入已有代码库,可在已有仓库中运行 ``` -git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/linux-stable.git +git remote add tuna https://{{ site.host }}/git/linux-stable.git ``` 或运行 ``` -git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/linux-stable.git +git remote set-url origin https://{{ site.host }}/git/linux-stable.git ``` 将默认上游设置为 TUNA 镜像 diff --git a/_posts/help/1970-01-01-linux.git.md b/_posts/help/1970-01-01-linux.git.md index e2a1ecf..9bda26e 100644 --- a/_posts/help/1970-01-01-linux.git.md +++ b/_posts/help/1970-01-01-linux.git.md @@ -9,19 +9,19 @@ mirrorid: linux.git 如需克隆主线 linux 代码,使用 ``` -git clone https://mirrors.tuna.tsinghua.edu.cn/git/linux.git +git clone https://{{ site.host }}/git/linux.git ``` 若要将 tuna mirror 加入已有代码库,可在已有仓库中运行 ``` -git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/linux.git +git remote add tuna https://{{ site.host }}/git/linux.git ``` 或运行 ``` -git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/linux.git +git remote set-url origin https://{{ site.host }}/git/linux.git ``` 将默认上游设置为 TUNA 镜像 @@ -31,7 +31,7 @@ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/linux.git 以树莓派为例,具体操作为 ``` -git clone https://mirrors.tuna.tsinghua.edu.cn/git/linux.git +git clone https://{{ site.host }}/git/linux.git git remote add rasp https://github.com/raspberrypi/linux.git git fetch rasp ``` diff --git a/_posts/help/1970-01-01-linuxbrew-bottles.md b/_posts/help/1970-01-01-linuxbrew-bottles.md index 6c6313c..af011eb 100644 --- a/_posts/help/1970-01-01-linuxbrew-bottles.md +++ b/_posts/help/1970-01-01-linuxbrew-bottles.md @@ -6,15 +6,15 @@ mirrorid: linuxbrew-bottles ## Linuxbrew-bottles 镜像使用帮助 -**注:该镜像是 Linuxbrew 二进制预编译包的镜像。本镜像站同时提供 Linuxbrew 的 formula 索引的镜像(即 `brew update` 时所更新内容),请参考 [Linuxbrew 镜像使用帮助](https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/)。** +**注:该镜像是 Linuxbrew 二进制预编译包的镜像。本镜像站同时提供 Linuxbrew 的 formula 索引的镜像(即 `brew update` 时所更新内容),请参考 [Linuxbrew 镜像使用帮助](https://{{ site.host }}/help/homebrew/)。** ### 临时替换 ```bash -export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/linuxbrew-bottles +export HOMEBREW_BOTTLE_DOMAIN=https://{{ site.host }}/linuxbrew-bottles ``` ### 长期替换 ```bash -echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/linuxbrew-bottles' >> ~/.bash_profile +echo 'export HOMEBREW_BOTTLE_DOMAIN=https://{{ site.host }}/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..5b42a45 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.host }}/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.host }}/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.host }}/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..de09ae8 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.host }}/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.host }}/mariadb/yum +``` diff --git a/_posts/help/1970-01-01-mongodb.md b/_posts/help/1970-01-01-mongodb.md index f66536c..e803258 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.host }}/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..8a1966b 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.host }}/msys2/distrib/x86_64) 、[i686](https://{{ site.host }}/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.host }}/msys2/mingw/i686 ``` 编辑 `/etc/pacman.d/mirrorlist.mingw64` ,在文件开头添加: ```bash -Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64 +Server = https://{{ site.host }}/msys2/mingw/x86_64 ``` 编辑 `/etc/pacman.d/mirrorlist.msys` ,在文件开头添加: ```bash -Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/$arch +Server = https://{{ site.host }}/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..e5a3f50 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.host }}/proxmox/iso/](https://{{ site.host }}/proxmox/iso/) diff --git a/_posts/help/1970-01-01-pybombs.md b/_posts/help/1970-01-01-pybombs.md index 4c09c8e..2ee6e78 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.host }}/pybombs/recipes/gr-recipes.git +pybombs recipes add gr-etcetera git+https://{{ site.host }}/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.host }}/pybombs/recipes/gr-recipes.git +pybombs recipes add gr-etcetera git+https://{{ site.host }}/pybombs/recipes/gr-etcetera.git ``` - 本镜像使用 脚本进行构建。 diff --git a/_posts/help/1970-01-01-qemu.git.md b/_posts/help/1970-01-01-qemu.git.md index a890764..e13cd5d 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.host }}/git/qemu.git ``` 若要将 tuna mirror 加入已有代码库,可在已有仓库中运行 ``` -git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/qemu.git +git remote add tuna https://{{ site.host }}/git/qemu.git ``` 或运行 ``` -git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/qemu.git +git remote set-url origin https://{{ site.host }}/git/qemu.git ``` 将默认上游设置为 TUNA 镜像 diff --git a/_posts/help/1970-01-01-raspbian.md b/_posts/help/1970-01-01-raspbian.md index bb53f69..74e29dc 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..2010f0d 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.host }}/repo-ck/$arch ``` 再增加 GPG 信任: diff --git a/_posts/help/1970-01-01-ros.md b/_posts/help/1970-01-01-ros.md index 47ff171..3837bb9 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..04fd2dd 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.host }}/rpmfusion/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://{{ site.host }}/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.host }}/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.host }}/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.host }}/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..b40eeda 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.host }}/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.host }}/stackage/stack-setup.yaml" urls: - latest-snapshot: http://mirrors.tuna.tsinghua.edu.cn/stackage/snapshots.json + latest-snapshot: http://{{ site.host }}/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.host }}/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.host }}/stackage/snapshots.json + lts-build-plans: http://{{ site.host }}/stackage/lts-haskell/ + nightly-build-plans: http://{{ site.host }}/stackage/stackage-nightly/ ``` diff --git a/_posts/help/1970-01-01-termux.md b/_posts/help/1970-01-01-termux.md index 879dfa7..71fdc98 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.host }}/termux/termux-packages-24 stable main@' $PREFIX/etc/apt/sources.list +sed -i 's@^\(deb.*games stable\)$@#\1\ndeb https://{{ site.host }}/termux/game-packages-24 games stable@' $PREFIX/etc/apt/sources.list.d/game.list +sed -i 's@^\(deb.*science stable\)$@#\1\ndeb https://{{ site.host }}/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.host }}/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.host }}/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.host }}/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.host }}/termux/x11-packages +- https://{{ site.host }}/termux/unstable-packages +- https://{{ site.host }}/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..ce44fdf 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..dbdd1a8 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.host }}/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..6c2518a 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.host }}/g' /etc/apk/repositories ``` diff --git a/_posts/help/2016-06-19-virtualbox.md b/_posts/help/2016-06-19-virtualbox.md index 98e9e72..a9994f6 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.host }}/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.host }}/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.host }}/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..d563383 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.host }}/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.host }}/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.host }}/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.host }}/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..b15a19d 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.host }}/rubygems/ --remove https://rubygems.org/ # 列出已有源 gem sources -l # 应该只有 TUNA 一个 ``` -或者,编辑 `~/.gemrc`,将 `https://mirrors.tuna.tsinghua.edu.cn/rubygems/` 加到 `sources` 字段。 +或者,编辑 `~/.gemrc`,将 `https://{{ site.host }}/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.host }}/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..e8375a3 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.host }}/bioconductor") ``` 打开R即可使用该 Bioconductor 镜像源安装 Bioconductor 软件包。 diff --git a/_posts/help/2017-01-17-CRAN.md b/_posts/help/2017-01-17-CRAN.md index d6bda33..f4b2597 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.host }}/CRAN/")) ``` 打开 R 即可使用该 CRAN 镜像源安装 R 软件包。 diff --git a/_posts/help/2017-05-28-llvm.md b/_posts/help/2017-05-28-llvm.md index a58a4c3..e9f5c1c 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.host }}/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.host }}/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.host }}/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..bec94bb 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.host }}/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.host }}/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..6cd7644 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.host }}/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..de5a6d4 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.host }}/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..02c52f3 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