help: transpile from mirrorz-help

This commit is contained in:
ZenithalHourlyRate 2023-03-06 09:39:31 +00:00 committed by GitHub
parent f60d7a31f1
commit 0de53fb391
40 changed files with 2799 additions and 481 deletions

View File

@ -4,54 +4,167 @@ layout: help
mirrorid: Adoptium
---
## Adoptium 镜像使用帮助
# Adoptium 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3,#content-4,#content-5,#content-6">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3,#content-4,#content-5,#content-6">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
### Windows/macOS 用户
打开[下载页面](https://{{ site.hostname }}/Adoptium/),选择所需的版本,下载独立安装包。
通过以下链接打开下载页面,选择所需的版本,下载独立安装包。
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
### Debian/Ubuntu 用户
首先请安装依赖:
```
apt-get update && apt-get install -y wget apt-transport-https
```
首先请安装依赖:
然后信任 GPG 公钥:
```
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo tee /etc/apt/keyrings/adoptium.asc
```
随后执行以下命令来添加 apt 存储库:
```
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://{{ site.hostname }}/Adoptium/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}apt-get update && {{sudo}}apt-get install -y wget apt-transport-https
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-shell" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
然后信任 GPG 公钥:
{% raw %}
<script id="template-2" type="x-tmpl-markup">
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | {{sudo}}tee /etc/apt/keyrings/adoptium.asc
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-shell" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
随后执行以下命令来添加 apt 存储库:
{% raw %}
<script id="template-3" type="x-tmpl-markup">
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] {{http_protocol}}{{mirror}}/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | {{sudo}}tee /etc/apt/sources.list.d/adoptium.list
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-3" class="language-shell" data-template="#template-3" data-select="#http-select,#sudo-select">
</code>
</pre>
再执行
```
sudo apt-get update
```
之后可以使用 `sudo apt-get install temurin-<version>-jdk` 安装软件包,例如 `temurin-17-jdk``temurin-8-jdk`
### CentOS/RHEL/Fedora
{% raw %}
<script id="template-4" type="x-tmpl-markup">
{{sudo}}apt-get update
</script>
{% endraw %}
执行以下命令来添加 rpm 存储库:
```
cat <<EOF > /etc/yum.repos.d/adoptium.repo
<p></p>
<pre>
<code id="content-4" class="language-shell" data-template="#template-4" data-select="#http-select,#sudo-select">
</code>
</pre>
之后可以使用 `apt-get install temurin-<version>-jdk` 安装软件包,例如 `temurin-17-jdk``temurin-8-jdk`
### CentOS/RHEL/Fedora 用户
执行以下命令来添加 rpm 存储库:
{% raw %}
<script id="template-5" type="x-tmpl-markup">
[Adoptium]
name=Adoptium
baseurl=https://{{ site.hostname }}/Adoptium/rpm/centos$releasever-$basearch/
baseurl={{http_protocol}}{{mirror}}/rpm/centos$releasever-$basearch/
enabled=1
gpgcheck=1
gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public
EOF
```
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-5" class="language-ini" data-template="#template-5" data-select="#http-select,#sudo-select">
</code>
</pre>
再执行
```
sudo yum makecache
```
之后可以使用 `sudo yum install temurin-<version>-jdk` 安装软件包,例如 `temurin-17-jdk``temurin-8-jdk`
{% raw %}
<script id="template-6" type="x-tmpl-markup">
{{sudo}}yum makecache
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-6" class="language-bash" data-template="#template-6" data-select="#http-select,#sudo-select">
</code>
</pre>
之后可以使用 `yum install temurin-<version>-jdk` 安装软件包,例如 `temurin-17-jdk``temurin-8-jdk`

View File

@ -4,14 +4,86 @@ layout: help
mirrorid: archlinuxarm
---
## Arch Linux ARM 软件仓库镜像使用帮助
# Arch Linux ARM 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
### 软件源
编辑 `/etc/pacman.d/mirrorlist`,在文件的最顶端添加以下配置;您可以同时注释掉其它所有镜像。
{% raw %}
<script id="template-0" type="x-tmpl-markup">
Server = {{http_protocol}}{{mirror}}/$arch/$repo
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-ini" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
编辑 /etc/pacman.d/mirrorlist 在文件的最顶端添加:
```
Server = https://{{ site.hostname }}/archlinuxarm/$arch/$repo
```
更新软件包缓存:
```
sudo pacman -Syy
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}pacman -Syy
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-shell" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
### 系统镜像
{% raw %}
<script id="template-2" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
请访问 [https://archlinuxarm.org/platforms](https://archlinuxarm.org/platforms),阅读硬件平台对应的安装指引并下载对应的系统镜像。

View File

@ -4,22 +4,72 @@ layout: help
mirrorid: archlinuxcn
---
## ArchlinuxCN 镜像使用帮助
# Arch Linux CN 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
Arch Linux 中文社区仓库 是由 Arch Linux
中文社区驱动的非官方用户仓库。包含中文用户常用软件、工具、字体/美化包等。
完整的包信息列表(包名称/架构/维护者/状态)请
[点击这里](https://github.com/archlinuxcn/repo) 查看。
完整的包信息列表(包名称/架构/维护者/状态)请[点击这里](https://github.com/archlinuxcn/repo)查看。
*  官方仓库地址:<https://repo.archlinuxcn.org>
*  镜像地址: <https://{{ site.hostname }}/archlinuxcn/>
*  官方仓库地址https://repo.archlinuxcn.org
使用方法:在 `/etc/pacman.conf` 文件末尾添加以下两行:
```
[archlinuxcn]
Server = https://{{ site.hostname }}/archlinuxcn/$arch
```
之后安装 `archlinuxcn-keyring` 包导入 GPG key。
{% raw %}
<script id="template-0" type="x-tmpl-markup">
[archlinuxcn]
Server = {{http_protocol}}{{mirror}}/$arch
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-ini" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
之后通过一下命令安装 `archlinuxcn-keyring` 包导入 GPG key。
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}pacman -Sy archlinuxcn-keyring
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,36 +4,63 @@ layout: help
mirrorid: centos-vault
---
## centos-vault 镜像使用帮助
# CentOS Vault 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
该文件夹提供较早版本的 CentOS例如 CentOS 6同时提供当前 CentOS 大版本的历史小版本的归档;
还提供 CentOS 各个版本的源代码和调试符号。
建议先备份 `/etc/yum.repos.d/` 内的文件。
需要确定您所需要的小版本,如无特殊需要则使用该大版本的最后一个小版本,比如 6.105.11,我们将其标记为 `$minorver`,需要您在之后的命令中替换。
然后编辑 `/etc/yum.repos.d/` 中的相应文件,在 `mirrorlist=` 开头行前面加 `#` 注释掉;并将 `baseurl=` 开头行取消注释(如果被注释的话)。
对于 CentOS 8 之前的版本,请把该行内的域名及路径(例如`mirror.centos.org/centos/$releasever`)替换为 `{{ site.hostname }}/centos-vault/$minorver`
对于 CentOS 8 ,请注意域名及路径发生了更换,此时需要替换的字段为 `http://mirror.centos.org/$contentdir/$releasever`
以上步骤可以被下方的命令完成
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
# CentOS 8 之前
minorver=6.10
sudo sed -e "s|^mirrorlist=|#mirrorlist=|g" \
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=https://{{ site.hostname }}/centos-vault/$minorver|g" \
{{sudo}}sed -e "s|^mirrorlist=|#mirrorlist=|g" \
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl={{http_protocol}}{{mirror}}/$minorver|g" \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo
# CentOS 8 之后
minorver=8.5.2111
sudo sed -e "s|^mirrorlist=|#mirrorlist=|g" \
-e "s|^#baseurl=http://mirror.centos.org/\$contentdir/\$releasever|baseurl=https://{{ site.hostname }}/centos-vault/$minorver|g" \
{{sudo}}sed -e "s|^mirrorlist=|#mirrorlist=|g" \
-e "s|^#baseurl=http://mirror.centos.org/\$contentdir/\$releasever|baseurl={{http_protocol}}{{mirror}}/$minorver|g" \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo
```
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-shell" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
注意其中的`*`通配符,如果只需要替换一些文件中的源,请自行增删。
@ -41,6 +68,19 @@ sudo sed -e "s|^mirrorlist=|#mirrorlist=|g" \
最后,更新软件包缓存
```
sudo yum makecache
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}yum makecache
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-shell" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,33 +4,60 @@ layout: help
mirrorid: centos
---
## CentOS 镜像使用帮助
# CentOS 软件仓库镜像使用帮助
**请注意CentOS 8 (非 Stream 版)已提前进入 EOL 停止服务阶段,因此镜像已被官方移动。如果您正在寻找关于这些系统的镜像,请参考 centos-vault 的帮助。**
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
**请注意CentOS 8非 Stream 版)已提前进入 EOL 停止服务阶段,因此镜像已被官方移动。如果您正在寻找关于这些系统的镜像,请参考 centos-vault 的帮助。**
该文件夹只提供 CentOS 7 与 8架构仅为 `x86_64` ,如果需要较早版本的 CentOS请参考 centos-vault 的帮助,若需要其他架构,请参考 centos-altarch 的帮助。
建议先备份 `/etc/yum.repos.d/` 内的文件。
然后编辑 `/etc/yum.repos.d/` 中的相应文件,在 `mirrorlist=` 开头行前面加 `#` 注释掉;并将 `baseurl=` 开头行取消注释(如果被注释的话)。
对于 CentOS 7 ,请把该行内的域名(例如`mirror.centos.org`)替换为 `{{ site.hostname }}`
对于 CentOS 8 ,请把 `mirror.centos.org/$contentdir` 替换为 `{{ site.hostname }}/centos`
以上步骤可以被下方的命令一步完成
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
# 对于 CentOS 7
sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://mirror.centos.org|baseurl=https://{{ site.hostname }}|g' \
{{sudo}}sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://mirror.centos.org/centos|baseurl={{http_protocol}}{{mirror}}|g' \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo
# 对于 CentOS 8
sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://mirror.centos.org/$contentdir|baseurl=https://{{ site.hostname }}/centos|g' \
{{sudo}}sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://mirror.centos.org/$contentdir|baseurl={{http_protocol}}{{mirror}}|g' \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo
```
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-shell" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
注意其中的`*`通配符,如果只需要替换一些文件中的源,请自行增删。
@ -38,6 +65,19 @@ sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
最后,更新软件包缓存
```
sudo yum makecache
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}yum makecache
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-shell" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,42 +4,117 @@ layout: help
mirrorid: elrepo
---
## ELRepo 镜像使用帮助
# ELRepo 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
首先按照[官网的安装说明](https://elrepo.org/tiki/tiki-index.php),配置 ELRepo
```bash
> rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
```
接着,按照你的系统版本,如果是 RHEL-8 或者 CentOS-8 则运行:
接着,按照你的系统版本,运行:
```bash
> yum install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
```
RHEL-7, SL-7 或者 CentOS-7
```bash
> yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
```
<form class="form-inline">
<div class="form-group">
<label>发行版:</label>
<select id="select-0-0" class="form-control content-select" data-target="#content-0">
<option data-release_name="el7" data-version="7" selected>RHEL-7, SL-7, CentOS-7</option>
<option data-release_name="el8" data-version="8">RHEL-8, SL-8, CentOS-8</option>
<option data-release_name="el6" data-version="6">RHEL-6, SL-6, CentOS-6</option>
</select>
</div>
</form>
RHEL-6, SL-6 或者 CentOS-6
{% raw %}
<script id="template-0" type="x-tmpl-markup">
yum install https://www.elrepo.org/elrepo-release-{{version}}.{{release_name}}.elrepo.noarch.rpm
</script>
{% endraw %}
```bash
> yum install https://www.elrepo.org/elrepo-release-6.el6.elrepo.noarch.rpm
```
<p></p>
建议先备份 `/etc/yum.repos.d/elrepo.repo`
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select,#select-0-0">
</code>
</pre>
```
sudo cp /etc/yum.repos.d/elrepo.repo /etc/yum.repos.d/elrepo.repo.bak
```
然后编辑 /etc/yum.repos.d/elrepo.repo 文件,在 `mirrorlist=` 开头的行前面加 `#` 注释掉;并将 `elrepo.org/linux` 替换为 `{{ site.hostname }}/elrepo`
接下来是换源,建议先备份 `/etc/yum.repos.d/elrepo.repo`
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}cp /etc/yum.repos.d/elrepo.repo /etc/yum.repos.d/elrepo.repo.bak
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-shell" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
然后编辑 /etc/yum.repos.d/elrepo.repo 文件,在 `mirrorlist=` 开头的行前面加 `#` 注释掉;并将 `http://elrepo.org/linux` 替换为
{% raw %}
<script id="template-2" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
最后,更新软件包缓存
```
sudo yum makecache
```
{% raw %}
<script id="template-3" type="x-tmpl-markup">
{{sudo}}yum makecache
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-3" class="language-shell" data-template="#template-3" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -1,45 +1,89 @@
---
layout: help
category: help
layout: help
mirrorid: epel
---
## EPEL 镜像使用帮助
# EPEL 软件仓库镜像使用帮助
EPEL(Extra Packages for Enterprise Linux)是由Fedora Special Interest Group维护的Enterprise LinuxRHEL、CentOS中经
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
EPEL(Extra Packages for Enterprise Linux) 是由 Fedora Special Interest Group 维护的 Enterprise LinuxRHEL、CentOS中经
常用到的包。
下面以CentOS 7为例讲解如何使用本镜像站的epel镜像。CentOS 8同样可用该方法。
下面以 CentOS 7 为例讲解如何使用本镜像站的 epel 镜像。CentOS 8 同样可用该方法。
首先从CentOS Extras这个源[本镜像站](https://{{ site.hostname }}/help/centos)也有镜像里安装epel-release
首先从 CentOS Extras 这个源里安装 epel-release
```
yum install epel-release
```
<!-- 当前tuna已经在epel的官方镜像列表里所以不需要其他配置mirrorlist机制就能让你的服务器就近使用tuna的镜像。-->
修改`/etc/yum.repos.d/epel.repo`,将`mirrorlist`和`metalink`开头的行注释掉。
接下来,取消注释这个文件里`baseurl`开头的行,并将其中的`http://download.fedoraproject.org/pub`替换成`https://{{ site.hostname }}`。
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{sudo}}yum install epel-release
</script>
{% endraw %}
可以用如下命令自动替换:(来自 https://github.com/tuna/issues/issues/687
<p></p>
```
sed -e 's!^metalink=!#metalink=!g' \
<pre>
<code id="content-0" class="language-shell" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
用如下命令自动替换:(来自 [https://github.com/tuna/issues/issues/687](https://github.com/tuna/issues/issues/687)
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}sed -e 's!^metalink=!#metalink=!g' \
-e 's!^#baseurl=!baseurl=!g' \
-e 's!//download\.fedoraproject\.org/pub!//{{ site.hostname }}!g' \
-e 's!//download\.example/pub!//{{ site.hostname }}!g' \
-e 's!http://mirrors!https://mirrors!g' \
-e 's!http://download\.fedoraproject\.org/pub/epel!{{http_protocol}}{{mirror}}!g' \
-e 's!http://download\.example/pub/epel!{{http_protocol}}{{mirror}}!g' \
-i /etc/yum.repos.d/epel*.repo
```
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-shell" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
修改结果如下:(仅供参考,不同版本可能不同)
```
{% raw %}
<script id="template-2" type="x-tmpl-markup">
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=https://{{ site.hostname }}/epel/7/$basearch
baseurl={{http_protocol}}{{mirror}}/7/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
@ -48,7 +92,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://{{ site.hostname }}/epel/7/$basearch/debug
baseurl={{http_protocol}}{{mirror}}/7/$basearch/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
@ -57,12 +101,23 @@ gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=https://{{ site.hostname }}/epel/7/SRPMS
baseurl={{http_protocol}}{{mirror}}/7/SRPMS
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
```
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-ini" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
运行 `yum update` 测试一下吧。

View File

@ -4,14 +4,67 @@ layout: help
mirrorid: fdroid
---
## F-Droid 镜像使用帮助
# F-Droid 软件仓库镜像使用帮助
用 F-Droid 客户端打开此链接:
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
用 F-Droid 客户端打开此链接:
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/repo/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
https://{{ site.hostname }}/fdroid/repo/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB
或复制此链接后在客户端中添加存储库,可以将此镜像添加为用户镜像。
如果需要添加 Archive 库,可以使用如下链接:
https://{{ site.hostname }}/fdroid/archive?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/archive?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,73 +4,175 @@ layout: help
mirrorid: fedora
---
Fedora 镜像使用帮助
===================
# Fedora 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3,#content-4">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3,#content-4">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
Fedora 默认使用 [Metalink](https://zh.fedoracommunity.org/2018/04/05/fedora-secures-package-delivery.html) 给出推荐的镜像列表,保证用户使用的镜像仓库足够新,并且能够尽快拿到安全更新,从而提供更好的安全性。所以通常情况下使用默认配置即可,无需更改配置文件。
由于 Metalink 需要从国外的 Fedora 项目服务器上获取元信息所以对于校园内网、无国外访问等特殊情况metalink 并不适用,此时可以如下修改配置文件。
Fedora 的软件源配置文件可以有多个,其中:
系统默认的 `fedora` 仓库配置文件为 `/etc/yum.repos.d/fedora.repo`,系统默认的 `updates` 仓库配置文件为 `/etc/yum.repos.d/fedora-updates.repo` 。将上述两个文件先做个备份,根据 Fedora 系统版本分别替换为下面内容,之后通过 `sudo dnf makecache` 命令更新本地缓存,即可使用 TUNA 的软件源镜像。
系统默认的 `fedora` 仓库配置文件为 `/etc/yum.repos.d/fedora.repo`,系统默认的 `updates` 仓库配置文件为 `/etc/yum.repos.d/fedora-updates.repo` 。将上述两个文件先做个备份,根据 Fedora 系统版本分别替换为下面内容,之后通过 `sudo dnf makecache` 命令更新本地缓存,即可使用所选择的软件源镜像。
## Fedora 29 或更旧版本
Fedora 29 及更旧版本已不再受官方支持Fedora 官方已将 Fedora 29 及更旧版本的软件仓库从主镜像中移除,并转移至了 archive 镜像中。故Fedora 29 及更旧版本无法使用 TUNA 的镜像。请使用默认配置文件,以使 `yum` / `dnf` 自动获取可用的镜像源。
Fedora 29 及更旧版本已不再受官方支持Fedora 官方已将 Fedora 29 及更旧版本的软件仓库从主镜像中移除,并转移至了 archive 镜像中。故 Fedora 29 及更旧版本无法使用所选择的镜像。请使用默认配置文件,以使 `yum` / `dnf` 自动获取可用的镜像源。
## Fedora 30 或更新版本
### 命令替换
用以下命令替换 `/etc/yum.repos.d` 下的文件
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{sudo}}sed -e 's|^metalink=|#metalink=|g' \
-e 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl={{http_protocol}}{{mirror}}|g' \
-i.bak \
/etc/yum.repos.d/fedora.repo \
/etc/yum.repos.d/fedora-modular.repo \
/etc/yum.repos.d/fedora-updates.repo \
/etc/yum.repos.d/fedora-updates-modular.repo
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
### 手动替换
**`fedora` 仓库 (/etc/yum.repos.d/fedora.repo)**
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=https://{{ site.hostname }}/fedora/releases/$releasever/Everything/$basearch/os/
baseurl={{http_protocol}}{{mirror}}/releases/$releasever/Everything/$basearch/os/
metadata_expire=28d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
```
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-ini" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
**`updates` 仓库 (/etc/yum.repos.d/fedora-updates.repo)**
```
{% raw %}
<script id="template-2" type="x-tmpl-markup">
[updates]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
baseurl=https://{{ site.hostname }}/fedora/updates/$releasever/Everything/$basearch/
baseurl={{http_protocol}}{{mirror}}/updates/$releasever/Everything/$basearch/
enabled=1
gpgcheck=1
metadata_expire=6h
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
```
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-ini" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
**`fedora-modular` 仓库 (/etc/yum.repos.d/fedora-modular.repo)**
```
{% raw %}
<script id="template-3" type="x-tmpl-markup">
[fedora-modular]
name=Fedora Modular $releasever - $basearch
failovermethod=priority
baseurl=https://{{ site.hostname }}/fedora/releases/$releasever/Modular/$basearch/os/
baseurl={{http_protocol}}{{mirror}}/releases/$releasever/Modular/$basearch/os/
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
```
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-3" class="language-ini" data-template="#template-3" data-select="#http-select,#sudo-select">
</code>
</pre>
**`updates-modular` 仓库 (/etc/yum.repos.d/fedora-updates-modular.repo)**
```
{% raw %}
<script id="template-4" type="x-tmpl-markup">
[updates-modular]
name=Fedora Modular $releasever - $basearch - Updates
failovermethod=priority
baseurl=https://{{ site.hostname }}/fedora/updates/$releasever/Modular/$basearch/
baseurl={{http_protocol}}{{mirror}}/updates/$releasever/Modular/$basearch/
enabled=1
gpgcheck=1
metadata_expire=6h
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
```
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-4" class="language-ini" data-template="#template-4" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,14 +4,65 @@ layout: help
mirrorid: linuxmint
---
## Linux Mint 镜像使用帮助
# Linux Mint 软件仓库镜像使用帮助
Linux Mint 也采用 apt 作为包管理器,与 Ubuntu 和 Debian 类似,你需要编辑 `/etc/apt/sources.list``/etc/apt/sources.list.d/*` 中的路径。对于来自 Ubuntu 的部分源,可以参考 Ubuntu 镜像使用帮助进行修改。
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
以 sonya 为例,需要修改 `/etc/apt/sources.list.d/mint.list` ,把 `packages.linuxmint.com` 替换为 `{{ site.hostname }}/linuxmint`
```text
deb http://{{ site.hostname }}/linuxmint/ sonya main upstream import backport
```
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
Linux Mint 也采用 apt 作为包管理器,与 Ubuntu 和 Debian 类似,你需要编辑 `/etc/apt/sources.list``/etc/apt/sources.list.d/*` 中的路径。对于来自 Ubuntu 与 Debian 的部分源,可以参考 [Ubuntu 帮助](/help/ubuntu)与 [Debian 帮助](/help/debian)进行修改。
需要修改 `/etc/apt/sources.list.d/official-package-repositories.list`(注意备份),把 `packages.linuxmint.com` 替换为镜像源
<form class="form-inline">
<div class="form-group">
<label>Linux Mint 版本:</label>
<select id="select-0-0" class="form-control content-select" data-target="#content-0">
<option data-release_name="vera" selected>21.1</option>
<option data-release_name="vanessa">21</option>
<option data-release_name="una">20.3</option>
<option data-release_name="uma">20.2</option>
<option data-release_name="ulyssa">20.1</option>
</select>
</div>
</form>
{% raw %}
<script id="template-0" type="x-tmpl-markup">
deb {{http_protocol}}{{mirror}}/ {{release_name}} main upstream import backport
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-properties" data-template="#template-0" data-select="#http-select,#sudo-select,#select-0-0">
</code>
</pre>
然后运行 `apt update` 即可。
注:完成后请不要再使用 mintsources自带的图形化软件源设置工具进行任何操作因为在操作后无论是否有按“确定”mintsources 均会复写 `/etc/apt/sources.list.d/official-package-repositories.list`

View File

@ -4,22 +4,70 @@ layout: help
mirrorid: lxc-images
---
## LXC Images 镜像帮助
# LXC Images 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
LXC 1.0 以上版本增加了 `download` 模版,支持下载定义好的系统镜像。
欲使用 TUNA 镜像进行下载加速,可以在 `lxc-create -t download` 的选项部分,
增加 `--server {{ site.hostname }}/lxc-images` 即可,例如:
欲使用镜像进行下载加速,可以在 `lxc-create -t download` 的选项部分,
增加 `--server` 即可,例如:
```
# lxc-create -t download -n my-container -- --server {{ site.hostname }}/lxc-images
```
**LXD/LXC 2.0及以上版本使用镜像加速的方法**:
创建一个remote链接指向镜像站即可或替换掉默认的images链接。
{% raw %}
<script id="template-0" type="x-tmpl-markup">
lxc-create -t download -n my-container -- --server {{http_protocol}}{{mirror}}
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
**LXD/LXC 2.0 及以上版本使用镜像加速的方法**:
创建一个 remote 链接,指向镜像站即可,或替换掉默认的 images 链接。
{% raw %}
<script id="template-1" type="x-tmpl-markup">
lxc remote add mirror-images {{http_protocol}}{{mirror}}/ --protocol=simplestreams --public
lxc image list mirror-images:
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
```
# lxc remote add tuna-images https://{{ site.hostname }}/lxc-images/ --protocol=simplestreams --public
# lxc image list tuna-images:
```

View File

@ -4,7 +4,30 @@ layout: help
mirrorid: mariadb
---
## MariaDB 镜像使用帮助
# MariaDB 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
由于 MariaDB 版本较多,建议在[官方页面](https://downloads.mariadb.org/mariadb/repositories)上生成配置文件内容。
@ -19,9 +42,21 @@ https://apt.mariadb.org/mariadb/repo
换为
```
https://{{ site.hostname }}/mariadb/repo
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/repo
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
### RHEL/CentOS 等基于 yum 的系统
@ -33,6 +68,19 @@ http://yum.mariadb.org
换为
```
https://{{ site.hostname }}/mariadb/yum
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/yum
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,25 +4,78 @@ layout: help
mirrorid: msys2
---
MSYS2 镜像使用帮助
==================
# MSYS2 软件仓库镜像使用帮助
收录架构
--------
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
## 收录架构
* MINGW: i686, x86_64, ucrt64, clang64
* MSYS: i686, x86_64
安装
--------------
## 安装
请访问该镜像目录下的 `distrib/` 目录([x86_64](https://{{ site.hostname }}/msys2/distrib/x86_64) 、[i686](https://{{ site.hostname }}/msys2/distrib/i686/)),找到名为 `msys2-<架构>-<日期>.exe` 的文件(如 `msys2-x86_64-20141113.exe`),下载安装即可。
请访问镜像目录下的 `distrib/` 目录
pacman 的配置
-------------
{% raw %}
<script id="template-0" type="x-tmpl-markup">
# x86_64
{{http_protocol}}{{mirror}}/distrib/x86_64/
# i686
{{http_protocol}}{{mirror}}/distrib/i686/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
找到名为 `msys2-<架构>-<日期>.exe` 的文件(如 `msys2-x86_64-20141113.exe`),下载安装即可。
## pacman 的配置
直接运行
```bash
sed -i "s#mirror.msys2.org/#{{ site.hostname }}/msys2/#g" /etc/pacman.d/mirrorlist*
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
sed -i "s#https\?://mirror.msys2.org/#{{http_protocol}}{{mirror}}/#g" /etc/pacman.d/mirrorlist*
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,27 +4,63 @@ layout: help
mirrorid: repo-ck
---
## Archlinux repo-ck 镜像使用帮助
# Repo-ck 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
[repo-ck](http://repo-ck.com/) 是
[Arch](https://archlinux.org/) 的非官方仓库,内有包含 ck
补丁、BFS
调度器等通用或为特定CPU架构优化过的内核以及内核相关的软件包是居家旅行优化折腾的必备良药。更多内容参考
调度器等,通用或为特定 CPU 架构优化过的内核,以及内核相关的软件包,是居家旅行,优化折腾的必备良药。更多内容,参考
[ArchWiki](https://wiki.archlinux.org/index.php/repo-ck)。
### 食用方法
`/etc/pacman.conf` 里添加
```
[repo-ck]
Server = https://{{ site.hostname }}/repo-ck/$arch
```
再增加 GPG 信任:
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
[repo-ck]
Server = {{http_protocol}}{{mirror}}/$arch
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-ini" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
再增加 GPG 信任:
```bash
pacman-key -r 5EE46C4C && pacman-key --lsign-key 5EE46C4C
```
之后 `pacman -Sy` 即可。

View File

@ -4,32 +4,132 @@ layout: help
mirrorid: rpmfusion
---
## RPMFusion 镜像使用帮助
# RPMFusion 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3,#content-4">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3,#content-4">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
### 安装基础包
首先安装提供基础配置文件和 GPG 密钥的 `rpmfusion-*.rpm`。Fedora 用户可使用如下命令:
首先安装提供基础配置文件和 GPG 密钥的 `rpmfusion-*.rpm`
```
sudo yum install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
```
#### Fedora 用户
或者如下直接用 TUNA 镜像中的 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
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{sudo}}yum install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-shell" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
或者如下直接用镜像中的 rpm 包:
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}yum install --nogpgcheck {{http_protocol}}{{mirror}}/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm {{http_protocol}}{{mirror}}/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
#### CentOS/RHEL 用户
<form class="form-inline">
<div class="form-group">
<label>发行版:</label>
<select id="select-2-0" class="form-control content-select" data-target="#content-2">
<option data-version="7" selected>CentOS/RHEL 7</option>
<option data-version="6">CentOS/RHEL 6</option>
<option data-version="8">CentOS/RHEL 8</option>
<option data-version="9">CentOS/RHEL 9</option>
</select>
</div>
</form>
{% raw %}
<script id="template-2" type="x-tmpl-markup">
{{sudo}}yum localinstall --nogpgcheck {{http_protocol}}{{mirror}}/free/el/rpmfusion-free-release-{{version}}.noarch.rpm {{http_protocol}}{{mirror}}/nonfree/el/rpmfusion-nonfree-release-{{version}}.noarch.rpm
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select,#select-2-0">
</code>
</pre>
注意:没有将当前用户设为管理员的用户,需要将 `sudo CMD` 替换为 `su -c 'CMD'`,并输入 root 密码。
### 修改链接指向 TUNA 镜像
### 修改链接指向镜像
安装成功后,修改 `/etc/yum.repos.d/` 目录下以 `rpmfusion` 开头,以 `.repo` 结尾的文件。具体而言,需要将文件中的 `baseurl=` 开头的行等号后面链接中的 `http://download1.rpmfusion.org/` 替换为 `https://{{ site.hostname }}/rpmfusion/`,替换后的文件类似如下:
安装成功后,修改 `/etc/yum.repos.d/` 目录下以 `rpmfusion` 开头,以 `.repo` 结尾的文件。具体而言,需要将文件中的 `baseurl=` 开头的行等号后面链接中的 `http://download1.rpmfusion.org/` 替换为
```
{% raw %}
<script id="template-3" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-3" class="language-plaintext" data-template="#template-3" data-select="#http-select,#sudo-select">
</code>
</pre>
替换后的文件类似如下:
{% raw %}
<script id="template-4" type="x-tmpl-markup">
[rpmfusion-free]
name=RPM Fusion for Fedora $releasever - Free
baseurl=https://{{ site.hostname }}/rpmfusion/free/fedora/releases/$releasever/Everything/$basearch/os/
baseurl={{http_protocol}}{{mirror}}/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,16 +146,24 @@ 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://{{ site.hostname }}/rpmfusion/free/fedora/releases/$releasever/Everything/source/SRPMS/
baseurl={{http_protocol}}{{mirror}}/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
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever-$basearch
```
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-4" class="language-ini" data-template="#template-4" data-select="#http-select,#sudo-select">
</code>
</pre>
### 更多
RHEL/CentOS 用户请参考 [RPMFusion 官方指南][rpmfusion]。
RHEL/CentOS 用户请参考 [RPMFusion 官方指南](http://rpmfusion.org/Configuration)
[rpmfusion]: http://rpmfusion.org/Configuration

View File

@ -4,52 +4,124 @@ layout: help
mirrorid: stackage
---
## stackage 镜像使用帮助
# Stackage 软件仓库镜像使用帮助
本镜像推荐与 TUNA 的 [Hackage 镜像](https://{{ site.hostname }}/help/hackage/)配合使用。
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
本镜像推荐与[Hackage 镜像](/help/hackage)配合使用。
### stack >= v2.5.1
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上:
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上
```yaml
setup-info-locations: ["http://{{ site.hostname }}/stackage/stack-setup.yaml"]
{% raw %}
<script id="template-0" type="x-tmpl-markup">
setup-info-locations: ["{{http_protocol}}{{mirror}}/stack-setup.yaml"]
urls:
latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json
latest-snapshot: {{http_protocol}}{{mirror}}/snapshots.json
snapshot-location-base: https://{{ site.hostname }}/stackage/stackage-snapshots/
```
snapshot-location-base: {{http_protocol}}{{mirror}}/stackage-snapshots/
</script>
{% endraw %}
此外,还需要手动下载 <https://{{ site.hostname }}/github-raw/fpco/stackage-content/master/stack/global-hints.yaml>`~/.stack/pantry/global-hints-cache.yaml`(在 Windows 下是 `%APPDATA%\stack\pantry\global-hints-cache.yaml`)。注意文件名不同。这是由于 `stack` 暂时不支持配置该文件的上游地址。该文件需要在每当第一次用到新版本的 GHC 时更新。
<p></p>
<pre>
<code id="content-0" class="language-yaml" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
此外,还需要手动下载 global-hints.yaml参考 [GitHub RAW 帮助](/help/github-raw) 中 stackage global-hints-cache.yaml 一节)到 `~/.stack/pantry/global-hints-cache.yaml`(在 Windows 下是 `%APPDATA%\stack\pantry\global-hints-cache.yaml`)。注意文件名不同。这是由于 `stack` 暂时不支持配置该文件的上游地址。该文件需要在每当第一次用到新版本的 GHC 时更新。
### stack >= v2.3.1
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上:
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上
```yaml
setup-info-locations: ["http://{{ site.hostname }}/stackage/stack-setup.yaml"]
{% raw %}
<script id="template-1" type="x-tmpl-markup">
setup-info-locations: ["{{http_protocol}}{{mirror}}/stack-setup.yaml"]
urls:
latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json
```
latest-snapshot: {{http_protocol}}{{mirror}}/snapshots.json
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-yaml" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
### stack >= v2.1.1
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上:
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上
```yaml
setup-info: "http://{{ site.hostname }}/stackage/stack-setup.yaml"
{% raw %}
<script id="template-2" type="x-tmpl-markup">
setup-info: "{{http_protocol}}{{mirror}}/stack-setup.yaml"
urls:
latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json
```
latest-snapshot: {{http_protocol}}{{mirror}}/snapshots.json
</script>
{% endraw %}
### stack < v2.1.1
<p></p>
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上:
<pre>
<code id="content-2" class="language-yaml" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
```yaml
setup-info: "http://{{ site.hostname }}/stackage/stack-setup.yaml"
### stack 小于 v2.1.1
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上:
{% raw %}
<script id="template-3" type="x-tmpl-markup">
setup-info: "{{http_protocol}}{{mirror}}/stack-setup.yaml"
urls:
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/
```
latest-snapshot: {{http_protocol}}{{mirror}}/snapshots.json
lts-build-plans: {{http_protocol}}{{mirror}}/lts-haskell/
nightly-build-plans: {{http_protocol}}{{mirror}}/stackage-nightly/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-3" class="language-yaml" data-template="#template-3" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -38,6 +38,7 @@ Ubuntu 的软件源配置文件是 `/etc/apt/sources.list`。将系统自带的
<label>Ubuntu 版本:</label>
<select id="select-0-0" class="form-control content-select" data-target="#content-0">
<option data-release_name="jammy" selected>22.04 LTS</option>
<option data-release_name="lunar">23.04</option>
<option data-release_name="kinetic">22.10</option>
<option data-release_name="focal">20.04 LTS</option>
<option data-release_name="bionic">18.04 LTS</option>

View File

@ -40,6 +40,7 @@ Ubuntu 的软件源配置文件是 `/etc/apt/sources.list`。将系统自带的
<label>Ubuntu 版本:</label>
<select id="select-0-0" class="form-control content-select" data-target="#content-0">
<option data-release_name="jammy" selected>22.04 LTS</option>
<option data-release_name="lunar">23.04</option>
<option data-release_name="kinetic">22.10</option>
<option data-release_name="focal">20.04 LTS</option>
<option data-release_name="bionic">18.04 LTS</option>

View File

@ -4,20 +4,70 @@ layout: help
mirrorid: voidlinux
---
# Voidlinux 镜像使用帮助
# Void Linux 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
使用如下命令替换为本镜像:
```
# mkdir -p /etc/xbps.d
# cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
# sed -i 's|https://repo-default.voidlinux.org|https://{{site.hostname}}/voidlinux|g' /etc/xbps.d/*-repository-*.conf
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
mkdir -p /etc/xbps.d
cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
sed -i 's|https://repo-default.voidlinux.org|{{http_protocol}}{{mirror}}|g' /etc/xbps.d/*-repository-*.conf
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
若报错可尝试
```
sed -i 's|https://alpha.de.repo.voidlinux.org|https://{{ site.hostname }}/voidlinux|g' /etc/xbps.d/*-repository-*.conf
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
sed -i 's|https://alpha.de.repo.voidlinux.org|{{http_protocol}}{{mirror}}|g' /etc/xbps.d/*-repository-*.conf
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
之后可用 `xbps-query -L` 检查是否正确替换。
参考[官方教程](https://docs.voidlinux.org/xbps/repositories/mirrors/changing.html)。

View File

@ -6,25 +6,92 @@ mirrorid: rubygems
# Ruby Gems 镜像使用帮助
## `gem`
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
## gem
使用以下命令替换 gems 默认源
```bash
# 添加 TUNA 源并移除默认源
gem sources --add https://{{ site.hostname }}/rubygems/ --remove https://rubygems.org/
{% raw %}
<script id="template-0" type="x-tmpl-markup">
# 添加镜像源并移除默认源
gem sources --add {{http_protocol}}{{mirror}}/ --remove https://rubygems.org/
# 列出已有源
gem sources -l
# 应该只有 TUNA 一个
```
# 应该只有镜像源一个
</script>
{% endraw %}
或者,编辑 `~/.gemrc`,将 `https://{{ site.hostname }}/rubygems/` 加到 `sources` 字段。
<p></p>
## `bundler`
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
或者,编辑 `~/.gemrc`,将
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
加到 `sources` 字段。
## bundler
使用以下命令替换 bundler 默认源
```bash
bundle config mirror.https://rubygems.org https://{{ site.hostname }}/rubygems
```
官方文档: http://bundler.io/v1.16/man/bundle-config.1.html#MIRRORS-OF-GEM-SOURCES
{% raw %}
<script id="template-2" type="x-tmpl-markup">
bundle config mirror.https://rubygems.org {{http_protocol}}{{mirror}}
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-bash" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
官方文档http://bundler.io/v1.16/man/bundle-config.1.html#MIRRORS-OF-GEM-SOURCES

View File

@ -4,16 +4,70 @@ layout: help
mirrorid: bioconductor
---
[Bioconductor](https://www.bioconductor.org) 镜像使用帮助
===================
# Bioconductor 软件仓库镜像使用帮助
Bioconductor 镜像源配置文件之一是 `.Rprofile` (linux 下位于 `~/.Rprofile` )。
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
在文末添加如下语句:
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
Bioconductor 为高通量基因组数据的分析和可视化提供开源工具。Bioconductor 多数软件包采用 R 统计编程语言开发。Bioconductor 每年释出两个版本,并有活跃的用户社区。
使用方法:[Bioconductor](https://www.bioconductor.org) 镜像源配置文件之一是 `.Rprofile`linux 下位于 `~/.Rprofile`, Windows 下位于 `~\library\base\R\Rprofile`)。
在文末添加如下语句或在R/RStudio终端下键入
{% raw %}
<script id="template-0" type="x-tmpl-markup">
options(BioC_mirror="{{http_protocol}}{{mirror}}")
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-r" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
即可使用该 Bioconductor 镜像源安装 Bioconductor 软件包。命令如下:
{% raw %}
<script id="template-1" type="x-tmpl-markup">
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("$package_name")
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-r" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
```
options(BioC_mirror="https://{{ site.hostname }}/bioconductor")
```
打开R即可使用该 Bioconductor 镜像源安装 Bioconductor 软件包。

View File

@ -4,30 +4,164 @@ layout: help
mirrorid: CRAN
---
CRAN 镜像使用帮助
===================
# CRAN 镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3,#content-4">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3,#content-4">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
### 长期使用
[CRAN](https://cran.r-project.org/) (The Comprehensive R Archive Network) 镜像源配置文件之一是 `.Rprofile` (linux 下位于 `~/.Rprofile` )。
在文末添加如下语句:
在文末添加如下语句:
```
options("repos" = c(CRAN="https://{{ site.hostname }}/CRAN/"))
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
options("repos" = c(CRAN="{{http_protocol}}{{mirror}}/"))
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-r" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
打开 R 即可使用该 CRAN 镜像源安装 R 软件包。
Ubuntu 下添加CRAN镜像安装r
====================================
参考[(README里的步骤)](https://{{ site.hostname }}/CRAN/bin/linux/ubuntu/fullREADME.html)
### 临时使用
在安装时指定 repo。
{% raw %}
<script id="template-1" type="x-tmpl-markup">
install.packages("lattice", repos="{{http_protocol}}{{mirror}}/")
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-r" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
## Debian/Ubuntu 下添加 CRAN 镜像安装 R
参考如下链接中 README 里的步骤
{% raw %}
<script id="template-2" type="x-tmpl-markup">
# Debian 帮助
{{http_protocol}}{{mirror}}/bin/linux/debian/
# Ubuntu 帮助
{{http_protocol}}{{mirror}}/bin/linux/ubuntu/fullREADME.html
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
编辑 `/etc/apt/sources.list.d/r-mirror.list`
<form class="form-inline">
<div class="form-group">
<label>发行版:</label>
<select id="select-3-0" class="form-control content-select" data-target="#content-3">
<option data-os_name="debian" data-release_name="bullseye" selected>Debian 11</option>
<option data-os_name="debian" data-release_name="buster">Debian 10</option>
<option data-os_name="debian" data-release_name="stretch">Debian 9</option>
<option data-os_name="debian" data-release_name="jessie">Debian 8</option>
<option data-os_name="ubuntu" data-release_name="jammy">Ubuntu 22.04 LTS</option>
<option data-os_name="ubuntu" data-release_name="focal">Ubuntu 20.04 LTS</option>
<option data-os_name="ubuntu" data-release_name="bionic">Ubuntu 18.04 LTS</option>
<option data-os_name="ubuntu" data-release_name="xenial">Ubuntu 16.04 LTS</option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>CRAN 版本号:</label>
<select id="select-3-1" class="form-control content-select" data-target="#content-3">
<option data-version="cran40" selected>cran40</option>
<option data-version="cran35">cran35</option>
<option data-version="cran34">cran34</option>
</select>
</div>
</form>
{% raw %}
<script id="template-3" type="x-tmpl-markup">
deb {{http_protocol}}{{mirror}}/bin/linux/{{os_name}} {{release_name}}-{{version}}/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-3" class="language-properties" data-template="#template-3" data-select="#http-select,#sudo-select,#select-3-0,#select-3-1">
</code>
</pre>
例如 `Ubuntu 18.04` 编辑 `sudo vim /etc/apt/sources.list.d/r-tuna.list` 输入
`deb https://{{ site.hostname }}/CRAN/bin/linux/ubuntu bionic-cran40/` (注意根据你的发行版替换`bionic`,根据需要的版本号替换`cran40`)
然后运行
```
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get update
sudo apt-get install r-base-dev
```
{% raw %}
<script id="template-4" type="x-tmpl-markup">
# Debian 用户添加该公钥
{{sudo}}apt-key adv --keyserver keyserver.ubuntu.com --recv-key '95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7'
# Ubuntu 用户添加该公钥
{{sudo}}apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
{{sudo}}apt-get update
{{sudo}}apt-get install r-base-dev
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-4" class="language-bash" data-template="#template-4" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,22 +4,114 @@ layout: help
mirrorid: anthon
---
# AOSC OS安同 OS镜像使用帮助
# Anthon 软件仓库镜像使用帮助
AOSC OS 是一个由安同开源社区(<https://aosc.io>)开发的半滚动 Linux 发行版,支持多种处理器架构。
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
AOSC OS 内置 `apt-gen-list` 工具来切换社区提供的可用镜像源。要启用 TUNA 源,执行:
```bash
sudo apt-gen-list add-mirror tuna
```
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
要仅启用 TUNA 源,执行:
```bash
sudo apt-gen-list set-mirror tuna
```
若要启动 BFSU 源,将上述命令的 `tuna` 改为 `bfsu` 即可。
AOSC OS 是一个由[安同开源社区](https://aosc.io) 开发的半滚动 Linux 发行版,支持多种处理器架构。
### 自动替换
AOSC OS 内置 `apt-gen-list` 工具来切换社区提供的可用镜像源。
列出可用镜像源,执行:
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{sudo}}apt-gen-list list-mirrors
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
要启用某一镜像源,执行:
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}apt-gen-list add-mirror <mirror>
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
其中 `{mirror}` 替换为所列出的简称。
要仅启用某一源,执行:
{% raw %}
<script id="template-2" type="x-tmpl-markup">
{{sudo}}apt-gen-list set-mirror <mirror>
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-bash" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
其中 `<mirror>` 替换为所列出的简称。
关于 `apt-gen-list` 的语义和详细用法,请执行 `apt-gen-list help` 查看帮助。
### 手动修改
修改 `/etc/apt/sources.list`,内容为
{% raw %}
<script id="template-3" type="x-tmpl-markup">
deb {{http_protocol}}{{mirror}}/debs stable main
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-3" class="language-properties" data-template="#template-3" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,40 +4,86 @@ layout: help
mirrorid: rustup
---
# Rustup 镜像安装帮助
# Rustup 镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
[Rustup](https://rustup.rs/) 是 Rust 官方的跨平台 Rust 安装工具。
TUNA 只会保留一段时间的 nightly如果在安装时出现错误请用 `RUSTUP_DIST_SERVER= rustup ...` 来使用官方源。
镜像站只会保留一段时间的 nightly如果在安装时出现错误请用 `RUSTUP_DIST_SERVER= rustup ...` 来使用官方源。
使用 rustup 安装 rust 时,若要启用 TUNA 源,执行:
使用 rustup 安装 rust 时,若要启用镜像源,执行:
```bash
$ # for bash
$ RUSTUP_DIST_SERVER=https://{{ site.hostname }}/rustup rustup install stable # for stable
$ # for fish
$ env RUSTUP_DIST_SERVER=https://{{ site.hostname }}/rustup rustup install stable # for stable
$ # for bash
$ RUSTUP_DIST_SERVER=https://{{ site.hostname }}/rustup rustup install nightly # for nightly
$ # for fish
$ env RUSTUP_DIST_SERVER=https://{{ site.hostname }}/rustup rustup install nightly # for nightly
$ # for bash
$ RUSTUP_DIST_SERVER=https://{{ site.hostname }}/rustup rustup install nightly-YYYY-mm-dd
$ # for fish
$ env RUSTUP_DIST_SERVER=https://{{ site.hostname }}/rustup rustup install nightly-YYYY-mm-dd
```
若要长期启用 TUNA 源,执行:
{% raw %}
<script id="template-0" type="x-tmpl-markup">
# for bash
RUSTUP_DIST_SERVER={{http_protocol}}{{mirror}} rustup install stable # for stable
# for fish
env RUSTUP_DIST_SERVER={{http_protocol}}{{mirror}} rustup install stable # for stable
# for bash
RUSTUP_DIST_SERVER={{http_protocol}}{{mirror}} rustup install nightly # for nightly
# for fish
env RUSTUP_DIST_SERVER={{http_protocol}}{{mirror}} rustup install nightly # for nightly
# for bash
RUSTUP_DIST_SERVER={{http_protocol}}{{mirror}} rustup install nightly-YYYY-mm-dd
# for fish
env RUSTUP_DIST_SERVER={{http_protocol}}{{mirror}} rustup install nightly-YYYY-mm-dd
</script>
{% endraw %}
```bash
$ # for bash
$ echo 'export RUSTUP_UPDATE_ROOT=https://{{ site.hostname }}/rustup/rustup' >> ~/.bash_profile
$ echo 'export RUSTUP_DIST_SERVER=https://{{ site.hostname }}/rustup' >> ~/.bash_profile
$ # for fish
$ echo 'set -x RUSTUP_UPDATE_ROOT https://{{ site.hostname }}/rustup/rustup' >> ~/.config/fish/config.fish
$ echo 'set -x RUSTUP_DIST_SERVER https://{{ site.hostname }}/rustup' >> ~/.config/fish/config.fish
```
<p></p>
rustup 在判断是否需要更新时依赖于 toml 的 sha256 ,由于 toml 内容中相关链接被替换为 TUNA 源,第一次切换到 TUNA 源时各个 channel 会被认为需要更新。
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
若要长期启用镜像源,执行:
{% raw %}
<script id="template-1" type="x-tmpl-markup">
# for bash
echo 'export RUSTUP_UPDATE_ROOT={{http_protocol}}{{mirror}}/rustup' >> ~/.bash_profile
echo 'export RUSTUP_DIST_SERVER={{http_protocol}}{{mirror}}' >> ~/.bash_profile
# for fish
echo 'set -x RUSTUP_UPDATE_ROOT {{http_protocol}}{{mirror}}/rustup' >> ~/.config/fish/config.fish
echo 'set -x RUSTUP_DIST_SERVER {{http_protocol}}{{mirror}}' >> ~/.config/fish/config.fish
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
rustup 在判断是否需要更新时依赖于 toml 的 sha256由于 toml 内容中相关链接被替换为镜像源,第一次切换到镜像源时各个 channel 会被认为需要更新。

View File

@ -4,26 +4,74 @@ layout: help
mirrorid: dart-pub
---
# Pub 镜像安装帮助
# Dart Pub 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
[Pub](https://pub.dartlang.org/) 是 Dart 官方的包管理器。跨平台的前端应开发
框架 [Flutter](https://flutter.dev/) 也基于 Dart 并且可以使用大部分 Pub 中的
库。
如果希望通过 TUNA 的 pub 镜像安装软件,只需要设置 [PUB_HOSTED_URL](https://www.dartlang.org/tools/pub/environment-variables)
这个环境变量指向 https://{{ site.hostname }}/dart-pub 即可。
如果希望通过 pub 镜像安装软件,只需要设置 [PUB_HOSTED_URL](https://www.dartlang.org/tools/pub/environment-variables)
以 bash 为例,临时使用 TUNA 的镜像来安装依赖:
以 bash 为例,临时使用镜像来安装依赖:
```bash
export PUB_HOSTED_URL="https://{{ site.hostname }}/dart-pub" # pub: pub get
export PUB_HOSTED_URL="https://{{ site.hostname }}/dart-pub" # flutter: flutter packages get
```
若希望长期使用 TUNA 镜像:
```bash
echo 'export PUB_HOSTED_URL="https://{{ site.hostname }}/dart-pub"' >> ~/.bashrc
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
export PUB_HOSTED_URL="{{http_protocol}}{{mirror}}"
# pub: pub get
# flutter: flutter packages get
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
若希望长期使用镜像:
{% raw %}
<script id="template-1" type="x-tmpl-markup">
echo 'export PUB_HOSTED_URL="{{http_protocol}}{{mirror}}"' >> ~/.bashrc
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
Flutter 镜像使用方法参见 [Flutter 镜像安装帮助](/help/flutter)。
Flutter 镜像使用方法参见 [Flutter 镜像安装帮助](../flutter)。

View File

@ -4,36 +4,81 @@ layout: help
mirrorid: arch4edu
---
## Arch4edu 镜像使用帮助
# Arch4edu 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
Arch4edu 是面向高校用户推出的非官方软件仓库,
支持 Arch Linux 和 Arch Linux ARM
主要包含高校用户常用的科研、教学及开发软件。
*  项目地址:<https://github.com/arch4edu/arch4edu>
*  镜像地址:<https://{{ site.hostname }}/arch4edu>
### 使用方法
* 导入 GPG key
```
# pacman-key --recv-keys 7931B6D628C8D3BA
# pacman-key --finger 7931B6D628C8D3BA
# pacman-key --lsign-key 7931B6D628C8D3BA
pacman-key --recv-keys 7931B6D628C8D3BA
pacman-key --finger 7931B6D628C8D3BA
pacman-key --lsign-key 7931B6D628C8D3BA
```
* 在 `/etc/pacman.conf` 文件末尾添加以下内容:
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
[arch4edu]
Server = https://{{ site.hostname }}/arch4edu/$arch
```
Server = {{http_protocol}}{{mirror}}/$arch
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-ini" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
* [**不推荐**] 不导入 GPG key并直接在 `/etc/pacman.conf` 文件末尾添加以下内容:
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
[arch4edu]
SigLevel = Never
Server = https://{{ site.hostname }}/arch4edu/$arch
```
Server = {{http_protocol}}{{mirror}}/$arch
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-ini" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,20 +4,64 @@ layout: help
mirrorid: qubesos
---
## Qubes OS 镜像使用帮助
# Qubes OS 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
[Qubes OS](https://www.qubes-os.org/) 是一个面向安全的操作系统。
它使用一种叫做*隔离保证安全* (security by compartmentalization) 的理念,采用虚拟化技术隔离各个应用来保证安全。
### 使用方法
#### R4.1及以上
#### R4.1 及以上
`/etc/dnf/dnf.conf` 中添加 `fastestmirror=True`
#### R4.0及以下
#### R4.0 及以下
每次使用 `qubes-dom0-update --setopt=fastestmirror=True` 更新
或者不想使用上述命令,您可以使用如下方法
对于 `/etc/yum.repos.d` 下的 `qubes-*.repo`:
1. 用`#`注释掉所有的 `metalink`
2. 将 `baseurl` 中的 `https://yum.qubes-os.org/` 替换为 `https://{{ site.hostname }}/qubesos/repo/yum/` ,并取消这些 `baseurl` 的注释
2. 将 `baseurl` 中的 `https://yum.qubes-os.org/` 替换为
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/repo/yum/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
并取消这些 `baseurl` 的注释

View File

@ -4,32 +4,91 @@ layout: help
mirrorid: solus
---
## Solus 镜像使用帮助
# Solus 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
Solus 是一个界面美观,对新手友好的 Linux 发行版,使用 `eopkg` 作为包管理器。
* 项目地址:<https://getsol.us>
* 镜像地址:<https://{{ site.hostname }}/solus>
* 项目地址https://getsol.us
### 使用方法
执行以下命令
```
sudo eopkg add-repo Tuna https://{{ site.hostname }}/solus/packages/shannon/eopkg-index.xml.xz
```
此后,之行以下命令以启用 Tuna 源,禁用官方源
```
sudo eopkg enable-repo Tuna
sudo eopkg disable-repo Solus
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{sudo}}eopkg add-repo Mirror {{http_protocol}}{{mirror}}/packages/shannon/eopkg-index.xml.xz
</script>
{% endraw %}
或者用 Tuna 源直接覆盖官方源
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
此后,之行以下命令以启用 Mirror 源,禁用官方源
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}eopkg enable-repo Mirror
{{sudo}}eopkg disable-repo Solus
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-shell" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
或者用 Mirror 源直接覆盖官方源
{% raw %}
<script id="template-2" type="x-tmpl-markup">
{{sudo}}eopkg add-repo Solus {{http_protocol}}{{mirror}}/packages/shannon/eopkg-index.xml.xz
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
```
sudo eopkg add-repo Solus https://{{ site.hostname }}/solus/packages/shannon/eopkg-index.xml.xz
```
关于 `eopkg` 命令的详细用法,请执行 `eopkg help` 查看帮助。

View File

@ -4,22 +4,61 @@ layout: help
mirrorid: kicad
---
## KiCad 镜像使用帮助
# KiCad 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
[KiCad](http://kicad.org/) 一个跨平台的开源电子设计自动化套件。
### KiCad 镜像目录使用说明
#### [KiCad 镜像目录说明](https://{{ site.hostname }}/kicad/)
#### KiCad 镜像目录说明
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
目录 | 说明 | 备注
-----------|----------|---------
appimage/ |appimage 安装包|chmod +x \*.AppImage && ./*.AppImage
archive/ |压缩文件| 旧文件
docs/ |发行版的文档手册|包含 HTML、PDF、EPUB
doxygen/ |KiCad 开发配置|详细开发手册
doxygen-python/ |KiCad Python 开发配置|详细开发手册
libraries/ |封装库和集成库|发行版本的封装库和集成库
archive/ |压缩文件 | 旧文件
docs/ |发行版的文档手册 | 包含 HTML、PDF、EPUB
doxygen/ |KiCad 开发配置 | 详细开发手册
doxygen-python/ |KiCad Python 开发配置 | 详细开发手册
libraries/ |封装库和集成库 | 发行版本的封装库和集成库
osx/ | KiCad OSX 版本目录 | 包含稳定版、夜间版和测试版
windows/ | KiCad Windows 版本目录 | 包含稳定版、夜间版和测试版
cleanup.sh | 清理脚本 |无
@ -29,22 +68,52 @@ list.js |JS 脚本 |无
#### Windows 下载安装
[KiCad Windows 版本下载](https://{{ site.hostname }}/kicad/windows/)
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/windows/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
目录 | 说明 | 备注
-----------|----------|---------
nightly/ | 夜间构建版本|无
stable/ | 发行版本|看版本号选择合适的下载
testing/ | 测试版本|选择对应分支下载测试
nightly/ | 夜间构建版本 |
stable/ | 发行版本 | 看版本号选择合适的下载
testing/ | 测试版本 | 选择对应分支下载测试
#### OS X 下载安装
[OS X 版本下载](https://{{ site.hostname }}/kicad/osx/)
{% raw %}
<script id="template-2" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/osx/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
目录 | 说明 | 备注
-----------|----------|---------
nightly/ | 夜间构建版本|无
stable/ | 发行版本|看版本号选择合适的下载
testing/ | 测试版本|选择对应分支下载测试
nightly/ | 夜间构建版本 | 无
stable/ | 发行版本 | 看版本号选择合适的下载
testing/ | 测试版本 | 选择对应分支下载测试

View File

@ -4,8 +4,30 @@ layout: help
mirrorid: tlpretest
---
tlpretest 镜像使用帮助
===================
# TeXLive Pretest 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
tlpretest 是 TeX Live 在官方镜像之外发布的测试版本,详情可见 [官方介绍](https://www.tug.org/texlive/pretest.html)。
@ -13,17 +35,41 @@ tlpretest 是 TeX Live 在官方镜像之外发布的测试版本,详情可见
在命令行中执行:
```
tlmgr option repository https://{{ site.hostname }}/tlpretest
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
tlmgr option repository {{http_protocol}}{{mirror}}
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
即可永久更改镜像源。
如果只需要临时切换,可以用如下命令:
```
tlmgr update --all --repository https://{{ site.hostname }}/tlpretest
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
tlmgr update --all --repository {{http_protocol}}{{mirror}}
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
其中的 `update --all` 指令可根据需要修改。

View File

@ -4,17 +4,70 @@ layout: help
mirrorid: ceph
---
# CEPH 镜像安装帮助
# Ceph 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
[Ceph](https://ceph.io/) 是一个开源软件存储平台,在单个分布式计算机集群上实现对象存储。
请参考[Ceph 官方安装教程](https://docs.ceph.com/en/latest/install/get-packages/),只需要把文档中出现的 `download.ceph.com` 替换为 `{{ site.hostname }}/ceph` 即可。
请参考[Ceph 官方安装教程](https://docs.ceph.com/en/latest/install/get-packages/),只需要把文档中出现的 `download.ceph.com` 替换为以下链接即可。
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
以 Debian Buster 为例,举例如下:
```shell
$ wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
$ sudo apt-add-repository 'deb https://{{ site.hostname }}/ceph/debian-octopus/ buster main'
$ sudo apt update
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
wget -q -O- 'https://download.ceph.com/keys/release.asc' | {{sudo}}apt-key add -
{{sudo}}apt-add-repository 'deb {{http_protocol}}{{mirror}}/debian-octopus/ buster main'
{{sudo}}apt update
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-shell" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,66 +4,188 @@ layout: help
mirrorid: opensuse
---
## openSUSE 镜像使用帮助
# openSUSE 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3,#content-4,#content-5,#content-6">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3,#content-4,#content-5,#content-6">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
openSUSE 项目是一个由 Novell 赞助的社区项目。该项目旨在推进 Linux 的广泛应用,提供自由、易于入手和美观实用的 openSUSE Linux 发行版。openSUSE 使用 `zypper` 作为包管理器。
* 项目地址:<https://www.opensuse.org>
* 镜像地址:<https://{{ site.hostname }}/opensuse>
openSUSE 默认使用 [MirrorBrain](https://zh.opensuse.org/MirrorBrain) 技术统一镜像入口,通过在下载时自动分配镜像站点,从而给用户提供更好的安全性,通常情况下使用默认配置即可。
由于使用 MirrorBrain 需要从位于德国的 openSUSE 主服务器上获取元信息,所以若在使用默认软件源时获取元信息较慢,可以使用 TUNA 镜像软件源替换默认软件源。
由于使用 MirrorBrain 需要从位于德国的 openSUSE 主服务器上获取元信息,所以若在使用默认软件源时获取元信息较慢,可以使用镜像软件源替换默认软件源。
### openSUSE Leap 15.2 或更新版本使用方法
禁用官方软件源
```shell
sudo zypper mr -da
```
添加 TUNA 镜像源
```shell
sudo zypper ar -cfg 'https://{{ site.hostname }}/opensuse/distribution/leap/$releasever/repo/oss/' tuna-oss
sudo zypper ar -cfg 'https://{{ site.hostname }}/opensuse/distribution/leap/$releasever/repo/non-oss/' tuna-non-oss
sudo zypper ar -cfg 'https://{{ site.hostname }}/opensuse/update/leap/$releasever/oss/' tuna-update
sudo zypper ar -cfg 'https://{{ site.hostname }}/opensuse/update/leap/$releasever/non-oss/' tuna-update-non-oss
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{sudo}}zypper mr -da
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
添加镜像源
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}zypper ar -cfg '{{http_protocol}}{{mirror}}/distribution/leap/$releasever/repo/oss/' mirror-oss
{{sudo}}zypper ar -cfg '{{http_protocol}}{{mirror}}/distribution/leap/$releasever/repo/non-oss/' mirror-non-oss
{{sudo}}zypper ar -cfg '{{http_protocol}}{{mirror}}/update/leap/$releasever/oss/' mirror-update
{{sudo}}zypper ar -cfg '{{http_protocol}}{{mirror}}/update/leap/$releasever/non-oss/' mirror-update-non-oss
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
Leap 15.3 用户还需添加 sle 和 backports 源
```shell
sudo zypper ar -cfg 'https://{{ site.hostname }}/opensuse/update/leap/$releasever/sle/' tuna-sle-update
sudo zypper ar -cfg 'https://{{ site.hostname }}/opensuse/update/leap/$releasever/backports/' tuna-backports-update
```
Leap 15.3 注:若在安装时**没有**启用在线软件源, sle 源和 backports 源将在系统首次更新后引入,请确保系统在更新后仅启用了**六个**所需软件源。可使用 `zypper lr` 检查软件源状态,并使用 `zypper mr -d` 禁用多余的软件源。
{% raw %}
<script id="template-2" type="x-tmpl-markup">
{{sudo}}zypper ar -cfg '{{http_protocol}}{{mirror}}/update/leap/$releasever/sle/' mirror-sle-update
{{sudo}}zypper ar -cfg '{{http_protocol}}{{mirror}}/update/leap/$releasever/backports/' mirror-backports-update
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-2" class="language-bash" data-template="#template-2" data-select="#http-select,#sudo-select">
</code>
</pre>
Leap 15.3 注:若在安装时**没有**启用在线软件源sle 源和 backports 源将在系统首次更新后引入,请确保系统在更新后仅启用了**六个**所需软件源。可使用 `zypper lr` 检查软件源状态,并使用 `zypper mr -d` 禁用多余的软件源。
### openSUSE Tumbleweed 使用方法
禁用官方软件源
```shell
sudo zypper mr -da
```
添加 TUNA 镜像源
```shell
sudo zypper ar -cfg 'https://{{ site.hostname }}/opensuse/tumbleweed/repo/oss/' tuna-oss
sudo zypper ar -cfg 'https://{{ site.hostname }}/opensuse/tumbleweed/repo/non-oss/' tuna-non-oss
```
{% raw %}
<script id="template-3" type="x-tmpl-markup">
{{sudo}}zypper mr -da
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-3" class="language-shell" data-template="#template-3" data-select="#http-select,#sudo-select">
</code>
</pre>
添加镜像源
{% raw %}
<script id="template-4" type="x-tmpl-markup">
{{sudo}}zypper ar -cfg '{{http_protocol}}{{mirror}}/tumbleweed/repo/oss/' mirror-oss
{{sudo}}zypper ar -cfg '{{http_protocol}}{{mirror}}/tumbleweed/repo/non-oss/' mirror-non-oss
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-4" class="language-shell" data-template="#template-4" data-select="#http-select,#sudo-select">
</code>
</pre>
刷新软件源
```shell
sudo zypper ref
```
Tumbleweed 注: Tumbleweed 安装后默认会启用 oss, non-oss, update, 3 个官方软件源,
{% raw %}
<script id="template-5" type="x-tmpl-markup">
{{sudo}}zypper ref
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-5" class="language-shell" data-template="#template-5" data-select="#http-select,#sudo-select">
</code>
</pre>
Tumbleweed 注Tumbleweed 安装后默认会启用 oss, non-oss, update, 3 个官方软件源,
其中 oss 及 non-oss 源用于发布 Tumbleweed 的每日构建快照,快照中已包含系统所需的全部软件包及更新。
update 源仅用于推送临时安全补丁,如当日快照已发布但仍有临时安全补丁时,会首先推送至 update 源,并在次日合入下一版快照。
由于 update 源存在较强的时效性,上游镜像并未同步 update 源, TUNA 亦无法提供该源的镜像。
由于 update 源存在较强的时效性,上游镜像并未同步 update 源,镜像源亦无法提供该源的镜像。
禁用 update 源并不会使系统缺失任何功能或安全更新,仅会导致极少数更新晚些推送,如有需求可以重新启用官方 update 源。
## 图形界面下配置方法
以 openSUSE Leap 15.3 为例:
1. 打开 YaST
2. 点击 Software 分组中的 Software Repositories
3. 在打开的窗口上方的列表中点击 Main Repository点击 Edit
4. 将 download.opensuse.org 替换为
{% raw %}
<script id="template-6" type="x-tmpl-markup">
{{mirror}}
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-6" class="language-plaintext" data-template="#template-6" data-select="#http-select,#sudo-select">
</code>
</pre>
点 OK
5. 再用同样的方法编辑 Non-OSS Repository, Main Update Repository, Update Repository (Non-Oss) 和 Update repository with updates from SUSE Linux Enterprise 15。

View File

@ -4,11 +4,51 @@ layout: help
mirrorid: ubuntu-cloud-images
---
ubuntu-cloud-images 镜像使用指南
===================
# Ubuntu Cloud Images 镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
收录官方的云 Ubuntu 镜像,由 Canonical 定制,提供 Ubuntu 认证镜像,可 Openstack、LXD 等的公共云上运行。
收录官方对 KVM,Hyper-v,XEN 等虚拟结构的官方定制镜像
收录官方对 KVMHyper-vXEN 等虚拟结构的官方定制镜像
使用以下链接进行查找所需要的镜像
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/locator/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
使用 <https://{{ site.hostname }}/ubuntu-cloud-images/locator/> 进行查找所需要的镜像

View File

@ -4,13 +4,69 @@ layout: help
mirrorid: qt
---
qt 镜像使用指南
===================
# Qt 软件仓库镜像使用帮助
下载[在线安装器](https://{{ site.hostname }}/qt/official_releases/online_installers/),后通过
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
通过一下链接下载在线安装器
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/official_releases/online_installers/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
通过
{% raw %}
<script id="template-1" type="x-tmpl-markup">
# linux
installer --mirror {{http_protocol}}{{mirror}}
# windows
installer.exe --mirror {{http_protocol}}{{mirror}}
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>
```console
installer(.exe) --mirror https://{{ site.hostname }}/qt
```
使用该镜像。

View File

@ -4,19 +4,67 @@ layout: help
mirrorid: bazel-apt
---
## bazel-apt 镜像使用帮助
# Bazel APT 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
使用以下命令启用 bazel-apt 仓库
```bash
sudo apt install apt-transport-https curl gnupg
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{sudo}}apt install apt-transport-https curl gnupg
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
sudo mv bazel-archive-keyring.gpg /usr/share/keyrings
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://{{ site.hostname }}/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
```
{{sudo}}mv bazel-archive-keyring.gpg /usr/share/keyrings
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] {{http_protocol}}{{mirror}} stable jdk1.8" | {{sudo}}tee /etc/apt/sources.list.d/bazel.list
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
使用以下命令安装 bazel
```bash
sudo apt update && sudo apt install bazel
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}apt update && {{sudo}}apt install bazel
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,16 +4,63 @@ layout: help
mirrorid: elasticstack
---
# Elasticsearch 镜像安装帮助
# Elastic Stack 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
[Elasticsearch](https://www.elastic.co/cn/what-is/elasticsearch) 是位于 Elastic Stack 核心的分布式搜索和分析引擎。
请参考[elasticsearch 官方安装教程](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html)。
以 Debian/Ubuntu 安装 7.x 为例,举例如下:
以 Debian/Ubuntu 安装为例,举例如下:
<form class="form-inline">
<div class="form-group">
<label>版本:</label>
<select id="select-0-0" class="form-control content-select" data-target="#content-0">
<option data-version="8.x" selected>8.x</option>
<option data-version="7.x">7.x</option>
<option data-version="6.x">6.x</option>
</select>
</div>
</form>
{% raw %}
<script id="template-0" type="x-tmpl-markup">
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | {{sudo}}gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] {{http_protocol}}{{mirror}}/{{version}}/apt/ stable main" | {{sudo}}tee /etc/apt/sources.list.d/elastic-{{version}}.list
{{sudo}}apt-get update && {{sudo}}apt-get install elasticsearch
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select,#select-0-0">
</code>
</pre>
```shell
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://{{ site.hostname }}/elasticstack/7.x/apt/ stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update && sudo apt-get install elasticsearch
```

View File

@ -4,7 +4,30 @@ layout: help
mirrorid: entware
---
## Entware 镜像使用帮助
# Entware 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
Entware 使用 opkg 来管理其软件包,只需修改 opkg 配置文件中的软件源地址,就可以使用镜像来下载软件包。
@ -12,14 +35,39 @@ Entware 使用 opkg 来管理其软件包,只需修改 opkg 配置文件中的
替换后,请运行 `opkg update` 命令,更新软件包 feed。
```bash
sed -i 's|bin.entware.net|{{ site.hostname }}/entware|g' /opt/etc/opkg.conf
{% raw %}
<script id="template-0" type="x-tmpl-markup">
sed -i 's|https\?://bin.entware.net|{{http_protocol}}{{mirror}}|g' /opt/etc/opkg.conf
opkg update
```
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
如果系统没有 sed 命令,可以手动编辑 `/opt/etc/opkg.conf` 文件,编辑时请注意自己设备的处理器架构。
例如:
```
src/gz entware http://{{ site.hostname }}/entware/aarch64-k3.10
```
{% raw %}
<script id="template-1" type="x-tmpl-markup">
src/gz entware {{http_protocol}}{{mirror}}/aarch64-k3.10
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,21 +4,80 @@ layout: help
mirrorid: kali
---
Kali 镜像使用帮助
===================
# Kali 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
本镜像包含 amd64, arm64, armel, armhf, i386 架构处理器的软件包。
### 手动替换
编辑 `/etc/apt/sources.list` 文件,在文件最前面添加以下条目:
```
deb https://{{ site.hostname }}/kali kali-rolling main non-free contrib
# deb-src https://{{ site.hostname }}/kali kali-rolling main non-free contrib
```
### 命令替换
执行如下命令自动替换
```bash
sudo sed -i "s@http://http.kali.org@https://{{ site.hostname }}@g" /etc/apt/sources.list
```
<form class="form-inline">
<div class="form-group">
<label>启用源码镜像:</label>
<select id="select-0-0" class="form-control content-select" data-target="#content-0">
<option data-enable_source="# " selected></option>
<option data-enable_source=""></option>
</select>
</div>
</form>
{% raw %}
<script id="template-0" type="x-tmpl-markup">
deb {{http_protocol}}{{mirror}} kali-rolling main non-free contrib
{{enable_source}}deb-src {{http_protocol}}{{mirror}} kali-rolling main non-free contrib
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-properties" data-template="#template-0" data-select="#http-select,#sudo-select,#select-0-0">
</code>
</pre>
### sed 替换
执行如下命令 sed 替换
{% raw %}
<script id="template-1" type="x-tmpl-markup">
{{sudo}}sed -i "s@http://http.kali.org/kali@{{http_protocol}}{{mirror}}@g" /etc/apt/sources.list
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,11 +4,46 @@ layout: help
mirrorid: OpenBSD
---
OpenBSD 镜像使用帮助
===================
# OpenBSD 软件仓库镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
编辑 `/etc/installurl` 文件为以下内容:
```
https://{{ site.hostname }}/OpenBSD/
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
{{http_protocol}}{{mirror}}/
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>

View File

@ -4,18 +4,56 @@ layout: help
mirrorid: crates.io-index
---
## Rust crates.io 稀疏索引镜像使用帮助
# Rust crates.io 稀疏索引镜像使用帮助
<form class="form-inline">
<div class="form-group">
<label>是否使用 HTTPS</label>
<select id="http-select" class="form-control content-select" data-target="#content-0">
<option data-http_protocol="https://" selected></option>
<option data-http_protocol="http://"></option>
</select>
</div>
</form>
<form class="form-inline">
<div class="form-group">
<label>是否使用 sudo</label>
<select id="sudo-select" class="form-control content-select" data-target="#content-0">
<option data-sudo="sudo " selected></option>
<option data-sudo=""></option>
</select>
</div>
</form>
编辑 `~/.cargo/config` 文件,添加以下内容:
```
[source.crates-io]
replace-with = 'tuna'
[source.tuna]
registry = "sparse+https://{{ site.hostname }}/crates.io-index/"
```
{% raw %}
<script id="template-0" type="x-tmpl-markup">
[source.crates-io]
replace-with = 'mirror'
[source.mirror]
registry = "sparse+{{http_protocol}}{{mirror}}/"
</script>
{% endraw %}
<p></p>
<pre>
<code id="content-0" class="language-toml" data-template="#template-0" data-select="#http-select,#sudo-select">
</code>
</pre>
注:`sparse+` 表示在使用稀疏索引,链接末尾的 `/` 不能缺少。
截至目前,可以通过 `cargo +nightly -Z sparse-registry update` 使用稀疏索引。
cargo 1.68 版本开始支持稀疏索引:不再需要完整克隆 crates.io-index 仓库,可以加快获取包的速度。如果您的 cargo 版本大于等于 1.68,可以直接使用而不需要开启 nightly。