更新文档

This commit is contained in:
SuperManito
2023-05-03 22:50:12 +08:00
parent f98485ab45
commit f323136a61
50 changed files with 519 additions and 775 deletions

24
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: ci
on:
push:
branches:
- master
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ github.ref }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force

148
README.md
View File

@@ -1,168 +1,72 @@
# ![LinuxMirrors](./docs/img/logo.png) <p align="center">
<a href="https://supermanito.github.io/LinuxMirrors">
<img src="./docs/assets/images/logo.png" width="320" alt="Material for MkDocs">
</a>
</p>
<p align="center">
<strong>
<a href="https://supermanito.github.io/LinuxMirrors">官方网站</a>
</strong>
</p>
- __GNU/Linux 一键更换系统软件源脚本__ - __GNU/Linux 一键更换系统软件源脚本__
- __本项目旨在为从事计算机相关行业的朋友们提供便利__ - __本项目旨在为从事计算机相关行业的朋友们提供便利__
*** ***
- ### 适配系统 <img src="./docs/img/icon/linux.svg" width="16" height="16" style="vertical-align: -0.15em" alt="Linux Logo"/> - ### 适配系统及版本号 <img src="./docs/assets/images/icon/linux.svg" width="16" height="16" style="vertical-align: -0.15em" alt="Linux Logo"/>
<table> <table>
<tr> <tr>
<td rowspan="11"> 支持<br/>版本<br/> <td rowspan="11"> 支持<br/>版本<br/>
</tr> </tr>
<tr> <tr>
<td><a href="https://www.debian.org" target="_blank"><img src="./docs/img/icon/debian.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Debian</td> <td><a href="https://www.debian.org" target="_blank"><img src="./docs/assets/images/icon/debian.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Debian</td>
<td align="center">8.0 ~ 12</td> <td align="center">8.0 ~ 12</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://cn.ubuntu.com" target="_blank"><img src="./docs/img/icon/ubuntu.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Ubuntu</td> <td><a href="https://cn.ubuntu.com" target="_blank"><img src="./docs/assets/images/icon/ubuntu.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Ubuntu</td>
<td align="center">14.04 ~ 23</td> <td align="center">14.04 ~ 23</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://www.kali.org" target="_blank"><img src="./docs/img/icon/kali.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Kali Linux</td> <td><a href="https://www.kali.org" target="_blank"><img src="./docs/assets/images/icon/kali.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Kali Linux</td>
<td align="center">2.0 ~ 2023</td> <td align="center">2.0 ~ 2023</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://access.redhat.com/products/red-hat-enterprise-linux" target="_blank"><img src="./docs/img/icon/redhat.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Red Hat Enterprise Linux</td> <td><a href="https://access.redhat.com/products/red-hat-enterprise-linux" target="_blank"><img src="./docs/assets/images/icon/redhat.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Red Hat Enterprise Linux</td>
<td align="center">7.0 ~ 8.5</td> <td align="center">7.0 ~ 8.5</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="./docs/img/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS</td> <td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="./docs/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS</td>
<td align="center">7.0 ~ 8.5</td> <td align="center">7.0 ~ 8.5</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://www.centos.org/centos-stream" target="_blank"><img src="./docs/img/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS Stream</td> <td><a href="https://www.centos.org/centos-stream" target="_blank"><img src="./docs/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS Stream</td>
<td align="center">8 ~ 9</td> <td align="center">8 ~ 9</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://rockylinux.org" target="_blank"><img src="./docs/img/icon/rocky.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Rocky Linux</td> <td><a href="https://rockylinux.org" target="_blank"><img src="./docs/assets/images/icon/rocky.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Rocky Linux</td>
<td align="center">8.0 ~ 9</td> <td align="center">8.0 ~ 9</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://fedoraproject.org/zh-Hans" target="_blank"><img src="./docs/img/icon/fedora.ico" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Fedora</td> <td><a href="https://fedoraproject.org/zh-Hans" target="_blank"><img src="./docs/assets/images/icon/fedora.ico" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Fedora</td>
<td align="center">30 ~ 38</td> <td align="center">30 ~ 38</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://www.openeuler.org/zh" target="_blank"><img src="./docs/img/icon/openeuler.ico" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;openEuler</td> <td><a href="https://www.openeuler.org/zh" target="_blank"><img src="./docs/assets/images/icon/openeuler.ico" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;openEuler</td>
<td align="center">21.03 ~ 23</td> <td align="center">21.03 ~ 23</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://www.opensuse.org" target="_blank"><img src="./docs/img/icon/opensuse.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;openSUSE</td> <td><a href="https://www.opensuse.org" target="_blank"><img src="./docs/assets/images/icon/opensuse.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;openSUSE</td>
<td align="center">Leep 15 / Tumbleweed</td> <td align="center">Leep 15 / Tumbleweed</td>
</tr> </tr>
</table> </table>
当前支持上述基于 Debian、RedHat、openEuler、openSUSE 的发行版和及其部分衍生版本(点击列表中的图标可快速前往其官网),理论支持所有架构的环境,不在此支持范围内的操作系统或版本请勿运行本脚本 - ### [软件源](/mirrors.html)
- ### [使用方法](/use/main.html)
- ### 使用方法 - ### [常见问题](/help.html)
- ### [其它脚本](/other.html)
```bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)
```
- #### 注意事项
1. 完整复制上面的命令到终端按回车键即可执行,若无法安装 `curl` 软件包可复制源码到本地后通过 `bash` 手动执行
2. 为了适配所有环境,需要使用 `Root` 用户执行脚本,切换命令为 `su root`,如遇报错请查看常见问题与帮助
3. 如果您使用的环境没有安装或不支持简体中文环境,请通过 `SSH客户端工具` 使用,否则将无法正确选择交互内容
4. 执行脚本过程中会自动备份原有源无需手动备份,期间会在终端输出多个主观选择交互内容,可按回车键快速确定
5. 脚本支持在原有源配置错误或者不存在的情况下使用,并且可以重复使用;脚本变更的软件源默认使用 `HTTP` 协议
</br>
> __未启用的软件源__
> _Debian 系 Linux 默认禁用了源码仓库和预发布软件源,若需启用请将 `/etc/apt/sources.list` 文件中相关内容的所在行取消注释_
> _RedHat/openEuler 系 Linux 部分仓库默认没有启用,若需启用请将 `/etc/yum.repos.d` 目录下相关 repo 文件中的 `enabled` 值修改为 `1`_
> _openSUSE 系 Linux 部分仓库默认没有启用,若需启用请将 `/etc/zypp/repos.d` 目录下相关 repo 文件中的 `enabled` 值修改为 `1`_
- #### 软件源
| | 镜像站名称 | 镜像站地址 | IPv6 | Kali | Rocky | Fedora | openEuler | openSUSE | EPEL |
| :---: | :---------------: | :------------------------------------------------------------------: | :--: | :--: | :---: | :----: | :-------: | :------: | :--: |
| 1 | 阿里云 | [mirrors.aliyun.com](https://mirrors.aliyun.com) | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ |
| 2 | 腾讯云 | [mirrors.tencent.com](https://mirrors.tencent.com) | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ |
| 3 | 华为云 | [mirrors.huaweicloud.com](https://mirrors.huaweicloud.com) | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ |
| 4 | 网易 | [mirrors.163.com](https://mirrors.163.com) | | | ✓ | ✓ | ✓ | | |
| 5 | 搜狐 | [mirrors.sohu.com](https://mirrors.sohu.com) | | | | ✓ | | ✓ | |
| 6 | 清华大学 | [mirrors.tuna.tsinghua.edu.cn](https://mirrors.tuna.tsinghua.edu.cn) | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ |
| 7 | 北京大学 | [mirrors.pku.edu.cn](https://mirrors.pku.edu.cn/Mirrors) | ✓ | | | | ✓ | ✓ | ✓ |
| 8 | 浙江大学 | [mirrors.zju.edu.cn](https://mirrors.zju.edu.cn) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 9 | 南京大学 | [mirrors.nju.edu.cn](https://mirrors.nju.edu.cn) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 10 | 重庆大学 | [mirrors.cqu.edu.cn](https://mirrors.cqu.edu.cn) | | ✓ | | ✓ | | ✓ | ✓ |
| 11 | 兰州大学 | [mirror.lzu.edu.cn](https://mirror.lzu.edu.cn) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 12 | 上海交通大学 | [mirror.sjtu.edu.cn](https://mirror.sjtu.edu.cn) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 13 | 哈尔滨工业大学 | [mirrors.hit.edu.cn](https://mirrors.hit.edu.cn) | ✓ | ✓ | | | ✓ | ✓ | ✓ |
| 14 | 中国科学技术大学 | [mirrors.ustc.edu.cn](https://mirrors.ustc.edu.cn) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 15 | 中国科学院软件研究所 | [mirror.iscas.ac.cn](https://mirror.iscas.ac.cn) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
以上为脚本默认使用的镜像站,上述所有镜像站均支持 `Debian` `Ubuntu` `CentOS` 软件源,列表根据单位性质、地理位置、名称长度进行排序,与实际速度无关
华北地区建议优先使用 `中科大`、`腾讯云`、`清华大学`,软件源的速度区分刷新速度和下载速度,具体请结合实际地理位置进行选择尝试
如果使用过程中脚本不能正常输出中文内容则可对照此列表使用,顺序与脚本一致,之后一路回车即可
- #### 常见问题与帮助
- 如果提示 `Command 'curl' not found` 则说明当前未安装 `curl` 软件包
```bash
yum install -y curl || apt-get install -y curl
```
- 如果提示 `Command 'wget' not found` 则说明当前未安装 `wget` 软件包
```bash
yum install -y wget || apt-get install -y wget
```
- 如果提示 `bash: /proc/self/fd/11: No such file or directory`,请切换至 `Root` 用户执行
- 如何还原备份?
- Debian 系
```
cp -rvf /etc/apt/sources.list.bak /etc/apt/sources.list
```
- RedHat 系 / openEuler
```
cp -rvf /etc/yum.repos.d.bak /etc/yum.repos.d
```
- openSUSE
```
cp -rvf /etc/zypp/repos.d.bak /etc/zypp/repos.d
```
- #### 脚本执行流程
- └ 选择软件源 `交互`
- └ 检测如果是红帽系Linux选择是否安装/覆盖 EPEL 扩展软件源 `交互`
- └ 选择软件源使用的 WEB 协议 `交互`
- └ 检测 防火墙 和 SELINUX 如果开启并且系统是 RHEL或CentOS 选择是否关闭 `交互`
- └ 备份原有源
- └ 检测如果存在重复的备份文件选择是否覆盖 `交互`
- └ 更换软件源
- └ 选择是否更新软件包 `交互`
- └ 选择是否清理已下载的软件包缓存 `交互`
***
- ### 其它脚本
- `Docker` 一键安装脚本
```bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
```
`Docker CE` Docker Community Edition 镜像仓库,用于下载并安装 Docker 相关软件包
`Docker Hub` Docker Hub 镜像仓库,默认为官方提供的公共库,用于切换下载镜像时的来源仓库,又称镜像加速器
> __注意__
> 脚本集成安装 `Docker Engine`,可手动选择安装版本和下载源,还可手动选择镜像加速器,支持海内外服务器环境和 `ARM`架构处理器环境使用。
*** ***

View File

View File

@@ -1,169 +0,0 @@
![](./img/logo.png)
- #### __GNU/Linux 一键更换系统软件源脚本__ <!-- {docsify-ignore} -->
- #### __本项目旨在为从事计算机相关行业的朋友们提供便利__ <!-- {docsify-ignore} -->
## :fa-brands fa-linux: 适配系统
<table>
<tr>
<td rowspan="11"> 支持<br/>版本<br/>
</tr>
<tr>
<td><a href="https://www.debian.org" target="_blank"><img src="./img/icon/debian.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Debian</td>
<td align="center">8.0 ~ 12</td>
</tr>
<tr>
<td><a href="https://cn.ubuntu.com" target="_blank"><img src="./img/icon/ubuntu.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Ubuntu</td>
<td align="center">14.04 ~ 23</td>
</tr>
<tr>
<td><a href="https://www.kali.org" target="_blank"><img src="./img/icon/kali.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Kali Linux</td>
<td align="center">2.0 ~ 2023</td>
</tr>
<tr>
<td><a href="https://access.redhat.com/products/red-hat-enterprise-linux" target="_blank"><img src="./img/icon/redhat.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Red Hat Enterprise Linux</td>
<td align="center">7.0 ~ 8.5</td>
</tr>
<tr>
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="./img/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS</td>
<td align="center">7.0 ~ 8.5</td>
</tr>
<tr>
<td><a href="https://www.centos.org/centos-stream" target="_blank"><img src="./img/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS Stream</td>
<td align="center">8 ~ 9</td>
</tr>
<tr>
<td><a href="https://rockylinux.org" target="_blank"><img src="./img/icon/rocky.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Rocky Linux</td>
<td align="center">8.0 ~ 9</td>
</tr>
<tr>
<td><a href="https://fedoraproject.org/zh-Hans" target="_blank"><img src="./img/icon/fedora.ico" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Fedora</td>
<td align="center">30 ~ 38</td>
</tr>
<tr>
<td><a href="https://www.openeuler.org/zh" target="_blank"><img src="./img/icon/openeuler.ico" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;openEuler</td>
<td align="center">21.03 ~ 23</td>
</tr>
<tr>
<td><a href="https://www.opensuse.org" target="_blank"><img src="./img/icon/opensuse.svg" width="16" height="16" style="vertical-align: -0.25em"/></a>&nbsp;openSUSE</td>
<td align="center">Leep 15 / Tumbleweed</td>
</tr>
</table>
> [!NOTE|label:说明]
> 当前支持上述基于 Debian、RedHat、openEuler、openSUSE 的发行版和及其部分衍生版本(点击列表中的图标可快速前往其官网),理论支持所有架构的环境,不在此支持范围内的操作系统或版本请勿运行本脚本
## <i class="fa-solid fa-wheelchair-move fa-bounce" style=" --fa-bounce-start-scale-x: 1; --fa-bounce-start-scale-y: 1; --fa-bounce-jump-scale-x: 1; --fa-bounce-jump-scale-y: 1; --fa-bounce-land-scale-x: 1; --fa-bounce-land-scale-y: 1; " ></i> 使用方法
```bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)
```
- ### 注意事项
1. 完整复制上面的命令到终端按回车键即可执行,若无法安装 `curl` 软件包可复制源码到本地后通过 `bash` 手动执行
2. 为了适配所有环境,需要使用 `Root` 用户执行脚本,切换命令为 `su root`,如遇报错请查看常见问题与帮助
3. 如果您使用的环境没有安装或不支持简体中文环境,请通过 `SSH客户端工具` 使用,否则将无法正确选择交互内容
4. 执行脚本过程中会自动备份原有源无需手动备份,期间会在终端输出多个主观选择交互内容,可按回车键快速确定
5. 脚本支持在原有源配置错误或者不存在的情况下使用,并且可以重复使用;脚本变更的软件源默认使用 `HTTP` 协议
> [!WARNING|label:未启用的软件源]
> - **Debian** 系 Linux 默认禁用了源码仓库和预发布软件源,若需启用请将 `/etc/apt/sources.list` 文件中相关内容的所在行取消注释
> - **RedHat**/**openEuler** 系 Linux 部分仓库默认没有启用,若需启用请将 `/etc/yum.repos.d` 目录下相关 **repo** 文件中的 `enabled` 值修改为 `1`
> - **openSUSE** 系 Linux 部分仓库默认没有启用,若需启用请将 `/etc/zypp/repos.d` 目录下相关 **repo** 文件中的 `enabled` 值修改为 `1`
- ### <i class="fa-solid fa-list-ol fa-fade" style="--fa-animation-duration: 2s; --fa-fade-opacity: 0.6;" ></i> 软件源
| | 镜像站名称 | 镜像站地址 | IPv6 | Kali | Rocky | Fedora | openEuler | openSUSE | EPEL |
| :---: | :---------------: | :------------------------------------------------------------------: | :--: | :--: | :---: | :----: | :-------: | :------: | :--: |
| 1 | 阿里云 | [mirrors.aliyun.com](https://mirrors.aliyun.com) | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ |
| 2 | 腾讯云 | [mirrors.tencent.com](https://mirrors.tencent.com) | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ |
| 3 | 华为云 | [mirrors.huaweicloud.com](https://mirrors.huaweicloud.com) | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ |
| 4 | 网易 | [mirrors.163.com](https://mirrors.163.com) | | | ✓ | ✓ | ✓ | | |
| 5 | 搜狐 | [mirrors.sohu.com](https://mirrors.sohu.com) | | | | ✓ | | ✓ | |
| 6 | 清华大学 | [mirrors.tuna.tsinghua.edu.cn](https://mirrors.tuna.tsinghua.edu.cn) | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ |
| 7 | 北京大学 | [mirrors.pku.edu.cn](https://mirrors.pku.edu.cn/Mirrors) | ✓ | | | | ✓ | ✓ | ✓ |
| 8 | 浙江大学 | [mirrors.zju.edu.cn](https://mirrors.zju.edu.cn) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 9 | 南京大学 | [mirrors.nju.edu.cn](https://mirrors.nju.edu.cn) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 10 | 重庆大学 | [mirrors.cqu.edu.cn](https://mirrors.cqu.edu.cn) | | ✓ | | ✓ | | ✓ | ✓ |
| 11 | 兰州大学 | [mirror.lzu.edu.cn](https://mirror.lzu.edu.cn) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 12 | 上海交通大学 | [mirror.sjtu.edu.cn](https://mirror.sjtu.edu.cn) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 13 | 哈尔滨工业大学 | [mirrors.hit.edu.cn](https://mirrors.hit.edu.cn) | ✓ | ✓ | | | ✓ | ✓ | ✓ |
| 14 | 中国科学技术大学 | [mirrors.ustc.edu.cn](https://mirrors.ustc.edu.cn) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 15 | 中国科学院软件研究所 | [mirror.iscas.ac.cn](https://mirror.iscas.ac.cn) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
以上为脚本默认使用的镜像站,上述所有镜像站均支持 `Debian` `Ubuntu` `CentOS` 软件源,列表根据单位性质、地理位置、名称长度进行排序,与实际速度无关
华北地区建议优先使用 `中科大``腾讯云``清华大学`,软件源的速度区分刷新速度和下载速度,具体请结合实际地理位置进行选择尝试
> [!TIP]
> 如果使用过程中脚本不能正常输出中文内容则可对照此列表使用,顺序与脚本一致,之后一路回车即可
- ### <i class="fa-regular fa-square-question fa-beat" style="--fa-animation-duration: 2s;"></i> 常见问题
- 如果提示 `Command 'curl' not found` 则说明当前未安装 `curl` 软件包
```bash
yum install -y curl || apt-get install -y curl
```
- 如果提示 `Command 'wget' not found` 则说明当前未安装 `wget` 软件包
```bash
yum install -y wget || apt-get install -y wget
```
- 如果提示 `bash: /proc/self/fd/11: No such file or directory`,请切换至 `Root` 用户执行
- 如何还原备份?
- Debian 系
```
cp -rvf /etc/apt/sources.list.bak /etc/apt/sources.list
```
- RedHat 系 / openEuler
```
cp -rvf /etc/yum.repos.d.bak /etc/yum.repos.d
```
- openSUSE
```
cp -rvf /etc/zypp/repos.d.bak /etc/zypp/repos.d
```
- ### <i class="fa-regular fa-list-tree fa-fade" style="--fa-animation-duration: 2s; --fa-fade-opacity: 0.6;" ></i> 脚本执行流程
- └ 选择软件源 `交互`
- └ 检测如果是 RHEL或CentOS 系统选择是否安装/覆盖 EPEL 扩展软件源 `交互`
- └ 选择软件源使用的 WEB 协议 `交互`
- └ 检测 防火墙 和 SELINUX 如果开启并且系统是 RHEL或CentOS 选择是否关闭 `交互`
- └ 备份原有源
- └ 检测如果存在重复的备份文件选择是否覆盖 `交互`
- └ 更换软件源
- └ 选择是否更新软件包 `交互`
- └ 选择是否清理已下载的软件包缓存 `交互`
## <i class="fa-regular fa-file-circle-plus fa-fade" style="--fa-animation-duration: 2s; --fa-fade-opacity: 0.6;" ></i> 其它脚本
- ### :fa-brands fa-docker: Docker 一键安装脚本 <!-- {docsify-ignore} -->
```bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
```
> [!NOTE|label:定义]
> `Docker CE` Docker Community Edition 镜像仓库,用于下载并安装 Docker 相关软件包。
> `Docker Hub` Docker Hub 镜像仓库,默认为官方提供的公共库,用于切换下载镜像时的来源仓库,又称镜像加速器。
脚本集成安装 `Docker Engine`,可手动选择安装版本、下载源、镜像加速器,支持海内外服务器环境和 `ARM` 架构处理器环境使用
***
项目已设立开源许可协议,传播时请在显著位置标注来源和作者,请尊重作者的知识成果,建议通过命令直接调用脚本
如有意见与建议您可以提交至 [Issues](https://github.com/SuperManito/LinuxMirrors/issues),如果您需要提交您的代码,请前往 GitHub 仓库提交 [Pull Requests](https://github.com/SuperManito/LinuxMirrors/pulls)
***

View File

@@ -1,3 +0,0 @@
# 哎呀,一不小心飞到外太空了
<a><img src="./img/404.gif"></a>

View File

@@ -1,10 +0,0 @@
<img src="./img/logo.png"/>
</br>
</br>
<div style="color: black"><strong>脚本一键更换 Linux 软件源</strong></br><strong>让换源更简单</strong></div>
<a href="https://github.com/SuperManito/LinuxMirrors"><img src="./img/icon/github-1.svg" width="34" height="42"></a>
&nbsp;<a href="https://github.com/SuperManito/LinuxMirrors"><img src="./img/icon/github-2.svg" width="70" height="52"></a>
&nbsp;&nbsp;&nbsp;<a href="https://gitee.com/SuperManito/LinuxMirrors"><img src="./img/icon/gitee.svg" width="100" height="50"/></a>
[开始使用](#-适配系统)

BIN
docs/assets/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 909 B

After

Width:  |  Height:  |  Size: 909 B

View File

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 411 B

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

36
docs/help.md Normal file
View File

@@ -0,0 +1,36 @@
---
hide:
- navigation
---
## 关于报错 Command not found
- 如果提示 `Command 'curl' not found` 则说明当前未安装 `curl` 软件包
``` sh
yum install -y curl || apt-get install -y curl
```
## 还原已备份的软件源
- Debian 系
``` sh
cp -rvf /etc/apt/sources.list.bak /etc/apt/sources.list
```
- RedHat 系 / openEuler
``` sh
cp -rvf /etc/yum.repos.d.bak /etc/yum.repos.d
```
- openSUSE
``` sh
cp -rvf /etc/zypp/repos.d.bak /etc/zypp/repos.d
```
## 其它
- 如果提示 `bash: /proc/self/fd/11: No such file or directory`,请切换至 `Root` 用户执行

Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1 +0,0 @@
<svg width="2500" height="2432" viewBox="0 0 256 249" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet"><g fill="#161614"><path d="M127.505 0C57.095 0 0 57.085 0 127.505c0 56.336 36.534 104.13 87.196 120.99 6.372 1.18 8.712-2.766 8.712-6.134 0-3.04-.119-13.085-.173-23.739-35.473 7.713-42.958-15.044-42.958-15.044-5.8-14.738-14.157-18.656-14.157-18.656-11.568-7.914.872-7.752.872-7.752 12.804.9 19.546 13.14 19.546 13.14 11.372 19.493 29.828 13.857 37.104 10.6 1.144-8.242 4.449-13.866 8.095-17.05-28.32-3.225-58.092-14.158-58.092-63.014 0-13.92 4.981-25.295 13.138-34.224-1.324-3.212-5.688-16.18 1.235-33.743 0 0 10.707-3.427 35.073 13.07 10.17-2.826 21.078-4.242 31.914-4.29 10.836.048 21.752 1.464 31.942 4.29 24.337-16.497 35.029-13.07 35.029-13.07 6.94 17.563 2.574 30.531 1.25 33.743 8.175 8.929 13.122 20.303 13.122 34.224 0 48.972-29.828 59.756-58.22 62.912 4.573 3.957 8.648 11.717 8.648 23.612 0 17.06-.148 30.791-.148 34.991 0 3.393 2.295 7.369 8.759 6.117 50.634-16.879 87.122-64.656 87.122-120.973C255.009 57.085 197.922 0 127.505 0"/><path d="M47.755 181.634c-.28.633-1.278.823-2.185.389-.925-.416-1.445-1.28-1.145-1.916.275-.652 1.273-.834 2.196-.396.927.415 1.455 1.287 1.134 1.923M54.027 187.23c-.608.564-1.797.302-2.604-.589-.834-.889-.99-2.077-.373-2.65.627-.563 1.78-.3 2.616.59.834.899.996 2.08.36 2.65M58.33 194.39c-.782.543-2.06.034-2.849-1.1-.781-1.133-.781-2.493.017-3.038.792-.545 2.05-.055 2.85 1.07.78 1.153.78 2.513-.019 3.069M65.606 202.683c-.699.77-2.187.564-3.277-.488-1.114-1.028-1.425-2.487-.724-3.258.707-.772 2.204-.555 3.302.488 1.107 1.026 1.445 2.496.7 3.258M75.01 205.483c-.307.998-1.741 1.452-3.185 1.028-1.442-.437-2.386-1.607-2.095-2.616.3-1.005 1.74-1.478 3.195-1.024 1.44.435 2.386 1.596 2.086 2.612M85.714 206.67c.036 1.052-1.189 1.924-2.705 1.943-1.525.033-2.758-.818-2.774-1.852 0-1.062 1.197-1.926 2.721-1.951 1.516-.03 2.758.815 2.758 1.86M96.228 206.267c.182 1.026-.872 2.08-2.377 2.36-1.48.27-2.85-.363-3.039-1.38-.184-1.052.89-2.105 2.367-2.378 1.508-.262 2.857.355 3.049 1.398"/></g></svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="2500" height="676" viewBox="-0.122 175.062 480.244 129.875"><g fill="#121110"><path d="M92.375 230.65H52.019a1.887 1.887 0 0 0-1.886 1.886v19.731a1.89 1.89 0 0 0 1.886 1.889h15.743v24.513s-3.535 1.206-13.308 1.206c-11.53 0-27.637-4.214-27.637-39.632 0-35.425 16.772-40.087 32.518-40.087 13.63 0 19.502 2.401 23.238 3.556 1.174.36 2.26-.808 2.26-1.851l4.502-19.063c0-.487-.165-1.075-.721-1.474-1.517-1.082-10.774-6.262-34.16-6.262-26.941 0-54.576 11.463-54.576 66.562 0 55.103 31.64 63.313 58.302 63.313 22.076 0 35.468-9.434 35.468-9.434.552-.306.612-1.077.612-1.431v-61.537c0-1.04-.844-1.885-1.885-1.885M300.354 181.664a1.88 1.88 0 0 0-1.873-1.896h-22.724a1.889 1.889 0 0 0-1.882 1.896l.006 43.913h-35.419v-43.913a1.882 1.882 0 0 0-1.875-1.896h-22.722a1.887 1.887 0 0 0-1.877 1.896v118.904c0 1.048.843 1.901 1.877 1.901h22.722c1.039 0 1.875-.854 1.875-1.901v-50.86h35.419l-.062 50.86c0 1.048.844 1.901 1.883 1.901h22.777c1.041 0 1.873-.854 1.875-1.901V181.664M135.254 197.268c0-8.183-6.56-14.795-14.653-14.795-8.085 0-14.65 6.612-14.65 14.795 0 8.173 6.565 14.802 14.65 14.802 8.093 0 14.653-6.629 14.653-14.802M133.629 275.486V220.6a1.89 1.89 0 0 0-1.88-1.895h-22.651c-1.039 0-1.969 1.072-1.969 2.115v78.634c0 2.312 1.44 2.998 3.304 2.998h20.408c2.239 0 2.788-1.1 2.788-3.034v-23.932M386.71 218.884h-22.549c-1.034 0-1.876.852-1.876 1.901v58.302s-5.729 4.192-13.859 4.192c-8.13 0-10.287-3.689-10.287-11.65v-50.844c0-1.049-.841-1.901-1.875-1.901h-22.886c-1.032 0-1.879.852-1.879 1.901v54.693c0 23.646 13.179 29.431 31.31 29.431 14.873 0 26.864-8.216 26.864-8.216s.571 4.329.829 4.843c.259.512.932 1.029 1.659 1.029l14.56-.064c1.032 0 1.879-.854 1.879-1.898l-.008-79.817c0-1.05-.843-1.902-1.882-1.902M439.445 283.207c-7.821-.238-13.126-3.788-13.126-3.788v-37.653s5.233-3.208 11.654-3.782c8.12-.727 15.944 1.726 15.944 21.095.001 20.426-3.53 24.457-14.472 24.128zm8.894-66.993c-12.807 0-21.518 5.714-21.518 5.714v-40.263c0-1.05-.839-1.897-1.875-1.897h-22.787a1.887 1.887 0 0 0-1.878 1.897v118.903c0 1.048.842 1.901 1.881 1.901h15.811c.711 0 1.25-.367 1.648-1.009.393-.639.96-5.482.96-5.482s9.318 8.83 26.957 8.83c20.708 0 32.584-10.504 32.584-47.154 0-36.651-18.967-41.44-31.783-41.44M198.936 218.695h-17.045l-.026-22.519c0-.852-.439-1.278-1.424-1.278h-23.228c-.903 0-1.388.398-1.388 1.265v23.271s-11.64 2.809-12.427 3.037a1.886 1.886 0 0 0-1.361 1.812v14.623c0 1.052.84 1.898 1.879 1.898h11.909v35.178c0 26.13 18.328 28.697 30.696 28.697 5.651 0 12.411-1.814 13.527-2.228.675-.248 1.067-.947 1.067-1.705l.019-16.086c0-1.05-.886-1.897-1.884-1.897-.993 0-3.534.404-6.15.404-8.372 0-11.209-3.893-11.209-8.932l-.001-33.432h17.046c1.039 0 1.88-.847 1.88-1.898v-18.317a1.884 1.884 0 0 0-1.88-1.893"/></g></svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -1,165 +0,0 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>LinuxMirrors · 让换源更简单</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="css/docsify.css" />
<link rel="icon" type="image/x-icon" href="img/icon/linux.svg" />
</head>
<body>
<div id="app">
<div class="loader">
<div class="inner one"></div>
<div class="inner two"></div>
<div class="inner three"></div>
</div>
<span style="color: white;">正在加载</span>
</div>
<script type="text/javascript" src="themeConfig.js"></script>
<script>
window.$docsify = {
// 文档标题
name: 'LinuxMirrors',
// 右上角仓库icon
repo: 'https://github.com/SuperManito/LinuxMirrors',
// 导航栏logo
logo: '',
// 加载封面
coverpage: true,
// 小屏幕设备自动合并导航栏到侧边栏
mergeNavbar: true,
// 隐藏侧边栏
hideSidebar: true,
// 启用自定义404页
notFoundPage: true,
// 跳转后自动移到顶部
auto2top: true,
// 搜索
search: {
paths: 'auto',
maxAge: 86400000,
placeholder: '在此输入搜索内容',
noData: '找不到结果!',
depth: 6,
hideOtherSidebarContent: false, // 是否隐藏其他侧边栏内容
namespace: 'website',
pathNamespaces: ['/zh-cn'],
pathNamespaces: /^(\/(zh-cn))?(\/(v1|v2))?/
},
// 页面自定义标题
customPageTitle: {
suffix: 'Hellworld', // title suffix.
},
// 页脚内容
footer: {
style: 'text-align: center; font-size: 16px; line-height: 1.5; margin-top: 1.5em; color: var(--sidebarSublinkColor)',
copy: 'Copyright 2021 ~ 2023 <i class="fa-regular fa-copyright"></i><a href="https://github.com/SuperManito" target="_blank"> SuperManito</a></br>',
auth: 'Released under the <a href="https://github.com/SuperManito/LinuxMirrors/blob/main/LICENSE" target="_blank">MIT</a> . Website built with <a href="https://docsify.js.org" target="_blank" rel="noreferrer" rel="noopener">Docsify</a>'
},
// 选项卡
tabs: {
persist: true,
sync: true,
theme: 'classic',
tabComments: true,
tabHeadings: true
},
// 字数统计
count: {
countable: true,
position: 'bottom',
margin: "0",
float: 'right',
fontsize: '1em',
color: 'var(--textColor)',
language: 'chinese',
localization: {
words: "",
minute: ""
},
isExpected: true
},
// 分页导航
pagination: {
previousText: '上一页',
nextText: '下一页',
crossChapter: true,
},
// 灵活警告插件
'flexible-alerts': {
note: {
label: {
'/': '注释'
}
},
tip: {
label: {
'/': '提示'
}
},
warning: {
label: {
'/': '警告'
}
},
attention: {
label: {
'/': '注意'
}
}
},
// 阅读进度条
progress: {
position: "bottom",
color: "var(--themeColor)",
height: "2px",
},
// 主题配置
darklightTheme: themeConfig
}
</script>
<!-- Docsify v4.13 -->
<script type="text/javascript" src="js/docsify.js"></script>
<!-- Font Awesome 图标 -->
<script type="text/javascript" src="js/docsify-fontawesome.js"></script>
<script type="text/javascript" src="js/fontawesome-kit.js"></script>
<!-- 主题 -->
<script type="text/javascript" src="js/docsify-darklightTheme.js"></script>
<!-- 灵活警告 -->
<script type="text/javascript" src="js/docsify-flexible-alerts.js"></script>
<!-- 页脚内容 -->
<script type="text/javascript" src="js/docsify-footer.js"></script>
<!-- 复制按钮 -->
<script type="text/javascript" src="js/docsify-copyButton.js"></script>
<!-- 字数统计 -->
<script type="text/javascript" src="js/docsify-countable.js"></script>
<!-- 阅读进度条 -->
<script type="text/javascript" src="js/docsify-progress.js"></script>
<!-- Emoji表情支持 -->
<script type="text/javascript" src="js/docsify-emoji.js"></script>
<!-- 搜索 -->
<script type="text/javascript" src="js/docsify-search.js"></script>
<!-- 本地离线缓存模式 -->
<script>
if (typeof navigator.serviceWorker !== 'undefined') {navigator.serviceWorker.register('js/docsify-serviceWorker.js')}
</script>
<!-- 代码块高亮 -->
<script type="text/javascript" src="js/prism-bash.min.js"></script>
</body>
</html>

64
docs/index.md Normal file
View File

@@ -0,0 +1,64 @@
---
hide:
- navigation
- toc
---
![](./assets/images/logo.png)
GNU/Linux 一键更换系统软件源脚本
本项目旨在为从事计算机相关行业的朋友们提供便利
## 适配系统及版本号
<table>
<tr>
<td><a href="https://www.debian.org" target="_blank"><img src="./assets/images/icon/debian.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Debian</td>
<td align="center">8.0 ~ 12</td>
</tr>
<tr>
<td><a href="https://cn.ubuntu.com" target="_blank"><img src="./assets/images/icon/ubuntu.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Ubuntu</td>
<td align="center">14.04 ~ 23</td>
</tr>
<tr>
<td><a href="https://www.kali.org" target="_blank"><img src="./assets/images/icon/kali.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Kali Linux</td>
<td align="center">2.0 ~ 2023</td>
</tr>
<tr>
<td><a href="https://access.redhat.com/products/red-hat-enterprise-linux" target="_blank"><img src="./assets/images/icon/redhat.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Red Hat Enterprise Linux</td>
<td align="center">7.0 ~ 8.5</td>
</tr>
<tr>
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="./assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS</td>
<td align="center">7.0 ~ 8.5</td>
</tr>
<tr>
<td><a href="https://www.centos.org/centos-stream" target="_blank"><img src="./assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS Stream</td>
<td align="center">8 ~ 9</td>
</tr>
<tr>
<td><a href="https://rockylinux.org" target="_blank"><img src="./assets/images/icon/rocky.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Rocky Linux</td>
<td align="center">8.0 ~ 9</td>
</tr>
<tr>
<td><a href="https://fedoraproject.org/zh-Hans" target="_blank"><img src="./assets/images/icon/fedora.ico" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Fedora</td>
<td align="center">30 ~ 38</td>
</tr>
<tr>
<td><a href="https://www.openeuler.org/zh" target="_blank"><img src="./assets/images/icon/openeuler.ico" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;openEuler</td>
<td align="center">21.03 ~ 23</td>
</tr>
<tr>
<td><a href="https://www.opensuse.org" target="_blank"><img src="./assets/images/icon/opensuse.svg" width="16" height="16" style="vertical-align: -0.25em"/></a>&nbsp;openSUSE</td>
<td align="center">Leep 15 / Tumbleweed</td>
</tr>
</table>
当前支持上述基于 Debian、RedHat、openEuler、openSUSE 的发行版和及其部分衍生版本(点击列表中的图标可快速前往其官网)
理论支持所有架构的环境,不在此支持范围内的操作系统或版本请勿运行本项目脚本
[开始使用](/use/main.html){ .md-button .md-button--primary } [软件源](/mirrors.html){ .md-button }
项目已设立开源许可协议,传播时请在显著位置标注来源和作者,请尊重作者的知识成果,建议通过命令直接调用脚本
如有意见与建议您可以提交至 [Issues](https://github.com/SuperManito/LinuxMirrors/issues),如果您需要提交您的代码,请前往 GitHub 仓库提交 [Pull Requests](https://github.com/SuperManito/LinuxMirrors/pulls)

View File

@@ -1,9 +0,0 @@
/*!
* docsify-copy-code
* v2.1.1
* https://github.com/jperasmus/docsify-copy-code
* (c) 2017-2020 JP Erasmus <jperasmus11@gmail.com>
* MIT license
*/
!function(){function s(o){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}!function(o,e){void 0===e&&(e={});var t=e.insertAt;if(o&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===t&&n.firstChild?n.insertBefore(c,n.firstChild):n.appendChild(c),c.styleSheet?c.styleSheet.cssText=o:c.appendChild(document.createTextNode(o))}}(".docsify-copy-code-button,.docsify-copy-code-button span{cursor:pointer;transition:all .25s ease}.docsify-copy-code-button{position:absolute;z-index:1;top:1.3em;right:.5em;overflow:visible;padding:.3em .4em;border:0;border-radius:6px;outline:0;font-size:1em;background:transparent;color:var(--themeColor);opacity:0;box-sizing:border-box;border:1px solid transparent}.docsify-copy-code-button:hover{background-color:var(--copyButtonHoverBackgroundColor)}.docsify-copy-code-button:active{border-color:transparent}.docsify-copy-code-button span{border-radius:7px;pointer-events:none}.docsify-copy-code-button .error,.docsify-copy-code-button .success{position:absolute;z-index:-100;top:50%;right:0;padding:.5em .65em;font-size:.825em;opacity:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.docsify-copy-code-button.error .error{right:60%;opacity:1;-webkit-transform:translate(-115%,-50%);color:red;background-color:#a8a8a825;transform:translate(-115%,-50%)}.docsify-copy-code-button.success .success{right:-25%;opacity:1;-webkit-transform:translate(-115%,-50%);color:#00a300;background-color:transparent;transform:translate(-115%,-50%)}.docsify-copy-code-button:focus,pre:hover .docsify-copy-code-button{opacity:1}"),document.querySelector('link[href*="docsify-copy-code"]')&&console.warn("[Deprecation] Link to external docsify-copy-code stylesheet is no longer necessary."),window.DocsifyCopyCodePlugin={init:function(){return function(o,e){o.ready(function(){console.warn("[Deprecation] Manually initializing docsify-copy-code using window.DocsifyCopyCodePlugin.init() is no longer necessary.")})}}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(o,r){o.doneEach(function(){var o=Array.apply(null,document.querySelectorAll("pre[data-lang]")),c={buttonText:'<i class="fa-regular fa-copy"></i>',errorText:'<i class="fa-solid fa-xmark"></i>',successText:'<i class="fa-solid fa-circle-check"></i>'};r.config.copyCode&&Object.keys(c).forEach(function(t){var n=r.config.copyCode[t];"string"==typeof n?c[t]=n:"object"===s(n)&&Object.keys(n).some(function(o){var e=-1<location.href.indexOf(o);return c[t]=e?n[o]:c[t],e})});var e=['<button class="docsify-copy-code-button" title="复制">','<span class="label">'.concat(c.buttonText,"</span>"),'<span class="error">'.concat(c.errorText,"</span>"),'<span class="success">'.concat(c.successText,"</span>"),"</button>"].join("");o.forEach(function(o){o.insertAdjacentHTML("beforeend",e)})}),o.mounted(function(){document.querySelector(".content").addEventListener("click",function(o){if(o.target.classList.contains("docsify-copy-code-button")){var e="BUTTON"===o.target.tagName?o.target:o.target.parentNode,t=document.createRange(),n=e.parentNode.querySelector("code"),c=window.getSelection();t.selectNode(n),c.removeAllRanges(),c.addRange(t);try{document.execCommand("copy")&&(e.classList.add("success"),setTimeout(function(){e.classList.remove("success")},1000))}catch(o){console.error("docsify-copy-code: ".concat(o)),e.classList.add("error"),setTimeout(function(){e.classList.remove("error")},1000)}"function"==typeof(c=window.getSelection()).removeRange?c.removeRange(t):"function"==typeof c.removeAllRanges&&c.removeAllRanges()}})})}].concat(window.$docsify.plugins||[])}();
//# sourceMappingURL=docsify-copy-code.min.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +0,0 @@
/*!
* docsify-plugin-flexible-alerts
* v1.1.0
* https://github.com/fzankl/docsify-plugin-flexible-alerts#readme
* (c) 2020 Fabian Zankl
* MIT license
*/
!function(){"use strict";function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var e;!function(t,e){void 0===e&&(e={});var a,l,o=e.insertAt;t&&"undefined"!=typeof document&&(a=document.head||document.getElementsByTagName("head")[0],(l=document.createElement("style")).type="text/css","top"===o&&a.firstChild?a.insertBefore(l,a.firstChild):a.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t)))}(""),e={style:"callout",note:{label:"Note",icon:"icon-note",className:"note"},tip:{label:"Tip",icon:"icon-tip",className:"tip"},warning:{label:"Warning",icon:"icon-warning",className:"warning"},attention:{label:"Attention",icon:"icon-attention",className:"attention"},typeMappings:{info:"note",danger:"attention"}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[].concat(function(t,f){function p(t,e,a,l){var o=(t||"").match(new RegExp("".concat(e,":(([\\s\\w\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF-]*))")));return o?l?l(o[1]):o[1]:l?l(a):a}var w=function t(e,a,l){var o,r=2<arguments.length&&void 0!==l?l:0;for(o in a)try{a[o].constructor===Object&&r<1?e[o]=t(e[o],a[o],r+1):e[o]=a[o]}catch(t){e[o]=a[o]}return e}(e,f.config["flexible-alerts"]||f.config.flexibleAlerts);t.afterEach(function(t,e){e(t.replace(/<\s*blockquote[^>]*>(?:<p>|[\S\n]*)?\[!(\w*)((?:\|[\w*:[\s\w\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF-]*)*?)\]([\s\S]*?)(?:<\/p>)?<\s*\/\s*blockquote>/g,function(t,e,a,l){!w[e.toLowerCase()]&&w.typeMappings[e.toLowerCase()]&&(e=w.typeMappings[e.toLowerCase()]);var o=w[e.toLowerCase()];if(!o)return t;var r,n=p(a,"style",w.style),i=p(a,"iconVisibility","visible",function(t){return"hidden"!==t}),c=p(a,"labelVisibility","visible",function(t){return"hidden"!==t}),d=p(a,"label",o.label),s=p(a,"icon",o.icon),g=p(a,"className",o.className);"object"===h(d)&&((r=Object.keys(d).filter(function(t){return-1<f.route.path.indexOf(t)}))&&0<r.length?d=d[r[0]]:i=c=!1);var m='<span class="icon '.concat(s,'"></span>'),u='<p class="title">'.concat(i?m:"").concat(c?d:"","</p>");return'<div class="alert '.concat(n," ").concat(g,'">\n ').concat(i||c?u:"","\n <p>").concat(l,"</p>\n </div>")}))})},window.$docsify.plugins)}();
//# sourceMappingURL=docsify-plugin-flexible-alerts.min.js.map

View File

@@ -1 +0,0 @@
!function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(t,o,function(n){return e[n]}.bind(null,o));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="",r(r.s=0)}([function(e,n,r){"use strict";r.r(n),window.$docsify=window.$docsify||{},window.$docsify.plugins=(window.$docsify.plugins||[]).concat((function(e){const n=/:fa[\w -]+:/gm;e.beforeEach(e=>e.replace(n,(function(e,n){return `<i class="${e.replace(/:/gi,"")}"></i>`}))),e.afterEach((function(e,r){r(e.replace(n,(function(e,n){return `<i class="${e.replace(/:/gi,"")}"></i>`})))}))}))}]);

View File

@@ -1 +0,0 @@
!function(o){var e={};function t(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return o[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=o,t.c=e,t.d=function(o,e,n){t.o(o,e)||Object.defineProperty(o,e,{enumerable:!0,get:n})},t.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},t.t=function(o,e){if(1&e&&(o=t(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var r in o)t.d(n,r,function(e){return o[e]}.bind(null,r));return n},t.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(e,"a",e),e},t.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},t.p="",t(t.s=0)}([function(o,e,t){"use strict";t.r(e),window.$docsify=window.$docsify||{},window.$docsify.plugins=(window.$docsify.plugins||[]).concat((function(o,e){e.config.footer;let t=e.config.footer&&e.config.footer.copy?e.config.footer.copy:"<span>&copy; 2019.</span>",n=e.config.footer&&e.config.footer.auth?e.config.footer.auth:'<span>Published with <a href="https://github.com/docsifyjs/docsify" target="_blank" rel="noreferrer" rel="noopener">docsify</a>.</span>',r=e.config.footer&&e.config.footer.style?`style="${e.config.footer.style}"`:"",f=e.config.footer&&e.config.footer.class?`class="${e.config.footer.class}"`:"";var i=`${e.config.footer&&e.config.footer.pre?""+e.config.footer.pre:""}<footer ${r} ${f}>${t} ${n}</footer>`;o.afterEach((function(o){return o+i}))}))}]);

View File

@@ -1,8 +0,0 @@
/**
* Minified by jsDelivr using Terser v5.7.1.
* Original file: /npm/docsify-progress@1.0.3/dist/progress.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
function plugin(o,e){let t;o.mounted((function(){const o=document.getElementsByClassName("content")[0];t=parseFloat(window.getComputedStyle(o).paddingTop.replace("px",""));let e=`\n <div style="position: fixed; width: 100%; z-index: 999; height: ${window.$docsify.progress.height};\n ${"top"===window.$docsify.progress.position?"top: 0;":"bottom: 0;"}">\n <div id="progress-display" style="background-color: ${window.$docsify.progress.color}; width: 0; border-radius: 2px; height: ${window.$docsify.progress.height}; transition: width 0.3s;"></div>\n </div>\n `;const n=document.getElementsByTagName("body")[0];n.innerHTML=n.innerHTML+e;document.querySelector("div.sidebar-toggle-button").addEventListener("click",(function(o){o.stopPropagation(),function(){const o=document.getElementsByTagName("body")[0];o.classList.contains("close")?o.classList.remove("close"):o.classList.add("close")}()}))})),o.ready((function(){window.addEventListener("scroll",(function(o){let e=t+parseFloat(window.getComputedStyle(document.getElementById("main")).height.replace("px","")),n=document.body.scrollTop+document.documentElement.scrollTop,i=e-document.body.offsetHeight;document.getElementById("progress-display").style.width=Math.ceil(n/i*100)+"%"}))}))}window.$docsify.progress=Object.assign({position:"top",color:"var(--themeColor,#42b983)",height:"3px"},window.$docsify.progress),window.$docsify.plugins=[].concat(plugin,window.$docsify.plugins);
//# sourceMappingURL=/sm/751d64f4b5f0684c3d90329d52ec68d82ee2d95f859eb9ffc311aed273874276.map

File diff suppressed because one or more lines are too long

View File

@@ -1,83 +0,0 @@
/* ===========================================================
* docsify sw.js
* ===========================================================
* Copyright 2016 @huxpro
* Licensed under Apache 2.0
* Register service worker.
* ========================================================== */
const RUNTIME = 'docsify'
const HOSTNAME_WHITELIST = [
self.location.hostname,
'fonts.gstatic.com',
'fonts.googleapis.com',
'cdn.jsdelivr.net'
]
// The Util Function to hack URLs of intercepted requests
const getFixedUrl = (req) => {
var now = Date.now()
var url = new URL(req.url)
// 1. fixed http URL
// Just keep syncing with location.protocol
// fetch(httpURL) belongs to active mixed content.
// And fetch(httpRequest) is not supported yet.
url.protocol = self.location.protocol
// 2. add query for caching-busting.
// Github Pages served with Cache-Control: max-age=600
// max-age on mutable content is error-prone, with SW life of bugs can even extend.
// Until cache mode of Fetch API landed, we have to workaround cache-busting with query string.
// Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190
if (url.hostname === self.location.hostname) {
url.search += (url.search ? '&' : '?') + 'cache-bust=' + now
}
return url.href
}
/**
* @Lifecycle Activate
* New one activated when old isnt being used.
*
* waitUntil(): activating ====> activated
*/
self.addEventListener('activate', event => {
event.waitUntil(self.clients.claim())
})
/**
* @Functional Fetch
* All network requests are being intercepted here.
*
* void respondWith(Promise<Response> r)
*/
self.addEventListener('fetch', event => {
// Skip some of cross-origin requests, like those for Google Analytics.
if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) {
// Stale-while-revalidate
// similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale
// Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1
const cached = caches.match(event.request)
const fixedUrl = getFixedUrl(event.request)
const fetched = fetch(fixedUrl, { cache: 'no-store' })
const fetchedCopy = fetched.then(resp => resp.clone())
// Call respondWith() with whatever we get first.
// If the fetch fails (e.g disconnected), wait for the cache.
// If theres nothing in cache, wait for the fetch.
// If neither yields a response, return offline pages.
event.respondWith(
Promise.race([fetched.catch(_ => cached), cached])
.then(resp => resp || fetched)
.catch(_ => { /* eat any errors */ })
)
// Update the cache with the version we fetched (only for ok status)
event.waitUntil(
Promise.all([fetchedCopy, caches.open(RUNTIME)])
.then(([response, cache]) => response.ok && cache.put(event.request, response))
.catch(_ => { /* eat any errors */ })
)
}
})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

71
docs/mirrors.md Normal file
View File

@@ -0,0 +1,71 @@
---
hide:
- navigation
- toc
---
## 国内地区
| | 镜像站名称 | 镜像站地址 | IPv6 | Kali | Rocky | Fedora | openEuler | openSUSE | EPEL |
| :---: | :---------------: | :------------------------------------------------------------------: | :--: | :--: | :---: | :----: | :-------: | :------: | :--: |
| 1 | 阿里云 | [mirrors.aliyun.com](https://mirrors.aliyun.com) | :material-check: | :material-check: | :material-circle-off-outline: | :material-check: | :material-check: | :material-check: | :material-check: |
| 2 | 腾讯云 | [mirrors.tencent.com](https://mirrors.tencent.com) | :material-close: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: |
| 3 | 华为云 | [mirrors.huaweicloud.com](https://mirrors.huaweicloud.com) | :material-close: | :material-check: | :material-circle-off-outline: | :material-check: | :material-check: | :material-check: | :material-check: |
| 4 | 网易 | [mirrors.163.com](https://mirrors.163.com) | :material-close: | :material-close: | :material-check: | :material-check: | :material-check: | :material-circle-off-outline: | :material-close: |
| 5 | 搜狐 | [mirrors.sohu.com](https://mirrors.sohu.com) | :material-close: | :material-close: | :material-circle-off-outline: | :material-check: | :material-close: | :material-check: | :material-close: |
| 6 | 清华大学 | [mirrors.tuna.tsinghua.edu.cn](https://mirrors.tuna.tsinghua.edu.cn) | :material-check: | :material-check: | :material-close: | :material-check: | :material-check: | :material-check: | :material-check: |
| 7 | 北京大学 | [mirrors.pku.edu.cn](https://mirrors.pku.edu.cn/Mirrors) | :material-check: | :material-close: | :material-close: | :material-close: | :material-check: | :material-check: | :material-check: |
| 8 | 浙江大学 | [mirrors.zju.edu.cn](https://mirrors.zju.edu.cn) | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: |
| 9 | 南京大学 | [mirrors.nju.edu.cn](https://mirrors.nju.edu.cn) | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: |
| 10 | 重庆大学 | [mirrors.cqu.edu.cn](https://mirrors.cqu.edu.cn) | :material-check: | :material-check: | :material-circle-off-outline: | :material-check: | :material-close: | :material-check: | :material-check: |
| 11 | 兰州大学 | [mirror.lzu.edu.cn](https://mirror.lzu.edu.cn) | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: |
| 12 | 上海交通大学 | [mirror.sjtu.edu.cn](https://mirror.sjtu.edu.cn) | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: |
| 13 | 哈尔滨工业大学 | [mirrors.hit.edu.cn](https://mirrors.hit.edu.cn) | :material-check: | :material-check: | :material-close: | :material-check: | :material-check: | :material-check: | :material-check: |
| 14 | 中国科学技术大学 | [mirrors.ustc.edu.cn](https://mirrors.ustc.edu.cn) | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: |
| 15 | 中国科学院软件研究所 | [mirror.iscas.ac.cn](https://mirror.iscas.ac.cn) | :material-close: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: |
上述所有镜像站均支持 `Debian` `Ubuntu` `CentOS` 软件源,列表根据单位性质、地理位置、名称长度进行排序,与实际速度无关
华北地区建议优先使用 `中科大``腾讯云``清华大学`,软件源的速度区分刷新速度和下载速度,具体请结合实际地理位置选择尝试
!!! question "使用帮助"
:material-check: 支持 &nbsp;&nbsp; :material-close: 不支持 &nbsp;&nbsp; :material-circle-off-outline: 表示软件源分支命名不符合脚本默认规则,但可以使用命令参数来使用
如果使用过程中脚本不能正常输出中文内容则可对照此列表使用,顺序与脚本一致,之后一路回车即可
## 海外地区
| 镜像站名称 | 镜像站地址 |
| :- | :-: |
| 亚洲 · 科盈电信 [香港] | mirror.hkt.cc |
| 亚洲 · xTom [香港] | mirrors.xtom.hk |
| 亚洲 · 自由软件实验室(NCHC) [台湾] | free.nchc.org.tw |
| 亚洲 · AniGil Linux Archive [韩国] | mirror.anigil.com |
| 亚洲 · 工业网络安全卓越中心(ICSCoE) [日本] | ftp.udx.icscoe.jp/Linux |
| 亚洲 · 北陆先端科学技术大学院(JAIST) [日本] | ftp.jaist.ac.jp/pub/Linux |
| 亚洲 · xTom [日本] | mirrors.xtom.jp |
| 亚洲 · GB Network Solutions [马来西亚] | mirrors.gbnetwork.com |
| 北美 · Linux Kernel [美国] | mirrors.kernel.org |
| 北美 · 麻省理工学院(MIT) [美国] | mirrors.mit.edu |
| 北美 · 普林斯顿大学数学系 [美国] | mirror.math.princeton.edu/pub |
| 北美 · Fremont Cabal 互联网交换中心 [美国] | mirror.fcix.net |
| 北美 · xTom [美国] | mirrors.xtom.com |
| 北美 · 不列颠哥伦比亚大学 [加拿大] | mirror.it.ubc.ca |
| 南美 · 蓬塔格罗萨州立大学 [巴西] | mirror.uepg.br |
| 欧洲 · Vorboss Ltd [英国] | mirror.vorboss.net |
| 欧洲 · xTom [德国] | mirrors.xtom.de |
| 欧洲 · 亚琛工业大学(RWTH Aachen) [德国] | ftp.halifax.rwth-aachen.de |
| 欧洲 · 德累斯顿大学(AG DSN) [德国] | ftp.agdsn.de |
| 欧洲 · xTom [荷兰] | mirrors.xtom.nl |
| 欧洲 · DataPacket [荷兰] | mirror.datapacket.com |
| 欧洲 · xTom [爱沙尼亚] | mirrors.xtom.ee |
| 欧洲 · Dotsrc [丹麦] | mirrors.dotsrc.org |
| 欧洲 · ia64 [俄罗斯] | mirror.linux-ia64.org |
| 欧洲 · Truenetwork [俄罗斯] | mirror.truenetwork.ru |
| 欧洲 · Belgian Research Network [比利时] | ftp.belnet.be/mirror |
| 欧洲 · 克里特大学计算机中心 [希腊] | ftp.cc.uoc.gr/mirrors/linux |
| 澳洲 · Fremont Cabal 互联网交换中心 [澳大利亚] | gsl-syd.mm.fcix.net |
| 澳洲 · xTom [澳大利亚] | mirrors.xtom.au |
| 澳洲 · Free Software Mirror Group [新西兰] | mirror.fsmg.org.nz |
该列表参考自 [Ubutnu 镜像列表](https://launchpad.net/ubuntu/+cdmirrors),如果你想补充更多软件源请修改脚本内的 [`mirror_list_abroad 数组变量`](https://github.com/SuperManito/LinuxMirrors/blame/main/ChangeMirrors.sh#L27) 并按照规则进行添加,在确认软件源地址无误后前往 GitHub 仓库提交 [Pull Requests](https://github.com/SuperManito/LinuxMirrors/pulls)

17
docs/other.md Normal file
View File

@@ -0,0 +1,17 @@
---
hide:
- navigation
- toc
---
## :fontawesome-brands-docker: Docker 一键安装脚本
``` bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
```
!!! node "定义"
`Docker CE` 软件镜像仓库,全称 Docker Community Edition ,用于下载并安装 Docker 相关软件包。
`Docker Hub` 容器镜像仓库,默认为官方提供的公共库,用于控制下载镜像的来源存储仓库,又称镜像加速器。
脚本集成安装 `Docker Engine`,可手动选择安装版本、下载源、镜像加速器,支持海内外服务器环境和 `arm` 架构处理器环境使用

View File

@@ -0,0 +1,7 @@
:root {
--md-code-font: 'SF Mono';
}
@font-face {
font-family: 'SF Mono';
src: url('./fonts/SF-Mono-Regular.otf');
}

View File

@@ -1,169 +0,0 @@
const themeConfig = {
// 字体
siteFont: '"-apple-system, "BlinkMacSystemFont", "SF Pro Display", "SF Pro", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, "sans-serif"',
// 代码块块字体
codeFont: "SF-Mono",
// 文字大小
bodyFontSize: "17px",
// 默认主题配置
defaultTheme: "light",
// 浅色主题配置
light: {
// 主题(颜色)
themeColor: "#42b883",
// 背景(颜色)
backgroundColor: "#ffffff",
// 侧边栏标题字符(颜色)
sidebarSublinkColor: "#5c5454",
// 标题字符(颜色)
titleColor: "#1a1a1f",
// 一般字符(颜色)
textColor: "#1a1a1f",
// 粗体字符(颜色)
textStrongColor: "#1a1a1f",
// 注释内容(颜色)
blockQuoteColor: "#1a1a1f",
// 强调字符(颜色)
highlightColor: "#d22778",
// 强调字符背景(颜色)
highlightBackgroundColor: "#f6f7f8",
// 强调字符在强调提示样式中的背景(颜色)
highlightTipBackgroundColor: "#efefef",
// 强调字符在普通提示样式中的背景(颜色)
highlightWarnBackgroundColor: "#efefef",
// 代码块块背景(颜色)
codeBackgroundColor: "#f6f8fa",
// 代码块块一般字符(颜色)
codeTextColor: "#1a1a1f",
// 代码块块类型字符(颜色)
codeTypeColor: "#1a1a1f",
// 代码块关键字(颜色)
codeKeywordColor: "#e96900",
// 代码块函数字符(颜色)
codeFunctionColor: "#3389e1",
// 代码块数字字符(颜色)
codeNumberColor: "#8d90e8",
// 代码块字符串(颜色)
codeStringColor: "#84d115",
// 代码块复制按钮悬浮效果背景(颜色)
copyButtonHoverBackgroundColor: "rgb(188 188 191 / 22%)",
// 边框(颜色)
borderColor: "rgb(239, 239, 245)",
// 表格边框(颜色)
tableBorderColor: "#cccccc",
// 表格标题背景(颜色)
tableTheadBackgroundColor: "rgba(0,0,0,.03)",
// 光标悬浮效果背景(颜色)
hoverBackgroundColor: "rgb(243, 243, 245)",
// 折叠块背景(颜色)
summaryBackgroundColor: "#e7f7e8",
// 超链接光标悬浮(颜色)
herfHoverColor: "#148b55",
// 分割线(颜色)
hrColor: "#afafaf",
// 灵活警告插件样式(颜色)
alertNoteBackgroundColor: "#eef9fd",
alertTipBackgroundColor: "#e6f6e6",
alertWarningBackgroundColor: "#fff8e6",
alertAttentionBackgroundColor: "#ffebec",
// 封面背景(样式)
coverBackground: "linear-gradient(to top, #fff1eb 0%, #ace0f9 100%)",
// 渐变文字背景(样式)
gradientTextColor: "-webkit-linear-gradient(315deg,#42d392 25%,#647eff)",
// 切换主题按钮(图标)
themeIcon: 'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0yOC4wNTI3IDQuNDEwODVDMjIuNTgyOCA1LjgzNjk1IDE4LjU0NTUgMTAuODEwNiAxOC41NDU1IDE2LjcyNzNDMTguNTQ1NSAyMy43NTY0IDI0LjI0MzYgMjkuNDU0NSAzMS4yNzI3IDI5LjQ1NDVDMzcuMTg5NCAyOS40NTQ1IDQyLjE2MzEgMjUuNDE3MiA0My41ODkxIDE5Ljk0NzNDNDMuODU4NSAyMS4yNTYgNDQgMjIuNjExNSA0NCAyNEM0NCAzNS4wNDU3IDM1LjA0NTcgNDQgMjQgNDRDMTIuOTU0MyA0NCA0IDM1LjA0NTcgNCAyNEM0IDEyLjk1NDMgMTIuOTU0MyA0IDI0IDRDMjUuMzg4NSA0IDI2Ljc0N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ZnPg==")',
// 展开菜单按钮(图标)
expandMenuIcon: 'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04IDEwLjVINDAiIHN0cm9rZT0iIzQyYjg4MyIgc3Ryb2tlLXdpZHRoPSIzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMjQgMTkuNUg0MCIgc3Ryb2tlPSIjNDJiODgzIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0yNCAyOC41SDQwIiBzdHJva2U9IiM0MmI4ODMiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTggMzcuNUg0MCIgc3Ryb2tlPSIjNDJiODgzIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0xNiAxOUw4IDI0TDE2IDI5VjE5WiIgZmlsbD0iIzQyYjg4MyIgc3Ryb2tlPSIjNDJiODgzIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=")',
},
// 深色主题配置
dark: {
// 主题(颜色)
themeColor: "#4894df",
// 背景(颜色)
backgroundColor: "#1b1b1d",
// 侧边栏标题字符(颜色)
sidebarSublinkColor: "#b4b4b4",
// 标题字符(颜色)
titleColor: "#e3e3e3",
// 一般字符(颜色)
textColor: "#e3e3e3",
// 粗体字符(颜色)
textStrongColor: "#e3e3e3",
// 注释内容(颜色)
blockQuoteColor: "#e3e3e3",
// 强调字符(颜色)
highlightColor: "#c792ea",
// 强调字符背景(颜色)
highlightBackgroundColor: "hsla(0,0%,100%,.1)",
// 强调字符在强调提示样式中的背景(颜色)
highlightTipBackgroundColor: "hsl(0deg 0% 41% / 10%)",
// 强调字符在普通提示样式中的背景(颜色)
highlightWarnBackgroundColor: "#36423a",
// 代码块块背景(颜色)
codeBackgroundColor: "#212121",
// 代码块一般字符(颜色)
codeTextColor: "#d4d4d4",
// 代码块块类型字符(颜色)
codeTypeColor: "#d4d4d4",
// 代码块关键字(颜色)
codeKeywordColor: "#89ddff",
// 代码块函数字符(颜色)
codeFunctionColor: "#ffcb6b",
// 代码块数字字符(颜色)
codeNumberColor: "#c3e88d",
// 代码块字符串(颜色)
codeStringColor: "#5987cb",
// 代码块块复制按钮悬浮效果背景(颜色)
copyButtonHoverBackgroundColor: "#8d8d8d1f",
// 边框(颜色)
borderColor: "rgba(255, 255, 255, 0.09)",
// 表格边框(颜色)
tableBorderColor: "#606770",
// 表格标题背景(颜色)
tableTheadBackgroundColor: "hsla(0,0%,100%,.07)",
// 光标悬浮效果背景(颜色)
hoverBackgroundColor: "#8d8d8d1f",
// 折叠块背景(颜色)
summaryBackgroundColor: "#1d364c",
// 超链接光标悬浮(颜色)
herfHoverColor: "#196fbf",
// 分割线(颜色)
hrColor: "#464646",
// 灵活警告插件样式(颜色)
alertNoteBackgroundColor: "#193c47",
alertTipBackgroundColor: "#003100",
alertWarningBackgroundColor: "#4d3800",
alertAttentionBackgroundColor: "#4b1113",
// 封面背景(样式)
coverBackground: "linear-gradient(to top, #fff1eb 0%, #ace0f9 100%)",
// 渐变文字背景(样式)
gradientTextColor: "linear-gradient(90deg,#7209d4,#2832d4 33%,#00a5b2)",
// 切换主题按钮(图标)
themeIcon: 'url("data:image/svg+xml;base64,PD94bW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',
// 收起菜单按钮(图标)
collapseMenuIcon: 'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04IDEwLjVINDAiIHN0cm9rZT0iIzQ4OTRkZiIgc3Ryb2tlLXdpZHRoPSIzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMjQgMTkuNUg0MCIgc3Ryb2tlPSIjNDg5NGRmIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0yNCAyOC41SDQwIiBzdHJva2U9IiM0ODk0ZGYiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTggMzcuNUg0MCIgc3Ryb2tlPSIjNDg5NGRmIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik04IDE5TDE2IDI0TDggMjlWMTlaIiBmaWxsPSIjNDg5NGRmIiBzdHJva2U9IiM0ODk0ZGYiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==")',
// 展开菜单按钮(图标)
expandMenuIcon: 'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04IDEwLjVINDAiIHN0cm9rZT0iIzQ4OTRkZiIgc3Ryb2tlLXdpZHRoPSIzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMjQgMTkuNUg0MCIgc3Ryb2tlPSIjNDg5NGRmIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0yNCAyOC41SDQwIiBzdHJva2U9IiM0ODk0ZGYiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTggMzcuNUg0MCIgc3Ryb2tlPSIjNDg5NGRmIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0xNiAxOUw4IDI0TDE2IDI5VjE5WiIgZmlsbD0iIzQ4OTRkZiIgc3Ryb2tlPSIjNDg5NGRmIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=")',
},
// 灵活警告插件样式
alertNoteBorderColor: "#4cb3d4",
alertNoteHighlightBackgroundColor: "rgba(84,199,236,0.15)",
alertNoteIcon: 'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53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PSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==")',
alertWarningBorderColor: "#e6a700",
alertWarningHighlightBackgroundColor: "rgba(255,186,0,0.15)",
alertWarningIcon: 'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0yNCA0QzE2LjI2OCA0IDEwIDEwLjI2OCAxMCAxOFYzOEgzOFYxOEMzOCAxMC4yNjggMzEuNzMyIDQgMjQgNFoiIGZpbGw9IiNlNmE3MDAiLz48cGF0aCBkPSJNMTAgMzhWMThDMTAgMTAuMjY4IDE2LjI2OCA0IDI0IDRDMzEuNzMyIDQgMzggMTAuMjY4IDM4IDE4VjM4TTQgMzhINDQiIHN0cm9rZT0iI2U2YTcwMCIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMjQgNDRDMjYuNzYxNCA0NCAyOSA0MS43NjE0IDI5IDM5VjM4SDE5VjM5QzE5IDQxLjc2MTQgMjEuMjM4NiA0NCAyNCA0NFoiIGZpbGw9IiNlNmE3MDAiIHN0cm9rZT0iI2U2YTcwMCIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=")',
alertAttentionBorderColor: "#e13238",
alertAttentionHighlightBackgroundColor: "rgba(250,56,62,0.15)",
alertAttentionIcon: 'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjQgNUwyIDQzSDQ2TDI0IDVaIiBmaWxsPSIjZTEzMjM4IiBzdHJva2U9IiNlMTMyMzgiIHN0cm9rZS13aWR0aD0iNCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0yNCAzNVYzNiIgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9IjQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjxwYXRoIGQ9Ik0yNCAxOS4wMDA1TDI0LjAwODMgMjkiIHN0cm9rZT0iI0ZGRiIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48L3N2Zz4=")',
};

100
docs/use/command-options.md Normal file
View File

@@ -0,0 +1,100 @@
| 名称 | 含义 | 选项值 |
| :-: | :-: | :-: |
| `--source` | 指定软件源地址 | 地址 |
| `--branch` | 指定软件源分支 | 分支名 |
| `--abroad` | 使用海外软件源 | 无 |
| `--web-protocol` | 指定 WEB 协议 | http 或 https |
| `--intranet` | 使用内网地址 | true 或 false |
| `--install-epel` | 安装 EPEL 附加软件包 | true 或 false |
| `--close-firewall` | 关闭防火墙 | true 或 false |
| `--backup` | 备份原有软件源 | true 或 false |
| `--ignore-backup-tips` | 忽略覆盖备份提示 | 无 |
| `--updata-software` | 更新软件包 | true 或 false |
| `--clean-cache` | 清理下载缓存 | true 或 false |
## 示例
### 指定软件源地址
若不想通过交互选择默认提供的软件源,你可以使用该命令选项指定软件源地址
``` bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)
```
### 指定软件源分支
使用场景:目标软件源有对应系统镜像但是不符合本脚本关于软件源分支设置的默认规则
本脚本为了适配大环境不会针对某一镜像站独特的镜像分支名称而单独定制,最开始是为了更换国内软件源而设计适配的,默认使用的分支名称如下
<table>
<tr>
<td><a href="https://www.debian.org" target="_blank"><img src="../assets/images/icon/debian.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Debian</td>
<td align="center">debian</td>
</tr>
<tr>
<td><a href="https://cn.ubuntu.com" target="_blank"><img src="../assets/images/icon/ubuntu.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Ubuntu</td>
<td align="center">ubuntu</td>
</tr>
<tr>
<td><a href="https://www.kali.org" target="_blank"><img src="../assets/images/icon/kali.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Kali Linux</td>
<td align="center">kali</td>
</tr>
<tr>
<td><a href="https://access.redhat.com/products/red-hat-enterprise-linux" target="_blank"><img src="../assets/images/icon/redhat.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Red Hat Enterprise Linux</td>
<td align="center">centos</td>
</tr>
<tr>
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="../assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS</td>
<td align="center">centos</td>
</tr>
<tr>
<td><a href="https://www.centos.org/centos-stream" target="_blank"><img src="../assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS Stream</td>
<td align="center">centos-stream</td>
</tr>
<tr>
<td><a href="https://rockylinux.org" target="_blank"><img src="../assets/images/icon/rocky.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Rocky Linux</td>
<td align="center">rocky</td>
</tr>
<tr>
<td><a href="https://fedoraproject.org/zh-Hans" target="_blank"><img src="../assets/images/icon/fedora.ico" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Fedora</td>
<td align="center">fedora</td>
</tr>
<tr>
<td><a href="https://www.openeuler.org/zh" target="_blank"><img src="../assets/images/icon/openeuler.ico" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;openEuler</td>
<td align="center">openeuler</td>
</tr>
<tr>
<td><a href="https://www.opensuse.org" target="_blank"><img src="../assets/images/icon/opensuse.svg" width="16" height="16" style="vertical-align: -0.25em"/></a>&nbsp;openSUSE</td>
<td align="center">opensuse</td>
</tr>
</table>
请看下面的例子
``` sh title="使用阿里云的 Rocky Linux 软件源" linenums="1"
bash ChangeMirrors.sh \
--source mirrors.aliyun.com \
--branch rockylinux
```
阿里云镜像站的 Rocky Linux 镜像分支名称为 [`rockylinux`](https://mirrors.aliyun.com/rockylinux),不符合默认规则,但是可以通过命令选项绕过脚本默认规则来实现
## 无人值守
不通过交互完成换源操作,需要使用大量命令选项来实现,建议熟悉后再使用
``` sh title="参考命令" linenums="1"
bash ChangeMirrors.sh \
--source <软件源域名> \
--web-protocol <http/https> \
--intranet false \
--install-epel true \
--close-firewall true \
--backup true \
--updata-software false \
--clean-cache false \
--ignore-backup-tips
```

View File

@@ -0,0 +1,10 @@
- 选择软件源 `交互`
- 检测到存在对应内网地址选择是否切换 `交互`
- 选择软件源使用的 WEB 协议 `交互`
- 检测如果是 RHEL/CentOS/Rocky 系统选择是否安装/覆盖 EPEL 扩展包软件源 `交互`
- 检测防火墙和SELINUX如果开启选择是否关闭 `交互`
- 备份原有源
- 检测如果存在重复的备份文件选择是否覆盖 `交互`
- 更换软件源
- 选择是否更新软件包 `交互`
- 选择是否清理已下载的软件包缓存 `交互`

21
docs/use/main.md Normal file
View File

@@ -0,0 +1,21 @@
## 主要命令
=== "国内使用(默认)"
``` bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)
```
=== "海外使用"
``` bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --abroad
```
## 注意事项
- 完整复制上面的命令到终端按回车键即可执行,若无法安装 `curl` 软件包可复制源码到本地后通过 `bash` 手动执行
- 为了适配所有环境,需要使用 `Root` 用户执行脚本,切换命令为 `su root`,如遇报错请查看常见问题与帮助
- 如果您使用的环境没有安装或不支持简体中文环境,请通过 `SSH客户端工具` 使用,否则将无法正确选择交互内容
- 执行脚本过程中会自动备份原有源无需手动备份,期间会在终端输出多个主观选择交互内容,可按回车键快速确定
- 脚本支持在原有源配置错误或者不存在的情况下使用,并且可以重复使用;脚本变更的软件源默认使用 `HTTP` 协议

22
docs/use/not-enabled.md Normal file
View File

@@ -0,0 +1,22 @@
=== "Debian"
默认禁用了源码仓库和预发布软件源,若需启用请将 `/etc/apt/sources.list` 文件中相关内容的所在行取消注释
`Debian`
`Ubuntu`
`Kali`
=== "RedHat/openEuler"
部分仓库默认没有启用,若需启用请将 `/etc/yum.repos.d` 目录下相关 repo 文件中的 `enabled` 值修改为 `1`
`Red Hat Enterprise Linux`
`CentOS`
`Rocky Linux`
`Fedora`
`openEuler`
=== "openSUSE"
部分仓库默认没有启用,若需启用请将 `/etc/zypp/repos.d` 目录下相关 repo 文件中的 `enabled` 值修改为 `1`

121
mkdocs.yml Normal file
View File

@@ -0,0 +1,121 @@
site_name: LinuxMirrors
repo_name: 主要托管仓库
repo_url: https://github.com/SuperManito/LinuxMirrors
edit_uri: edit/main/docs/
copyright: Copyright &copy; 2021 - 2023 <a href="https://github.com/SuperManito" target="_blank"> SuperManito</a>
theme:
name: material
language: zh
favicon: assets/favicon.ico
icon:
logo: material/linux
edit: material/file-document-edit-outline
view: material/file-eye-outline
admonition:
note: octicons/tag-16
abstract: octicons/checklist-16
info: octicons/info-16
tip: octicons/squirrel-16
success: octicons/check-16
question: octicons/question-16
warning: octicons/alert-16
failure: octicons/x-circle-16
danger: octicons/zap-16
bug: octicons/bug-16
example: octicons/beaker-16
quote: octicons/quote-16
palette:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- header.autohide
- navigation.tabs
- navigation.expand
- navigation.path
- navigation.instant
- navigation.indexes
- navigation.footer
- navigation.tracking
- navigation.sections
- content.tooltips
- content.code.copy
- content.code.annotate
- content.tabs.link
- search.suggest
- search.highlight
- announce.dismiss
extra:
generator: false
homepage: https://supermanito.github.io/LinuxMirrors
social:
- icon: fontawesome/brands/github
link: https://github.com/SuperManito/LinuxMirrors
extra_css:
- stylesheets/extra.css
markdown_extensions:
- toc:
permalink: '#'
permalink_title: 复制链接
slugify: !!python/object/apply:pymdownx.slugs.slugify
kwds:
case: lower
- abbr
- tables
- def_list
- attr_list
- footnotes
- md_in_html
- admonition
- pymdownx.details
- pymdownx.betterem
- pymdownx.snippets
- pymdownx.inlinehilite
- pymdownx.superfences
- pymdownx.critic
- pymdownx.caret
- pymdownx.keys
- pymdownx.mark
- pymdownx.tilde
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.highlight:
anchor_linenums: true
use_pygments: true
- pymdownx.tabbed:
alternate_style: true
slugify: !!python/object/apply:pymdownx.slugs.slugify
kwds:
case: lower
- pymdownx.tasklist:
custom_checkbox: true
plugins:
- search:
lang: en
separator: '[\s\-,:!=\[\]()"/]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;'
- tags
- glightbox
- offline
nav:
- '介绍': index.md
- '软件源': mirrors.md
- '使用方法':
- '主要命令': use/main.md
- '执行流程': use/execution-flow.md
- '未启用源': use/not-enabled.md
- '高级用法':
- '命令选项': use/command-options.md
- '常见问题': help.md
- '其它脚本': other.md