更新文档

This commit is contained in:
SuperManito
2024-06-07 04:17:31 +08:00
parent 2ad20bc512
commit 0da6eb5b4b
9 changed files with 54 additions and 30 deletions

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2023 SuperManito
Copyright (c) 2024 SuperManito
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -24,7 +24,7 @@
</tr>
<tr>
<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 ~ 24</td>
</tr>
<tr>
<td><a href="https://www.kali.org" target="_blank"><img src="./docs/assets/images/icon/kali-linux.svg" width="16" height="16" style="vertical-align: -0.15em"></a>&nbsp;Kali Linux</td>

View File

@@ -1,5 +1,5 @@
---
title: LinuxMirrors · 换源更简单
title: LinuxMirrors · 使换源更简单
comments: true
glightbox: false
hide:
@@ -24,21 +24,21 @@ hide:
---
考察了国内镜像站的系统适配情况测试了下载速度与IPv6协议的兼容性
另外提供全网收集的中国大陆教育网镜像站海外镜像站供选择
另外提供全网收集的中国大陆教育网镜像站海外镜像站供选择
- :material-rocket-launch-outline:{ .lg .middle } __低技术成本__
---
无需掌握相关技术,文档提供了全面的相关知识储备操作指引
提供了一些常见问题的解决方法
无需掌握相关技术,文档提供了全面的相关知识储备操作指引
提供了一些常见问题的解决方法
- :octicons-command-palette-24:{ .lg .middle } __脚本一键运行__
---
脚本换源更简单,默认通过交互进行更换,根据用户选择自动配置
并且提供了强大的命令选项,可用于自动化项目实现无交互操作
脚本使换源变得更简单,通过交互默认进行更换,根据用户选择自动配置
同时,提供了强大的命令选项,可用于自动化项目实现无交互操作
- :material-scale-balance:{ .lg .middle } __开源MIT__
@@ -59,7 +59,7 @@ hide:
| 系统名称 | 适配版本 |
| --- | :---: |
| <a href="https://www.debian.org" target="_blank"><img src="/assets/images/icon/debian.svg" width="16" height="16" style="vertical-align: -0.45em"></a> Debian | 8.0 ~ 13 |
| <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> Ubuntu :material-information-outline:{ title="支持乌班图家族衍生操作系统,例如 <code>优麒麟</code> <code>Kubuntu</code> 等" } | 14.04 ~ 23 |
| <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> Ubuntu :material-information-outline:{ title="支持乌班图家族衍生操作系统,例如 <code>优麒麟</code> <code>Kubuntu</code><br/>此外由于迭代速度较快并不直接支持所有非长期支持(LTS)的版本,具体详见使用文档中的高级用法" } | 14.04 ~ 24 |
| <a href="https://www.kali.org" target="_blank"><img src="/assets/images/icon/kali-linux.svg" width="16" height="16"></a> Kali Linux | 2.0 ~ 2024 |
| <a href="https://www.deepin.org" target="_blank"><img src="/assets/images/icon/deepin.svg" width="16" height="16" style="vertical-align: -0.25em"></a> Deepin | all |
| <a href="https://www.armbian.com" target="_blank"><img src="/assets/images/icon/armbian.png" width="16" height="16" style="vertical-align: -0.2em"></a> Armbian | all |

View File

