更换 CentOS 源为 centos-vault

This commit is contained in:
Super Manito
2022-02-16 17:52:16 +08:00
parent 4bd2ccee8d
commit f413832a85
6 changed files with 26 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
## Author: SuperManito ## Author: SuperManito
## Modified: 2022-02-07 ## Modified: 2022-02-16
## License: GPL-2.0 ## License: GPL-2.0
## Github: https://github.com/SuperManito/LinuxMirrors ## Github: https://github.com/SuperManito/LinuxMirrors
## Gitee: https://gitee.com/SuperManito/LinuxMirrors ## Gitee: https://gitee.com/SuperManito/LinuxMirrors
@@ -16,7 +16,8 @@ function AuthorSignature() {
echo -e '\033[0;1;35;95m│\033[0m \033[0;1;34;94m/\033[0;1;35;95m_/\033[0m \033[0;1;35;95m│\033[0m' echo -e '\033[0;1;35;95m│\033[0m \033[0;1;34;94m/\033[0;1;35;95m_/\033[0m \033[0;1;35;95m│\033[0m'
echo -e '\033[0;1;31;91m└─\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m─┘\033[0m\n' echo -e '\033[0;1;31;91m└─\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m─┘\033[0m\n'
echo -e " \033[1;34mGithub\033[0m - https://github.com/SuperManito/LinuxMirrors" echo -e " \033[1;34m官方网站\033[0m https://supermanito.github.io/LinuxMirrors\n"
echo -e " \033[1;34mGitHub\033[0m - https://github.com/SuperManito/LinuxMirrors"
echo -e " \033[1;34mGitee\033[0m - https://gitee.com/SuperManito/LinuxMirrors\n" echo -e " \033[1;34mGitee\033[0m - https://gitee.com/SuperManito/LinuxMirrors\n"
} }
@@ -417,12 +418,19 @@ function RedHatMirrors() {
## 修改源 ## 修改源
if [ ${SYSTEM_JUDGMENT} = ${SYSTEM_CENTOS} -o ${SYSTEM_JUDGMENT} = ${SYSTEM_RHEL} ]; then if [ ${SYSTEM_JUDGMENT} = ${SYSTEM_CENTOS} -o ${SYSTEM_JUDGMENT} = ${SYSTEM_RHEL} ]; then
sed -i 's|^mirrorlist=|#mirrorlist=|g' $RedHatReposDir/${SYSTEM_CENTOS}-* sed -i 's|^mirrorlist=|#mirrorlist=|g' $RedHatReposDir/${SYSTEM_CENTOS}-*
[ ${CENTOS_VERSION} -eq "8" ] && sed -i 's|^#baseurl=http://mirror.centos.org/$contentdir|baseurl=http://mirror.centos.org/centos|g' $RedHatReposDir/${SYSTEM_CENTOS}-* ## CentOS 8 操作系统版本结束了生命周期EOLLinux 社区已不再维护该操作系统版本,最终版本为 8.5.2011
## 原 centos 镜像已被官方移动,从 2022-02 开始切换至 centos-vault 源
[ ${CENTOS_VERSION} -eq "8" ] && sed -i 's|^#baseurl=http://mirror.centos.org/$contentdir|baseurl=http://mirror.centos.org/centos-vault|g' $RedHatReposDir/${SYSTEM_CENTOS}-*
sed -i "s|^#baseurl=http|baseurl=${WEB_PROTOCOL}|g" $RedHatReposDir/${SYSTEM_CENTOS}-* sed -i "s|^#baseurl=http|baseurl=${WEB_PROTOCOL}|g" $RedHatReposDir/${SYSTEM_CENTOS}-*
## 更换软件源
sed -i "s|mirror.centos.org|${SOURCE}|g" $RedHatReposDir/${SYSTEM_CENTOS}-* sed -i "s|mirror.centos.org|${SOURCE}|g" $RedHatReposDir/${SYSTEM_CENTOS}-*
## Red Hat Enterprise Linux 修改版本号 ## 修改版本号
[ ${SYSTEM_JUDGMENT} = ${SYSTEM_RHEL} ] && sed -i "s/\$releasever/${CENTOS_VERSION}/g" ${SYSTEM_CENTOS}-* if [ ${CENTOS_VERSION} -eq "8" ]; then
## 安装/更换基于 CentOS 的 EPEL 扩展国内源 sed -i "s/\$releasever/8.5.2111/g" ${SYSTEM_CENTOS}-*
elif [ ${CENTOS_VERSION} -eq "7" ]; then
sed -i "s/\$releasever/7.9.2009/g" ${SYSTEM_CENTOS}-*
fi
## 安装/更换基于 RHEL/CentOS 的 EPEL 扩展国内源
[ ${EPEL_INSTALL} = "True" ] && EPELMirrors [ ${EPEL_INSTALL} = "True" ] && EPELMirrors
elif [ ${SYSTEM_JUDGMENT} = ${SYSTEM_FEDORA} ]; then elif [ ${SYSTEM_JUDGMENT} = ${SYSTEM_FEDORA} ]; then
sed -i 's|^metalink=|#metalink=|g' \ sed -i 's|^metalink=|#metalink=|g' \

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
## Author: SuperManito ## Author: SuperManito
## Modified: 2022-02-07 ## Modified: 2022-02-16
## License: GPL-2.0 ## License: GPL-2.0
## Github: https://github.com/SuperManito/LinuxMirrors ## Github: https://github.com/SuperManito/LinuxMirrors
## Gitee: https://gitee.com/SuperManito/LinuxMirrors ## Gitee: https://gitee.com/SuperManito/LinuxMirrors
@@ -16,7 +16,8 @@ function AuthorSignature() {
echo -e '\033[0;1;35;95m│\033[0m \033[0;1;34;94m/\033[0;1;35;95m_/\033[0m \033[0;1;35;95m│\033[0m' echo -e '\033[0;1;35;95m│\033[0m \033[0;1;34;94m/\033[0;1;35;95m_/\033[0m \033[0;1;35;95m│\033[0m'
echo -e '\033[0;1;31;91m└─\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m─┘\033[0m\n' echo -e '\033[0;1;31;91m└─\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m──\033[0;1;33;93m──\033[0;1;32;92m──\033[0;1;36;96m──\033[0;1;34;94m──\033[0;1;35;95m──\033[0;1;31;91m─┘\033[0m\n'
echo -e " \033[1;34mGithub\033[0m - https://github.com/SuperManito/LinuxMirrors" echo -e " \033[1;34m官方网站\033[0m https://supermanito.github.io/LinuxMirrors\n"
echo -e " \033[1;34mGitHub\033[0m - https://github.com/SuperManito/LinuxMirrors"
echo -e " \033[1;34mGitee\033[0m - https://gitee.com/SuperManito/LinuxMirrors\n" echo -e " \033[1;34mGitee\033[0m - https://gitee.com/SuperManito/LinuxMirrors\n"
} }
@@ -444,7 +445,7 @@ function DockerCompose() {
fi fi
chmod +x $DockerCompose chmod +x $DockerCompose
else else
echo -e '\n[*] 由于本机非 x86 架构,开始通过 pip3 安装 Docker Compose ......\n' echo -e "\n${WORKING} 由于本机非 x86 架构,开始通过 pip3 安装 Docker Compose ...\n"
if [ ${SYSTEM_FACTIONS} = ${SYSTEM_DEBIAN} ]; then if [ ${SYSTEM_FACTIONS} = ${SYSTEM_DEBIAN} ]; then
apt-get install -y python3-pip python3-dev gcc libffi-dev openssl >/dev/null 2>&1 apt-get install -y python3-pip python3-dev gcc libffi-dev openssl >/dev/null 2>&1
elif [ ${SYSTEM_FACTIONS} = ${SYSTEM_REDHAT} ]; then elif [ ${SYSTEM_FACTIONS} = ${SYSTEM_REDHAT} ]; then

View File

@@ -25,7 +25,7 @@
</tr> </tr>
<tr> <tr>
<td><a href="https://www.kali.org"><img src="./docs/img/icon/kali.svg" width="16" height="16"/></a>&nbsp;Kali Linux</td> <td><a href="https://www.kali.org"><img src="./docs/img/icon/kali.svg" width="16" height="16"/></a>&nbsp;Kali Linux</td>
<td align="center">2.0 ~ 2021.4</td> <td align="center">2.0 ~ 2022.1</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://access.redhat.com/products/red-hat-enterprise-linux"><img src="./docs/img/icon/redhat.svg" width="16" height="16"/></a>&nbsp;Red Hat Enterprise Linux</td> <td><a href="https://access.redhat.com/products/red-hat-enterprise-linux"><img src="./docs/img/icon/redhat.svg" width="16" height="16"/></a>&nbsp;Red Hat Enterprise Linux</td>

View File

@@ -18,7 +18,7 @@
</tr> </tr>
<tr> <tr>
<td><a href="https://www.kali.org"><img src="./img/icon/kali.svg" width="16" height="16"/></a>&nbsp;Kali Linux</td> <td><a href="https://www.kali.org"><img src="./img/icon/kali.svg" width="16" height="16"/></a>&nbsp;Kali Linux</td>
<td align="center">2.0 ~ 2021.4</td> <td align="center">2.0 ~ 2022.1</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://access.redhat.com/products/red-hat-enterprise-linux"><img src="./img/icon/redhat.svg" width="16" height="16"/></a>&nbsp;Red Hat Enterprise Linux</td> <td><a href="https://access.redhat.com/products/red-hat-enterprise-linux"><img src="./img/icon/redhat.svg" width="16" height="16"/></a>&nbsp;Red Hat Enterprise Linux</td>

File diff suppressed because one or more lines are too long

View File

@@ -82,9 +82,11 @@
borderColor: 'rgba(0, 0, 0, 0.07)', borderColor: 'rgba(0, 0, 0, 0.07)',
blockQuoteColor: '#858585', blockQuoteColor: '#858585',
highlightColor: '#d22778', highlightColor: '#d22778',
highlightBackgroundColor: '#efefef',
sidebarSublink: '#7c7c7c', sidebarSublink: '#7c7c7c',
codeTypeColor: '#091a28', codeTypeColor: '#091a28',
herfColor: '#2973b7', herfColor: '#2973b7',
hrColor: '#afafaf',
coverBackground: 'linear-gradient(to top, #fff1eb 0%, #ace0f9 100%)', coverBackground: 'linear-gradient(to top, #fff1eb 0%, #ace0f9 100%)',
toogleImage: 'url(https://cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/icons/moon.svg)', toogleImage: 'url(https://cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/icons/moon.svg)',
}, },
@@ -98,9 +100,11 @@
borderColor: '#0f293e', borderColor: '#0f293e',
blockQuoteColor: '#858585', blockQuoteColor: '#858585',
highlightColor: '#a6bb06', highlightColor: '#a6bb06',
highlightBackgroundColor: '#122d44',
sidebarSublink: '#b4b4b4', sidebarSublink: '#b4b4b4',
codeTypeColor: '#ffffff', codeTypeColor: '#ffffff',
herfColor: '#16995e', herfColor: '#16995e',
hrColor: '#464646',
coverBackground: 'linear-gradient(to top, #fff1eb 0%, #ace0f9 100%)', coverBackground: 'linear-gradient(to top, #fff1eb 0%, #ace0f9 100%)',
toogleImage: 'url(https://cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/icons/sun.svg)', toogleImage: 'url(https://cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/icons/sun.svg)',
} }