mirror of
				https://gitee.com/SuperManito/LinuxMirrors
				synced 2025-11-04 16:30:26 +08:00 
			
		
		
		
	适配近期结束生命周期的操作系统版本
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
## Author: SuperManito
 | 
					## Author: SuperManito
 | 
				
			||||||
## Modified: 2024-06-20
 | 
					## Modified: 2024-07-15
 | 
				
			||||||
## License: MIT
 | 
					## License: MIT
 | 
				
			||||||
## GitHub: https://github.com/SuperManito/LinuxMirrors
 | 
					## GitHub: https://github.com/SuperManito/LinuxMirrors
 | 
				
			||||||
## Website: https://linuxmirrors.cn
 | 
					## Website: https://linuxmirrors.cn
 | 
				
			||||||
@@ -372,14 +372,21 @@ function EnvJudgment() {
 | 
				
			|||||||
        case "${SYSTEM_JUDGMENT}" in
 | 
					        case "${SYSTEM_JUDGMENT}" in
 | 
				
			||||||
        "${SYSTEM_DEBIAN}")
 | 
					        "${SYSTEM_DEBIAN}")
 | 
				
			||||||
            case ${SYSTEM_VERSION_NUMBER:0:1} in
 | 
					            case ${SYSTEM_VERSION_NUMBER:0:1} in
 | 
				
			||||||
            8 | 9)
 | 
					            8 | 9 | 10)
 | 
				
			||||||
                SOURCE_BRANCH="debian-archive"
 | 
					                SOURCE_BRANCH="debian-archive" # EOF
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
            *)
 | 
					            *)
 | 
				
			||||||
                SOURCE_BRANCH="debian"
 | 
					                SOURCE_BRANCH="debian"
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
            esac
 | 
					            esac
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
 | 
					        "${SYSTEM_UBUNTU}")
 | 
				
			||||||
 | 
					            if [[ "${DEVICE_ARCH}" == "x86_64" ]] || [[ "${DEVICE_ARCH}" == *i?86* ]]; then
 | 
				
			||||||
 | 
					                SOURCE_BRANCH="ubuntu"
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					                SOURCE_BRANCH="ubuntu-ports"
 | 
				
			||||||
 | 
					            fi
 | 
				
			||||||
 | 
					            ;;
 | 
				
			||||||
        "${SYSTEM_RHEL}")
 | 
					        "${SYSTEM_RHEL}")
 | 
				
			||||||
            case ${SYSTEM_VERSION_NUMBER:0:1} in
 | 
					            case ${SYSTEM_VERSION_NUMBER:0:1} in
 | 
				
			||||||
            9)
 | 
					            9)
 | 
				
			||||||
@@ -392,7 +399,7 @@ function EnvJudgment() {
 | 
				
			|||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        "${SYSTEM_CENTOS}")
 | 
					        "${SYSTEM_CENTOS}")
 | 
				
			||||||
            if [[ "${DEVICE_ARCH}" == "x86_64" ]]; then
 | 
					            if [[ "${DEVICE_ARCH}" == "x86_64" ]]; then
 | 
				
			||||||
                SOURCE_BRANCH="centos"
 | 
					                SOURCE_BRANCH="centos-vault" # EOF
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
                SOURCE_BRANCH="centos-altarch"
 | 
					                SOURCE_BRANCH="centos-altarch"
 | 
				
			||||||
            fi
 | 
					            fi
 | 
				
			||||||
@@ -411,13 +418,6 @@ function EnvJudgment() {
 | 
				
			|||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
            esac
 | 
					            esac
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        "${SYSTEM_UBUNTU}")
 | 
					 | 
				
			||||||
            if [[ "${DEVICE_ARCH}" == "x86_64" ]] || [[ "${DEVICE_ARCH}" == *i?86* ]]; then
 | 
					 | 
				
			||||||
                SOURCE_BRANCH="ubuntu"
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                SOURCE_BRANCH="ubuntu-ports"
 | 
					 | 
				
			||||||
            fi
 | 
					 | 
				
			||||||
            ;;
 | 
					 | 
				
			||||||
        "${SYSTEM_ARCH}")
 | 
					        "${SYSTEM_ARCH}")
 | 
				
			||||||
            if [[ "${DEVICE_ARCH}" == "x86_64" ]] || [[ "${DEVICE_ARCH}" == *i?86* ]]; then
 | 
					            if [[ "${DEVICE_ARCH}" == "x86_64" ]] || [[ "${DEVICE_ARCH}" == *i?86* ]]; then
 | 
				
			||||||
                SOURCE_BRANCH="archlinux"
 | 
					                SOURCE_BRANCH="archlinux"
 | 
				
			||||||