@@ -30,11 +30,11 @@ hide:
???+ question "使用帮助"
:supported: 支持 &nbsp;&nbsp; :unsupport: 不支持 &nbsp;&nbsp; :incompatible: 不兼容,表示软件源分支命名不符合脚本默认规则但可以通过命令参数来使用,关于具体用法示例和各操作系统所使用的默认分支名称[详见此处](../use/command-options.md#%E6%8C%87%E5%AE%9A%E8%BD%AF%E4%BB%B6%E6%BA%90%E5%88%86%E6%94%AF)
:supported: 支持 &nbsp;&nbsp; :unsupport: 不支持 &nbsp;&nbsp; :incompatible: 不兼容,表示软件源分支命名不符合脚本默认规则但可以通过命令参数来使用,关于具体用法示例和各操作系统所使用的默认分支名称[详见此处](../use/command-options.md#指定软件源分支)
如果这里没有想使用的镜像站那可以看看其它运行模式和命令选项。软件源的速度区分刷新速度和下行速率,后者才是关键,具体请结合实际地理位置选择尝试,还可以通过[辅助工具网站](#工具网站)进行一些测试
:material-thumb-up-outline: 使用建议:速度上推荐 `中科大``字节跳动(火山引擎)`,地域兼容性上推荐 `腾讯云``阿里云`,复杂网络环境下不建议使用容易阻断的镜像站例如 `清华(TUNA)` `浙江大学`,这有违自由软件的初衷
:material-thumb-up-outline: 使用建议:速度上推荐 `中科大``字节跳动(火山引擎)`,地域兼容性上推荐 `腾讯云``阿里云`海外网络环境或复杂网络环境下不建议使用 `清华(TUNA)` `浙江大学` 等容易阻断的镜像站,这有违自由软件的初衷
??? note "国内教育网软件源列表"
@@ -245,9 +245,9 @@ hide:
???+ note "帮助本项目完善更多海外软件源"
该列表中的软件源参考自 [`Ubuntu 镜像列表`](https://launchpad.net/ubuntu/+cdmirrors "https://launchpad.net/ubuntu/+cdmirrors")、[`Debian 镜像列表`](https://www.debian.org/CD/http-ftp/#mirrors "https://www.debian.org/CD/http-ftp/#mirrors")、[`Fedora Mirror Manager`](https://admin.fedoraproject.org/mirrormanager/mirrors "https://admin.fedoraproject.org/mirrormanager/mirrors") 并且全部经过了有效性验证,但未作实际测试
该列表中的软件源参考自 [`Ubuntu 镜像列表`](https://launchpad.net/ubuntu/+cdmirrors "https://launchpad.net/ubuntu/+cdmirrors")、[`Debian 镜像列表`](https://www.debian.org/CD/http-ftp/#mirrors "https://www.debian.org/CD/http-ftp/#mirrors")、[`Fedora Mirror Manager`](https://admin.fedoraproject.org/mirrormanager/mirrors "https://admin.fedoraproject.org/mirrormanager/mirrors") 并且在此之前全部经过了有效性验证,但未作实际测试
如果你想补充更多海外软件源或更正当前已有,请修改脚本内的 [`mirror_list_abroad 数组变量`](https://github.com/SuperManito/LinuxMirrors/blame/main/ChangeMirrors.sh#L28 "https://github.com/SuperManito/LinuxMirrors/blame/main/ChangeMirrors.sh#L28") 并按照下面的编辑规范进行修改
作者没有精力持续维护列表中的这些海外镜像站,如果你想补充更多海外软件源或更正当前已有,请修改脚本内的 [`mirror_list_abroad 数组变量`](https://github.com/SuperManito/LinuxMirrors/blame/main/ChangeMirrors.sh#L28 "https://github.com/SuperManito/LinuxMirrors/blame/main/ChangeMirrors.sh#L28") 并按照下面的编辑规范进行修改
你可以在确认软件源地址无误后前往 GitHub 仓库提交 [Pull Requests](https://github.com/SuperManito/LinuxMirrors/pulls "https://github.com/SuperManito/LinuxMirrors/pulls"),也可以 :material-source-fork: Fork 仓库后自行定制使用

View File

@@ -14,7 +14,8 @@
data-lang="zh-CN"
data-loading="lazy"
crossorigin="anonymous"
async>
async
>
</script>
<!-- Synchronize Giscus theme with palette -->

View File

@@ -42,7 +42,7 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
项目脚本为了适配大的环境不会针对某一镜像站独特的镜像分支名称而单独适配,默认使用的分支名称如下
<div class="annotate" markdown>
| 系统名称 | 版本代号 |
| 系统名称 | 涉及的分支名称 |
| --- | :---: |
| <a href="https://www.debian.org" target="_blank"><img src="/assets/images/icon/debian.svg" width="16" height="16" style="vertical-align: -0.45em"></a> Debian | debian |
| <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> Ubuntu | ubuntu / ubuntu-ports |
@@ -64,7 +64,7 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
请看下面的例子
``` { .bash .no-copy title="使用阿里云的 Rocky Linux 软件源" }
``` { .bash title="使用阿里云的 Rocky Linux 软件源" }
bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
--source mirrors.aliyun.com \
--branch rockylinux
@@ -76,7 +76,9 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
### 单独更换 EPEL 源
有些时候你会发现想使用的镜像站没有 epel 镜像仓库,那么你可以在第一次运行脚本时不安装或不更换 epel 源然后再单独执行下面的命令
!!! info "EPEL (Extra Packages for Enterprise Linux) 是由 Fedora 组织维护的一个附加软件包仓库,它主要适用于除 Fedora 操作系统以外的红帽系 Linux 发行版,配置 EPEL 仓库已成为广大用户的普遍需求,建议默认安装它"
有些时候你会发现想使用的镜像站没有 epel 镜像仓库,那么你可以在第一次运行脚本时不安装或更换 epel 源然后再单独执行下面的命令
``` bash
bash <(curl -sSL https://linuxmirrors.cn/main.sh) --only-epel
@@ -89,6 +91,7 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) --only-epel
``` bash
bash <(curl -sSL https://linuxmirrors.cn/main.sh) --use-official-source
```
> 部分系统不存在官方源例如 `Arch Linux`,届时会自动更换成兼容性较高的阿里云镜像站
### 自定义 Debian Security 源
@@ -100,18 +103,23 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
--branch-security debian-security
```
### 指定 Debian 系 Linux 版本代号
### 指定 Debian 系 Linux 操作系统的版本代号
大多数情况下自定义版本代号用于更换系统版本,请看下面的例子
``` { .bash title="升级 Debian 至最新 12 版本 Bookworm" }
bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
--codename bookworm
```
``` { .bash title="将 Debian 版本切换到测试分支" }
bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
--codename testing
```
=== "升级 Debian 至最新 12 版本 Bookworm"
``` bash
bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
--codename bookworm
```
=== "将 Debian 版本切换到测试分支"
``` bash
bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
--codename testing
```
更换软件源后还需要执行系统更新命令 `apt-get dist-upgrade`,并且建议在更新完成并重启系统后重新执行本换源脚本,因为仅更换软件源配置中的系统版本代号可能会在后期使用时产生一些兼容性问题
@@ -119,6 +127,18 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
sed -i "s/$(lsb_release -cs)/指定版本代号/g" /etc/apt/sources.list
```
### 更换 Ubuntu EOF版本软件源
!!! info "EOF 为生命周期结束的缩写End Of LifeUbuntu 迭代速度较快一般非长期支持(LTS)版本的生命周期只有9个月。官方会定期从主仓库移除不在生命周期内的版本仓库目录届时可能就需要使用镜像站的 `Ubuntu Old Releases` 分支"
具体版本支持情况详见官方 [Wiki](https://wiki.ubuntu.com/Releases),关于 `Ubuntu Old Releases` 分支的支持情况详见各镜像站
``` bash
bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
--source mirrors.ustc.edu.cn \
--branch ubuntu-old-releases
```
## 无人值守
不通过交互完成换源操作,需要使用大量命令选项来实现,建议熟悉后再使用

View File

@@ -95,13 +95,13 @@ hide:
---
如果你使用的系统终端界面不支持 `UTF-8` 编码那么将无法正常显示中文内容,导致无法正确选择交互内容。大部分系统都会自动开启该服务,否则请参考[启用方法](help.md#%E5%85%B3%E4%BA%8E%E5%BC%80%E5%90%AF-ssh-%E8%BF%9C%E7%A8%8B%E7%99%BB%E5%BD%95%E7%9A%84%E6%96%B9%E6%B3%95)
如果你使用的系统终端界面不支持 `UTF-8` 编码那么将无法正常显示中文内容,导致无法正确选择交互内容。大部分系统都会自动开启该服务,否则请参考[启用方法](help.md#关于开启-ssh-远程登录的方法)
- :material-numeric-3:{style="color: #3CA7E5" .lg} __如果是在新系统上首次执行脚本__
---
当前执行方式依赖 `curl` 指令来获取脚本内容并执行,所以需要先通过包管理工具来安装该软件包,否则会报错 `Command not found`,安装方法详见[常见问题](help.md#%E5%85%B3%E4%BA%8E%E6%8A%A5%E9%94%99-command-not-found),若无法安装就复制[源码](https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)到本地新建`.sh`脚本,然后通过 `bash` 手动执行
当前执行方式依赖 `curl` 指令来获取脚本内容并执行,所以需要先通过包管理工具来安装该软件包,否则会报错 `Command not found`,安装方法详见[常见问题](help.md#关于报错-command-not-found),若无法安装就复制[源码](https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)到本地新建`.sh`脚本,然后通过 `bash` 手动执行
</div>

3
giscus.json Normal file
View File

@@ -0,0 +1,3 @@
{
"defaultCommentOrder": "newest"
}

View File

@@ -1,3 +1,3 @@
mkdocs-material==9.5.17
mkdocs-glightbox==0.3.5
mkdocs-material==9.5.26
mkdocs-glightbox==0.4.0
mkdocs-exclude-search==0.6.6