@@ -1363,18 +1363,20 @@ function RedHatMirrors() {
 | 
				
			|||||||
        "${SYSTEM_CENTOS}")
 | 
					        "${SYSTEM_CENTOS}")
 | 
				
			||||||
            sed -i "s|^#baseurl=http|baseurl=${WEB_PROTOCOL}|g" CentOS-*
 | 
					            sed -i "s|^#baseurl=http|baseurl=${WEB_PROTOCOL}|g" CentOS-*
 | 
				
			||||||
            sed -i 's|^mirrorlist=|#mirrorlist=|g' CentOS-*
 | 
					            sed -i 's|^mirrorlist=|#mirrorlist=|g' CentOS-*
 | 
				
			||||||
 | 
					            ## CentOS 7/8 操作系统版本结束了生命周期(EOL),Linux 社区已不再维护该操作系统版本
 | 
				
			||||||
            case ${SYSTEM_VERSION_NUMBER:0:1} in
 | 
					            case ${SYSTEM_VERSION_NUMBER:0:1} in
 | 
				
			||||||
            8)
 | 
					            8)
 | 
				
			||||||
                ## CentOS 8 操作系统版本结束了生命周期(EOL),Linux 社区已不再维护该操作系统版本,最终版本为 8.5.2011
 | 
					                # 最终版本为 8.5.2011,从 2022-02 开始切换至 centos-vault 分支
 | 
				
			||||||
                # 原 centos 镜像中的 CentOS 8 相关内容已被官方移动,从 2022-02 开始切换至 centos-vault 源
 | 
					                sed -i "s|mirror.centos.org/\$contentdir|mirror.centos.org/${SOURCE_BRANCH:-"centos-vault"}|g" CentOS-*
 | 
				
			||||||
                sed -i "s|mirror.centos.org/\$contentdir|mirror.centos.org/centos-vault|g" CentOS-*
 | 
					 | 
				
			||||||
                sed -i "s/\$releasever/8.5.2111/g" CentOS-*
 | 
					                sed -i "s/\$releasever/8.5.2111/g" CentOS-*
 | 
				
			||||||
                # 单独处理 CentOS-Linux-Sources.repo
 | 
					                # 单独处理 CentOS-Linux-Sources.repo
 | 
				
			||||||
                sed -i "s|vault.centos.org/\$contentdir|${SOURCE_VAULT:-"${SOURCE}"}/${SOURCE_BRANCH_VAULT:-"centos-vault"}|g" CentOS-Linux-Sources.repo
 | 
					                sed -i "s|vault.centos.org/\$contentdir|${SOURCE_VAULT:-"${SOURCE}"}/${SOURCE_BRANCH_VAULT:-"centos-vault"}|g" CentOS-Linux-Sources.repo
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
            7)
 | 
					            7)
 | 
				
			||||||
                sed -i "s|mirror.centos.org/\$contentdir|mirror.centos.org/${SOURCE_BRANCH}|g" CentOS-*
 | 
					                # 最终版本为 7.9.2009,从 2024-07 开始切换至 centos-vault 分支
 | 
				
			||||||
                sed -i "s|vault.centos.org/centos|${SOURCE_VAULT:-"${SOURCE}"}/${SOURCE_BRANCH_VAULT:-"${SOURCE_BRANCH}"}|g" CentOS-Sources.repo # 单独处理 CentOS-Sources.repo
 | 
					                sed -i "s|mirror.centos.org/centos|mirror.centos.org/${SOURCE_BRANCH:-"centos-vault"}|g" CentOS-*
 | 
				
			||||||
 | 
					                sed -i "s/\$releasever/7.9.2009/g" CentOS-*
 | 
				
			||||||
 | 
					                sed -i "s|vault.centos.org/centos|${SOURCE_VAULT:-"${SOURCE}"}/${SOURCE_BRANCH_VAULT:-"centos-vault"}|g" CentOS-Sources.repo # 单独处理 CentOS-Sources.repo
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
            esac
 | 
					            esac
 | 
				
			||||||
            sed -i "s|mirror.centos.org|${SOURCE}|g" CentOS-*
 | 
					            sed -i "s|mirror.centos.org|${SOURCE}|g" CentOS-*
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,7 +33,7 @@ hide:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    如果这里没有想使用的镜像站那可以看看其它运行模式和命令选项。软件源的速度区分刷新速度和下行速率,后者才是关键,具体请结合实际地理位置选择尝试,还可以通过[辅助工具网站](#工具网站)进行一些测试
 | 
					    如果这里没有想使用的镜像站那可以看看其它运行模式和命令选项。软件源的速度区分刷新速度和下行速率,后者才是关键,具体请结合实际地理位置选择尝试,还可以通过[辅助工具网站](#工具网站)进行一些测试
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    :material-thumb-up-outline: 使用建议:速度上推荐 `中科大`、`字节跳动(火山引擎)`,地域兼容性上推荐 `腾讯云`、`阿里云`,海外或复杂网络环境下不建议使用 `清华(TUNA)` `浙江大学` 等容易阻断的镜像站,这有违自由软件的初衷
 | 
					    :material-thumb-up-outline: 使用建议:速度上推荐 `中科大`、`字节跳动(火山引擎)`,地域兼容性上推荐 `腾讯云`、`阿里云`,海外或复杂网络环境下不建议使用 `清华(TUNA)` `浙江大学` 等容易阻断的镜像站
 | 
				
			||||||
 | 
					
 | 
				
			||||||
??? note "中国大陆教育网软件源列表"
 | 
					??? note "中国大陆教育网软件源列表"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,7 +44,7 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
 | 
				
			|||||||
<div class="annotate" markdown>
 | 
					<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://www.debian.org" target="_blank"><img src="/assets/images/icon/debian.svg" width="16" height="16" style="vertical-align: -0.45em"></a> Debian | debian / debian-archive |
 | 
				
			||||||
| <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 |
 | 
					| <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 |
 | 
				
			||||||
| <a href="https://www.kali.org" target="_blank"><img src="/assets/images/icon/kali-linux.svg" width="16" height="16"></a> Kali Linux | kali |
 | 
					| <a href="https://www.kali.org" target="_blank"><img src="/assets/images/icon/kali-linux.svg" width="16" height="16"></a> Kali Linux | kali |
 | 
				
			||||||
| <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 | deepin |
 | 
					| <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 | deepin |
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,3 @@
 | 
				
			|||||||
mkdocs-material==9.5.27
 | 
					mkdocs-material==9.5.29
 | 
				
			||||||
mkdocs-glightbox==0.4.0
 | 
					mkdocs-glightbox==0.4.0
 | 
				
			||||||
mkdocs-exclude-search==0.6.6
 | 
					mkdocs-exclude-search==0.6.6
 | 
				
			||||||
		Reference in New Issue
	
	Block a user