当前位置: 首页 > news >正文

电子商务网站建设设计佛山快速排名优化

电子商务网站建设设计,佛山快速排名优化,找小网站的关键词,新公司的公司简介怎么写使用方法 - LinuxMirrors 使用方法 一键执行命令# 中国大陆#xff08;默认#xff09; 海外地区 bash (curl -sSL https://linuxmirrors.cn/main.sh)-----------------------------------| ⡇ ⠄ ⣀⡀ ⡀⢀ ⡀⢀ ⡷⢾ ⠄ ⡀⣀ ⡀⣀ ⢀⡀ ⡀⣀ ⢀⣀ || ⠧⠤ ⠇ ⠇⠸ …使用方法 - LinuxMirrors 使用方法 一键执行命令# 中国大陆默认 海外地区 bash (curl -sSL https://linuxmirrors.cn/main.sh)-----------------------------------| ⡇ ⠄ ⣀⡀ ⡀⢀ ⡀⢀ ⡷⢾ ⠄ ⡀⣀ ⡀⣀ ⢀⡀ ⡀⣀ ⢀⣀ || ⠧⠤ ⠇ ⠇⠸ ⠣⠼ ⠜⠣ ⠇⠸ ⠇ ⠏ ⠏ ⠣⠜ ⠏ ⠭⠕ |-----------------------------------欢迎使用 GNU/Linux 更换系统软件源脚本运行环境 CentOS Linux 7 (Core) x86_64系统时间 2024-02-05 03:45:17 America/New_York❖ 阿里云 1)❖ 腾讯云 2)❖ 华为云 3)❖ 网易 4)❖ 搜狐 5)❖ 火山引擎 6)❖ 清华大学 7)❖ 北京大学 8)❖ 浙江大学 9)❖ 南京大学 10)❖ 兰州大学 11)❖ 上海交通大学 12)❖ 重庆邮电大学 13)❖ 中国科学技术大学 14)❖ 中国科学院软件研究所 15)└─ 请选择并输入你想使用的软件源 [ 1-15 ]中国大陆教育网 bash (curl -sSL https://linuxmirrors.cn/main.sh) --edu 海外地区 bash (curl -sSL https://linuxmirrors.cn/main.sh) --abroad 请在使用前检查目标镜像站是否支持您所使用的操作系统 原始执行命令 相关注意事项# 需使用 ROOT 用户执行脚本 切换命令为 sudo -i 或 su root不同系统环境使用的命令不一样因为有些系统没有在初始安装时为 ROOT 用户设置固定密码例如Ubuntu所以需要使用 sudo 指令来提权  建议使用 SSH 远程工具 如果你使用的系统终端界面不支持 UTF-8 编码那么将无法正常显示中文内容导致无法正确选择交互内容。大部分系统都会自动开启该服务否则请参考启用方法  如果是在新系统上首次执行脚本 当前执行方式依赖 curl 指令来获取脚本内容并执行所以需要先通过包管理工具来安装该软件包否则会报错 Command not found安装方法详见常见问题若无法安装就复制源码到本地新建.sh脚本然后通过 bash 手动执行 #!/bin/bash ## Author: SuperManito ## Modified: 2024-02-04 ## License: MIT ## GitHub: https://github.com/SuperManito/LinuxMirrors ## Website: https://linuxmirrors.cn## 软件源列表 # 国内格式软件源名称软件源地址 mirror_list_default(阿里云mirrors.aliyun.com腾讯云mirrors.tencent.com华为云repo.huaweicloud.com网易mirrors.163.com搜狐mirrors.sohu.com火山引擎mirrors.volces.com清华大学mirrors.tuna.tsinghua.edu.cn北京大学mirrors.pku.edu.cn浙江大学mirrors.zju.edu.cn南京大学mirrors.nju.edu.cn兰州大学mirror.lzu.edu.cn上海交通大学mirror.sjtu.edu.cn重庆邮电大学mirrors.cqupt.edu.cn中国科学技术大学mirrors.ustc.edu.cn中国科学院软件研究所mirror.iscas.ac.cn ) # 海外格式洲 · 软件源名称 · 国家/地区软件源地址修改前请先前往官网阅读添加规范 mirror_list_abroad(亚洲 · 科盈电信 · 香港mirror.hkt.cc亚洲 · xTom · 香港mirrors.xtom.hk亚洲 · 01Link · 香港mirror.01link.hk亚洲 · 新加坡国立大学(NUS) · 新加坡download.nus.edu.sg/mirror亚洲 · SG.GS · 新加坡mirror.sg.gs亚洲 · Neo Soon Keat · 新加坡mirror.soonkeat.sg亚洲 · 自由软件实验室(NCHC) · 台湾free.nchc.org.tw亚洲 · OSS Planet · 台湾mirror.ossplanet.net亚洲 · 国立阳明交通大学 · 台湾linux.cs.nctu.edu.tw亚洲 · 淡江大学 · 台湾ftp.tku.edu.tw亚洲 · AniGil Linux Archive · 韩国mirror.anigil.com亚洲 · 工业网络安全中心(ICSCoE) · 日本ftp.udx.icscoe.jp/Linux亚洲 · Internet Initiative Japan(IIJ) · 日本ftp.iij.ad.jp/pub/linux亚洲 · 北陆先端科学技术大学院大学(JAIST) · 日本ftp.jaist.ac.jp/pub/Linux亚洲 · 山形大学 · 日本linux2.yz.yamagata-u.ac.jp/pub/Linux亚洲 · xTom · 日本mirrors.xtom.jp亚洲 · GB Network Solutions · 马来西亚mirrors.gbnetwork.com亚洲 · 孔敬大学 · 泰国mirror.kku.ac.th亚洲 · RISE · 菲律宾mirror.rise.ph欧洲 · Vorboss Ltd · 英国mirror.vorboss.net欧洲 · QuickHost · 英国mirror.quickhost.uk欧洲 · dogado · 德国mirror.dogado.de欧洲 · xTom · 德国mirrors.xtom.de欧洲 · 亚琛工业大学(RWTH Aachen) · 德国ftp.halifax.rwth-aachen.de欧洲 · 德累斯顿大学(AG DSN) · 德国ftp.agdsn.de欧洲 · CCIN2P3 · 法国mirror.in2p3.fr/pub/linux欧洲 · Ircam · 法国mirrors.ircam.fr/pub欧洲 · Crans · 法国eclats.crans.org欧洲 · CRIHAN · 法国ftp.crihan.fr欧洲 · xTom · 荷兰mirrors.xtom.nl欧洲 · DataPacket · 荷兰mirror.datapacket.com欧洲 · Linux Kernel · 荷兰eu.edge.kernel.org欧洲 · xTom · 爱沙尼亚mirrors.xtom.ee欧洲 · netsite · 丹麦mirror.netsite.dk欧洲 · Dotsrc · 丹麦mirrors.dotsrc.org欧洲 · Academic Computer Club · 瑞典mirror.accum.se欧洲 · Lysator · 瑞典ftp.lysator.liu.se欧洲 · Yandex · 俄罗斯mirror.yandex.ru欧洲 · ia64 · 俄罗斯mirror.linux-ia64.org欧洲 · Truenetwork · 俄罗斯mirror.truenetwork.ru欧洲 · Belgian Research Network · 比利时ftp.belnet.be/mirror欧洲 · 克里特大学计算机中心 · 希腊ftp.cc.uoc.gr/mirrors/linux欧洲 · 马萨里克大学信息学院 · 捷克ftp.fi.muni.cz/pub/linux欧洲 · 捷克理工大学学生会俱乐部(Silicon Hill) · 捷克ftp.sh.cvut.cz欧洲 · Vodafone · 捷克mirror.karneval.cz/pub/linux欧洲 · CZ.NIC · 捷克mirrors.nic.cz欧洲 · 苏黎世联邦理工学院 · 瑞士mirror.ethz.ch北美 · Linux Kernel · 美国mirrors.kernel.org北美 · 麻省理工学院(MIT) · 美国mirrors.mit.edu北美 · 普林斯顿大学数学系 · 美国mirror.math.princeton.edu/pub北美 · 俄勒冈州立大学开源实验室 · 美国ftp-chi.osuosl.org/pub北美 · Fremont Cabal Internet Exchange(FCIX) · 美国mirror.fcix.net北美 · xTom · 美国mirrors.xtom.com北美 · Steadfast · 美国mirror.steadfast.net北美 · 不列颠哥伦比亚大学 · 加拿大mirror.it.ubc.ca北美 · GoCodeIT · 加拿大mirror.xenyth.net北美 · Switch · 加拿大mirrors.switch.ca南美 · PoP-SC · 巴西mirror.pop-sc.rnp.br/mirror南美 · 蓬塔格罗萨州立大学 · 巴西mirror.uepg.br南美 · UFSCar · 巴西mirror.ufscar.br南美 · Sysarmy Community · 阿根廷mirrors.eze.sysarmy.com大洋 · Fremont Cabal Internet Exchange(FCIX) · 澳大利亚gsl-syd.mm.fcix.net大洋 · AARNet · 澳大利亚mirror.aarnet.edu.au/pub大洋 · DataMossa · 澳大利亚mirror.datamossa.io大洋 · Amaze · 澳大利亚mirror.amaze.com.au大洋 · xTom · 澳大利亚mirrors.xtom.au大洋 · Over the Wire · 澳大利亚mirror.overthewire.com.au大洋 · Free Software Mirror Group · 新西兰mirror.fsmg.org.nz非洲 · Liquid Telecom · 肯尼亚mirror.liquidtelecom.com非洲 · Dimension Data · 南非mirror.dimensiondata.com ) # 中国大陆教育网格式软件源名称软件源地址 mirror_list_edu(清华大学mirrors.tuna.tsinghua.edu.cn北京大学mirrors.pku.edu.cn南京大学mirrors.nju.edu.cn重庆大学mirrors.cqu.edu.cn兰州大学mirror.lzu.edu.cn浙江大学mirrors.zju.edu.cn山东大学mirrors.sdu.edu.cn吉林大学mirrors.jlu.edu.cn上海交通大学mirror.sjtu.edu.cn上海科技大学mirrors.shanghaitech.edu.cn南方科技大学mirrors.sustech.edu.cn南京邮电大学mirrors.njupt.edu.cn南京工业大学mirrors.njtech.edu.cn电子科技大学mirrors.uestc.cn北京交通大学mirror.bjtu.edu.cn北京邮电大学mirrors.bupt.edu.cn齐鲁工业大学mirrors.qlu.edu.cn华南农业大学mirrors.scau.edu.cn西安交通大学mirrors.xjtu.edu.cn江西理工大学mirrors.jxust.edu.cn重庆邮电大学mirrors.cqupt.edu.cn南阳理工学院mirror.nyist.edu.cn武昌首义学院mirrors.wsyu.edu.cn北京外国语大学mirrors.bfsu.edu.cn中国科学技术大学mirrors.ustc.edu.cn西北农林科技大学mirrors.nwafu.edu.cn大连东软信息学院mirrors.neusoft.edu.cn )## 配置需要区分公网地址和内网地址的软件源不分地域 # 配置方法需要同时在两个数组变量中分别定义软件源地址并且保证排列顺序一致 # 工作原理当检测到用户所选择的软件源地址在 “软件源公网地址列表” 中时就会询问是否切换为内网地址然后在 “软件源内网地址列表” 从相同的位置提取内网地址 # 软件源公网地址列表 mirror_list_extranet(mirrors.aliyun.commirrors.tencent.comrepo.huaweicloud.commirrors.volces.com ) # 软件源内网地址列表 mirror_list_intranet(mirrors.cloud.aliyuncs.commirrors.tencentyun.commirrors.myhuaweicloud.commirrors.ivolces.com )################################################################################ 定义系统判定变量 SYSTEM_DEBIANDebian SYSTEM_UBUNTUUbuntu SYSTEM_KALIKali SYSTEM_DEEPINDeepin SYSTEM_REDHATRedHat SYSTEM_RHELRed Hat Enterprise Linux SYSTEM_CENTOSCentOS SYSTEM_CENTOS_STREAMCentOS Stream SYSTEM_ROCKYRocky SYSTEM_ALMALINUXAlmaLinux SYSTEM_FEDORAFedora SYSTEM_OPENCLOUDOSOpenCloudOS SYSTEM_OPENEULERopenEuler SYSTEM_OPENSUSEopenSUSE SYSTEM_ARCHArch SYSTEM_ALPINEAlpine## 定义系统版本文件 File_LinuxRelease/etc/os-release File_RedHatRelease/etc/redhat-release File_DebianVersion/etc/debian_version File_ArmbianRelease/etc/armbian-release File_OpenCloudOSRelease/etc/opencloudos-release File_openEulerRelease/etc/openEuler-release File_ArchRelease/etc/arch-release File_AlpineRelease/etc/alpine-release## 定义软件源相关文件或目录 File_DebianSourceList/etc/apt/sources.list File_DebianSourceListBackup/etc/apt/sources.list.bak File_ArmbianSourceList/etc/apt/sources.list.d/armbian.list File_ArmbianSourceListBackup/etc/apt/sources.list.d/armbian.list.bak Dir_DebianExtendSource/etc/apt/sources.list.d Dir_DebianExtendSourceBackup/etc/apt/sources.list.d.bak File_ArchMirrorList/etc/pacman.d/mirrorlist File_ArchMirrorListBackup/etc/pacman.d/mirrorlist.bak File_AlpineRepositories/etc/apk/repositories File_AlpineRepositoriesBackup/etc/apk/repositories.bak Dir_YumRepos/etc/yum.repos.d Dir_YumReposBackup/etc/yum.repos.d.bak Dir_openSUSERepos/etc/zypp/repos.d Dir_openSUSEReposBackup/etc/zypp/repos.d.bak## 定义颜色变量 RED\033[31m GREEN\033[32m YELLOW\033[33m BLUE\033[34m PURPLE\033[35m AZURE\033[36m PLAIN\033[0m BOLD\033[1m SUCCESS[\033[1;32m成功${PLAIN}] COMPLETE[\033[1;32m完成${PLAIN}] WARN[\033[1;5;33m注意${PLAIN}] ERROR[\033[1;31m错误${PLAIN}] FAIL[\033[1;31m失败${PLAIN}] TIP[\033[1;32m提示${PLAIN}] WORKING[\033[1;36m _ ${PLAIN}]function StartTitle() {[ -z ${SOURCE} ] clearecho -e -----------------------------------echo -e | \033[0;1;35;95m⡇\033[0m \033[0;1;33;93m⠄\033[0m \033[0;1;32;92m⣀⡀\033[0m \033[0;1;36;96m⡀\033[0;1;34;94m⢀\033[0m \033[0;1;35;95m⡀⢀\033[0m \033[0;1;31;91m⡷\033[0;1;33;93m⢾\033[0m \033[0;1;32;92m⠄\033[0m \033[0;1;36;96m⡀⣀\033[0m \033[0;1;34;94m⡀\033[0;1;35;95m⣀\033[0m \033[0;1;31;91m⢀⡀\033[0m \033[0;1;33;93m⡀\033[0;1;32;92m⣀\033[0m \033[0;1;36;96m⢀⣀\033[0m |echo -e | \033[0;1;31;91m⠧\033[0;1;33;93m⠤\033[0m \033[0;1;32;92m⠇\033[0m \033[0;1;36;96m⠇⠸\033[0m \033[0;1;34;94m⠣\033[0;1;35;95m⠼\033[0m \033[0;1;31;91m⠜⠣\033[0m \033[0;1;33;93m⠇\033[0;1;32;92m⠸\033[0m \033[0;1;36;96m⠇\033[0m \033[0;1;34;94m⠏\033[0m \033[0;1;35;95m⠏\033[0m \033[0;1;33;93m⠣⠜\033[0m \033[0;1;32;92m⠏\033[0m \033[0;1;34;94m⠭⠕\033[0m |echo -e -----------------------------------echo -e 欢迎使用 GNU/Linux 更换系统软件源脚本 }## 报错退出 function Output_Error() {[ $1 ] echo -e \n$ERROR $1\nexit 1 }## 权限判定 function PermissionJudgment() {if [ $UID -ne 0 ]; thenOutput_Error 权限不足请使用 Root 用户运行本脚本fi }## 系统判定变量 function EnvJudgment() {## 定义系统名称SYSTEM_NAME$(cat $File_LinuxRelease | grep -E ^NAME | awk -F {print$2} | sed s/[\\]//g)cat $File_LinuxRelease | grep PRETTY_NAME -q[ $? -eq 0 ] SYSTEM_PRETTY_NAME$(cat $File_LinuxRelease | grep -E ^PRETTY_NAME | awk -F {print$2} | sed s/[\\]//g)## 定义系统版本号SYSTEM_VERSION_NUMBER$(cat $File_LinuxRelease | grep -E ^VERSION_ID | awk -F {print$2} | sed s/[\\]//g)## 定义系统IDSYSTEM_ID$(cat $File_LinuxRelease | grep -E ^ID | awk -F {print$2} | sed s/[\\]//g)## 判定当前系统派系if [ -s $File_DebianVersion ]; thenSYSTEM_FACTIONS${SYSTEM_DEBIAN}elif [ -s $File_openEulerRelease ]; thenSYSTEM_FACTIONS${SYSTEM_OPENEULER}elif [ -f $File_ArchRelease ]; thenSYSTEM_FACTIONS${SYSTEM_ARCH}elif [ -f $File_AlpineRelease ]; thenSYSTEM_FACTIONS${SYSTEM_ALPINE}elif [ -s $File_RedHatRelease ]; thenSYSTEM_FACTIONS${SYSTEM_REDHAT} # 注RedHat 判断优先级需要高于 OpenCloudOS因为8版本基于红帽而9版本不是elif [ -s $File_OpenCloudOSRelease ]; thenSYSTEM_FACTIONS${SYSTEM_OPENCLOUDOS}elif [[ ${SYSTEM_NAME} *openSUSE* ]]; thenSYSTEM_FACTIONS${SYSTEM_OPENSUSE}elseOutput_Error 无法判断当前运行环境当前系统不在本脚本的支持范围内fi## 判定系统名称、版本、版本号case ${SYSTEM_FACTIONS} in${SYSTEM_DEBIAN})if [ ! -x /usr/bin/lsb_release ]; thenapt-get install -y lsb-releaseif [ $? -ne 0 ]; thenOutput_Error lsb-release 软件包安装失败\n 本脚本需要通过 lsb_release 指令判断系统具体类型和版本当前系统可能为精简安装请自行安装后重新执行脚本fifiSYSTEM_JUDGMENT$(lsb_release -is)SYSTEM_VERSION_CODENAME${DEBIAN_CODENAME:-$(lsb_release -cs)};;${SYSTEM_REDHAT})SYSTEM_JUDGMENT$(awk {printf $1} $File_RedHatRelease)## Red Hat Enterprise Linuxgrep -q ${SYSTEM_RHEL} $File_RedHatRelease SYSTEM_JUDGMENT${SYSTEM_RHEL}## CentOS Streamgrep -q ${SYSTEM_CENTOS_STREAM} $File_RedHatRelease SYSTEM_JUDGMENT${SYSTEM_CENTOS_STREAM};;*)SYSTEM_JUDGMENT${SYSTEM_FACTIONS};;esac## 判断系统和其版本是否受本脚本支持case ${SYSTEM_JUDGMENT} in${SYSTEM_DEBIAN})if [[ ${SYSTEM_VERSION_NUMBER:0:1} ! [8-9] ${SYSTEM_VERSION_NUMBER:0:2} ! 1[0-2] ]]; thenOutput_Error 当前系统版本不在本脚本的支持范围内fi;;${SYSTEM_UBUNTU})if [[ ${SYSTEM_VERSION_NUMBER:0:2} ! 1[4-9] ${SYSTEM_VERSION_NUMBER:0:2} ! 2[0-3] ]]; thenOutput_Error 当前系统版本不在本脚本的支持范围内fi;;${SYSTEM_RHEL})if [[ ${SYSTEM_VERSION_NUMBER:0:1} ! [7-9] ]]; thenOutput_Error 当前系统版本不在本脚本的支持范围内fi;;${SYSTEM_CENTOS})if [[ ${SYSTEM_VERSION_NUMBER:0:1} ! [7-8] ]]; thenOutput_Error 当前系统版本不在本脚本的支持范围内fi;;${SYSTEM_CENTOS_STREAM} | ${SYSTEM_ROCKY} | ${SYSTEM_ALMALINUX} | ${SYSTEM_OPENCLOUDOS})if [[ ${SYSTEM_VERSION_NUMBER:0:1} ! [8-9] ]]; thenOutput_Error 当前系统版本不在本脚本的支持范围内fi;;${SYSTEM_FEDORA})if [[ ${SYSTEM_VERSION_NUMBER:0:2} ! 3[0-8] ]]; thenOutput_Error 当前系统版本不在本脚本的支持范围内fi;;${SYSTEM_OPENEULER})if [[ ${SYSTEM_VERSION_NUMBER:0:2} ! 2[1-3] ]]; thenOutput_Error 当前系统版本不在本脚本的支持范围内fi;;${SYSTEM_OPENSUSE})case ${SYSTEM_ID} inopensuse-leap)if [[ ${SYSTEM_VERSION_NUMBER:0:2} ! 15 ]]; thenOutput_Error 当前系统版本不在本脚本的支持范围内fi;;opensuse-tumbleweed) ;;*)Output_Error 当前系统不在本脚本的支持范围内;;esac;;${SYSTEM_KALI} | ${SYSTEM_DEEPIN} | ${SYSTEM_ARCH} | ${SYSTEM_ALPINE})# 理论全部支持或不作判断;;*)Output_Error 当前系统不在本脚本的支持范围内;;esac## 判定系统处理器架构case $(uname -m) inx86_64)DEVICE_ARCHx86_64;;aarch64)DEVICE_ARCHARM64;;armv7l)DEVICE_ARCHARMv7;;armv6l)DEVICE_ARCHARMv6;;i686)DEVICE_ARCHx86_32;;*)DEVICE_ARCH$(uname -m);;esac## 定义软件源分支名称if [[ -z ${SOURCE_BRANCH} ]]; then## 默认为系统名称小写替换空格SOURCE_BRANCH${SYSTEM_JUDGMENT,,}SOURCE_BRANCH${SOURCE_BRANCH// /-}## 处理特殊的分支名称case ${SYSTEM_JUDGMENT} in${SYSTEM_DEBIAN})case ${SYSTEM_VERSION_NUMBER:0:1} in8 | 9)SOURCE_BRANCHdebian-archive;;*)SOURCE_BRANCHdebian;;esac;;${SYSTEM_RHEL})case ${SYSTEM_VERSION_NUMBER:0:1} in9)SOURCE_BRANCHrocky;;*)SOURCE_BRANCHcentos;;esac;;${SYSTEM_CENTOS})if [[ ${DEVICE_ARCH} x86_64 ]]; thenSOURCE_BRANCHcentoselseSOURCE_BRANCHcentos-altarchfi;;${SYSTEM_CENTOS_STREAM})case ${SYSTEM_VERSION_NUMBER:0:1} in8)if [[ ${DEVICE_ARCH} x86_64 ]]; thenSOURCE_BRANCHcentoselseSOURCE_BRANCHcentos-altarchfi;;*)SOURCE_BRANCHcentos-stream;;esac;;${SYSTEM_UBUNTU})if [[ ${DEVICE_ARCH} x86_64 ]] || [[ ${DEVICE_ARCH} *i?86* ]]; thenSOURCE_BRANCHubuntuelseSOURCE_BRANCHubuntu-portsfi;;${SYSTEM_ARCH})if [[ ${DEVICE_ARCH} x86_64 ]] || [[ ${DEVICE_ARCH} *i?86* ]]; thenSOURCE_BRANCHarchlinuxelseSOURCE_BRANCHarchlinuxarmfi;;esacfi## 定义软件源更新文字case ${SYSTEM_FACTIONS} in${SYSTEM_DEBIAN})SYNC_MIRROR_TEXT更新软件源;;${SYSTEM_REDHAT} | ${SYSTEM_OPENCLOUDOS} | ${SYSTEM_OPENEULER})SYNC_MIRROR_TEXT生成软件源缓存;;${SYSTEM_OPENSUSE})SYNC_MIRROR_TEXT刷新软件源;;${SYSTEM_ARCH})SYNC_MIRROR_TEXT同步软件源;;${SYSTEM_ALPINE})SYNC_MIRROR_TEXT更新软件源;;esac }## 命令选项兼容性判断 function CheckCommandOptions() {if [[ ${USE_ABROAD_SOURCE} true ${USE_EDU_SOURCE} true ]]; thenOutput_Error 两种模式不可同时使用fiif [[ ${SYSTEM_JUDGMENT} ! ${SYSTEM_DEBIAN} ]] [[ ${SOURCE_SECURITY} true || ${SOURCE_BRANCH_SECURITY} true ]]; thenOutput_Error 当前系统不支持使用 security 仓库相关命令选项请确认后重试fiif [[ ${SYSTEM_FACTIONS} ! ${SYSTEM_DEBIAN} ]] [[ ${DEBIAN_CODENAME} ]]; thenOutput_Error 当前系统不支持使用指定版本代号命令选项请确认后重试fiif [[ ${SYSTEM_FACTIONS} ! ${SYSTEM_REDHAT} || ${SYSTEM_JUDGMENT} ${SYSTEM_FEDORA} ]] [[ ${INSTALL_EPEL} true || ${ONLY_EPEL} true ]]; thenOutput_Error 当前系统不支持安装 EPEL 附件软件包故无法使用相关命令选项请确认后重试fiif [[ ${SYSTEM_JUDGMENT} ! ${SYSTEM_CENTOS} ${SYSTEM_JUDGMENT} ! ${SYSTEM_RHEL} ${SYSTEM_JUDGMENT} ! ${SYSTEM_ALMALINUX} ]] [[ ${SOURCE_VAULT} true || ${SOURCE_BRANCH_VAULT} true ]]; thenOutput_Error 当前系统不支持使用 vault 仓库相关命令选项请确认后重试fi }## 选择软件源 function ChooseMirrors() {## 打印软件源列表function PrintMirrorsList() {local tmp_mirror_name tmp_mirror_url arr_num default_mirror_name_length tmp_mirror_name_length tmp_spaces_nums a i j## 计算字符串长度function StringLength() {local text$1echo ${#text}}echo -e local list_arr()local list_arr_sumlist_arr_sum$(eval echo \${#$1[]})for ((a 0; a $list_arr_sum; a)); dolist_arr[$a]$(eval echo \${$1[a]})doneif [ -x /usr/bin/printf ]; thenfor ((i 0; i ${#list_arr[]}; i)); dotmp_mirror_name$(echo ${list_arr[i]} | awk -F {print$1}) # 软件源名称# tmp_mirror_url$(echo ${list_arr[i]} | awk -F {print$2}) # 软件源地址arr_num$((i 1))default_mirror_name_length${2:-30} # 默认软件源名称打印长度## 补齐长度差异中文的引号在等宽字体中占1格而非2格[[ $(echo ${tmp_mirror_name} | grep -c “) -gt 0 ]] let default_mirror_name_length$(echo ${tmp_mirror_name} | grep -c “)[[ $(echo ${tmp_mirror_name} | grep -c ”) -gt 0 ]] let default_mirror_name_length$(echo ${tmp_mirror_name} | grep -c ”)[[ $(echo ${tmp_mirror_name} | grep -c ‘) -gt 0 ]] let default_mirror_name_length$(echo ${tmp_mirror_name} | grep -c ‘)[[ $(echo ${tmp_mirror_name} | grep -c ’) -gt 0 ]] let default_mirror_name_length$(echo ${tmp_mirror_name} | grep -c ’)# 非一般字符长度tmp_mirror_name_length$(StringLength $(echo ${tmp_mirror_name// /} | sed s|[0-9a-zA-Z\.\\:\_\(\)\\-\/\!·]||g;))## 填充空格tmp_spaces_nums$(($((default_mirror_name_length - tmp_mirror_name_length - $(StringLength ${tmp_mirror_name}))) / 2))for ((j 1; j ${tmp_spaces_nums}; j)); dotmp_mirror_name${tmp_mirror_name} doneprintf ❖ %-$((default_mirror_name_length tmp_mirror_name_length))s %4s\n ${tmp_mirror_name} $arr_num)doneelsefor ((i 0; i ${#list_arr[]}; i)); dotmp_mirror_name$(echo ${list_arr[i]} | awk -F {print$1}) # 软件源名称tmp_mirror_url$(echo ${list_arr[i]} | awk -F {print$2}) # 软件源地址arr_num$((i 1))echo -e ❖ $arr_num. ${tmp_mirror_url} | ${tmp_mirror_name}donefi}## 选择软件源内网地址# 例如部分云计算厂商的镜像站区分外网公网地址和内网地址内网地址仅面向云计算厂商云服务器用户使用# 内网地址一般不支持使用 HTTPS 协议所以默认设置为 HTTP 协议function ChooseMirrorIntranetAddress() {local intranet_sourcefor ((i 0; i ${#mirror_list_extranet[]}; i)); doif [[ ${SOURCE} ${mirror_list_extranet[i]} ]]; then# echo ${SOURCE}intranet_source${mirror_list_intranet[i]}# echo ${intranet_source}# exitONLY_HTTPTruebreakelsecontinuefidoneif [[ -z ${USE_INTRANET_SOURCE} ]]; thenlocal CHOICECHOICE$(echo -e \n${BOLD}└─ 默认使用软件源的公网地址是否继续? [Y/n] ${PLAIN})read -rp ${CHOICE} INPUT[[ -z ${INPUT} ]] INPUTYcase ${INPUT} in[Yy] | [Yy][Ee][Ss]) ;;[Nn] | [Nn][Oo])SOURCE${intranet_source}echo -e \n$WARN 已切换至内网专用地址仅限在特定环境下使用;;*)echo -e \n$WARN 输入错误默认不使用内网地址;;esacelif [[ ${USE_INTRANET_SOURCE} true ]]; thenSOURCE${intranet_source}fi}function Title() {local system_name${SYSTEM_PRETTY_NAME:-${SYSTEM_NAME} ${SYSTEM_VERSION_NUMBER}}local arch${DEVICE_ARCH}local date_time time_zonedate_time$(date %Y-%m-%d %H:%M:%S)time_zone$(timedatectl status 2/dev/null | grep Time zone | awk -F : {print$2} | awk -F {print$1})echo -e echo -e 运行环境 ${BLUE}${system_name} ${arch}${PLAIN}echo -e 系统时间 ${BLUE}${date_time} ${time_zone}${PLAIN}}Titleif [[ -z ${SOURCE} ]]; then## 使用官方源if [[ ${USE_OFFICIAL_SOURCE} true ]]; thenreturnfiif [[ ${USE_ABROAD_SOURCE} true ]]; thenlocal mirror_list_namemirror_list_abroadPrintMirrorsList ${mirror_list_name} 60elif [[ ${USE_EDU_SOURCE} true ]]; thenlocal mirror_list_namemirror_list_eduPrintMirrorsList ${mirror_list_name} 31elselocal mirror_list_namemirror_list_defaultPrintMirrorsList ${mirror_list_name} 31filocal CHOICECHOICE$(echo -e \n${BOLD}└─ 请选择并输入你想使用的软件源 [ 1-$(eval echo \${#$mirror_list_name[]}) ]${PLAIN})while true; doread -rp ${CHOICE} INPUTcase ${INPUT} in[1-9] | [1-9][0-9] | [1-9][0-9][0-9])local tmp_sourcetmp_source$(eval echo \${${mirror_list_name}[$((INPUT - 1))]})if [[ -z ${tmp_source} ]]; thenecho -e \n$WARN 请输入有效的数字序号elseSOURCE$(eval echo \${${mirror_list_name}[$((INPUT - 1))]} | awk -F {print$2})# echo ${SOURCE}# exitbreakfi;;*)echo -e \n$WARN 请输入数字序号以选择你想使用的软件源;;esacdonefi## 选择软件源内网地址if [[ ${mirror_list_extranet[*]} ~ (^|[^[:alpha:]])${SOURCE}([^[:alpha:]]|$) ]]; thenChooseMirrorIntranetAddressfi }## 选择同步软件源所使用的 WEB 协议 HTTP80 端口HTTPS443 端口 function ChooseWebProtocol() {if [[ -z ${WEB_PROTOCOL} ]]; thenif [[ ${ONLY_HTTP} True ]]; thenWEB_PROTOCOLhttpelselocal CHOICECHOICE$(echo -e \n${BOLD}└─ 软件源是否使用 HTTP 协议? [Y/n] ${PLAIN})read -rp ${CHOICE} INPUT[[ -z ${INPUT} ]] INPUTYcase ${INPUT} in[Yy] | [Yy][Ee][Ss])WEB_PROTOCOLhttp;;[Nn] | [Nn][Oo])WEB_PROTOCOLhttps;;*)echo -e \n$WARN 输入错误默认使用 HTTPS 协议WEB_PROTOCOLhttps;;esacfifiWEB_PROTOCOL${WEB_PROTOCOL,,} }# 适用于部分红帽系统的 EPEL 附加软件包安装/换源 function ChooseInstallEPEL() {function CheckInstallStatus() {## 判断是否已安装 EPEL 软件包rpm -qa | grep epel-release -qVERIFICATION_EPEL$?## 判断 /etc/yum.repos.d 目录下是否存在 epel 附加软件包 repo 源文件[ -d $Dir_YumRepos ] ls $Dir_YumRepos | grep epel -qVERIFICATION_EPELFILES$?## 判断 /etc/yum.repos.d.bak 目录下是否存在 epel 附加软件包 repo 源文件[ -d $Dir_YumReposBackup ] ls $Dir_YumReposBackup | grep epel -qVERIFICATION_EPELBACKUPFILES$?}if [[ ${SYSTEM_FACTIONS} ${SYSTEM_REDHAT} ]]; thenif [[ -z ${INSTALL_EPEL} ]]; thencase ${SYSTEM_JUDGMENT} in${SYSTEM_RHEL} | ${SYSTEM_CENTOS} | ${SYSTEM_CENTOS_STREAM} | ${SYSTEM_ROCKY} | ${SYSTEM_ALMALINUX} | ${SYSTEM_OPENCLOUDOS})CheckInstallStatusif [ ${VERIFICATION_EPEL} -eq 0 ]; thenlocal CHOICECHOICE$(echo -e \n${BOLD}└─ 检测到系统已安装 EPEL 附加软件包是否替换/覆盖软件源? [Y/n] ${PLAIN})elselocal CHOICECHOICE$(echo -e \n${BOLD}└─ 是否安装 EPEL 附加软件包? [Y/n] ${PLAIN})firead -rp ${CHOICE} INPUT[[ -z ${INPUT} ]] INPUTYcase ${INPUT} in[Yy] | [Yy][Ee][Ss])INSTALL_EPELtrue;;[Nn] | [Nn][Oo])INSTALL_EPELfalse;;*)echo -e \n$WARN 输入错误默认不更换INSTALL_EPELfalse;;esac;;esacelif [[ ${INSTALL_EPEL} true ]]; thenCheckInstallStatusfifi }## 关闭防火墙和SELinux function CloseFirewall() {if [ ! -x /usr/bin/systemctl ]; thenreturnfiif [[ $(systemctl is-active firewalld) active ]]; thenif [[ -z ${CLOSE_FIREWALL} ]]; thenlocal CHOICECHOICE$(echo -e \n${BOLD}└─ 是否关闭防火墙和 SELinux ? [Y/n] ${PLAIN})read -rp ${CHOICE} INPUT[[ -z ${INPUT} ]] INPUTYcase ${INPUT} in[Yy] | [Yy][Ee][Ss])CLOSE_FIREWALLtrue;;[Nn] | [Nn][Oo]) ;;*)echo -e \n$WARN 输入错误默认不关闭;;esacfiif [[ ${CLOSE_FIREWALL} true ]]; thenlocal SelinuxConfig/etc/selinux/configsystemctl disable --now firewalld /dev/null 21[ -s $SelinuxConfig ] sed -i s/SELINUXenforcing/SELINUXdisabled/g $SelinuxConfig setenforce 0 /dev/null 21fifi }## 备份原有软件源文件/目录 function BackupOriginalMirrors() {function BackupFile() {local target_file$1local backup_file$2local type$3## 判断是否存在源文件[ -f ${target_file} ] || touch ${target_file}if [ ! -s ${target_file} ]; thenecho -e returnfi## 判断是否存在已备份的源文件if [ -s ${backup_file} ]; thenif [[ ${IGNORE_BACKUP_TIPS} ! false ]]; thenreturnfilocal CHOICE_BACKUPCHOICE_BACKUP$(echo -e \n${BOLD}└─ 检测到系统中存在已备份的 ${type} 源文件是否跳过覆盖备份? [Y/n] ${PLAIN})read -rp ${CHOICE_BACKUP} INPUT[[ -z ${INPUT} ]] INPUTYcase ${INPUT} in[Yy] | [Yy][Ee][Ss]) ;;[Nn] | [Nn][Oo])echo cp -rvf ${target_file} ${backup_file} 21BACKED_UPtrue;;*)echo -e \n$WARN 输入错误默认不覆盖;;esacelseecho cp -rvf ${target_file} ${backup_file} 21BACKED_UPtrueecho -e \n$COMPLETE 已备份原有 ${type} 源文件sleep 1sfi}function BackupDir() {local target_dir$1local backup_dir$2[ -d ${target_dir} ] || mkdir -p ${target_dir}[ -d ${backup_dir} ] || mkdir -p ${backup_dir}## 判断是否存在 repo 源文件ls ${target_dir} | grep \.repo$ -qif [ $? -ne 0 ]; thenreturnfi## 判断是否存在已备份的 repo 源文件ls ${backup_dir} | grep \.repo$ -qif [ $? -eq 0 ]; thenif [[ ${IGNORE_BACKUP_TIPS} ! false ]]; thenreturnfilocal CHOICE_BACKUPCHOICE_BACKUP$(echo -e \n${BOLD}└─ 检测到系统中存在已备份的 repo 源文件是否跳过覆盖备份? [Y/n] ${PLAIN})read -rp ${CHOICE_BACKUP} INPUT[[ -z ${INPUT} ]] INPUTYcase ${INPUT} in[Yy] | [Yy][Ee][Ss]) ;;[Nn] | [Nn][Oo])echo cp -rvf $target_dir/* ${backup_dir} 21BACKED_UPtrue;;*)echo -e \n$WARN 输入错误默认不覆盖;;esacelseecho cp -rvf $target_dir/* ${backup_dir} 21BACKED_UPtrueecho -e \n$COMPLETE 已备份原有 repo 源文件sleep 1sfi}BACKED_UPfalse # 是否已备份if [[ ${BACKUP} true ]]; thencase ${SYSTEM_FACTIONS} in${SYSTEM_DEBIAN})# /etc/apt/sources.listBackupFile $File_DebianSourceList $File_DebianSourceListBackup sources.list## Armbianif [ -f $File_ArmbianRelease ]; thenBackupFile $File_ArmbianSourceList $File_ArmbianSourceListBackup armbian.listfi;;${SYSTEM_REDHAT} | ${SYSTEM_OPENCLOUDOS} | ${SYSTEM_OPENEULER})# /etc/yum.repos.dBackupDir $Dir_YumRepos $Dir_YumReposBackup;;${SYSTEM_OPENSUSE})# /etc/zypp/repos.dBackupDir $Dir_openSUSERepos $Dir_openSUSEReposBackup;;${SYSTEM_ARCH})# /etc/pacman.d/mirrorlistBackupFile $File_ArchMirrorList $File_ArchMirrorListBackup mirrorlist;;${SYSTEM_ALPINE})# /etc/apk/repositoriesBackupFile $File_AlpineRepositories $File_AlpineRepositoriesBackup repositories;;esacfi }## 移除原有软件源 function RemoveOriginMirrors() {case ${SYSTEM_FACTIONS} in${SYSTEM_DEBIAN})[ -f $File_DebianSourceList ] sed -i 1,$d $File_DebianSourceList[ -d $Dir_DebianExtendSource ] || mkdir -p $Dir_DebianExtendSource## Armbianif [ -f $File_ArmbianRelease ]; then[ -f $File_ArmbianSourceList ] sed -i 1,$d $File_ArmbianSourceListfi;;${SYSTEM_REDHAT})if [ ! -d $Dir_YumRepos ]; thenreturnfiif [[ ${SYSTEM_JUDGMENT} ${SYSTEM_FEDORA} ]]; thenrm -rf $Dir_YumRepos/fedora*elseif [[ ${ONLY_EPEL} ! false ]]; thenreturnficase ${SYSTEM_JUDGMENT} in${SYSTEM_RHEL})case ${SYSTEM_VERSION_NUMBER:0:1} in9)rm -rf $Dir_YumRepos/rocky*;;*)if [ -f $Dir_YumRepos/epel.repo ]; thenls $Dir_YumRepos/ | grep -Ev epel | xargs rm -rfelserm -rf $Dir_YumRepos/*fi;;esac;;${SYSTEM_CENTOS})if [ -f $Dir_YumRepos/epel.repo ]; thenls $Dir_YumRepos/ | grep -Ev epel | xargs rm -rfelserm -rf $Dir_YumRepos/*fi;;${SYSTEM_CENTOS_STREAM})case ${SYSTEM_VERSION_NUMBER:0:1} in9)rm -rf $Dir_YumRepos/centos*;;8)rm -rf $Dir_YumRepos/CentOS-Stream-*;;esac;;${SYSTEM_ROCKY})case ${SYSTEM_VERSION_NUMBER:0:1} in9)rm -rf $Dir_YumRepos/rocky*;;8)rm -rf $Dir_YumRepos/Rocky-*;;esac;;${SYSTEM_ALMALINUX})rm -rf $Dir_YumRepos/almalinux*;;${SYSTEM_OPENCLOUDOS})rm -rf $Dir_YumRepos/OpenCloudOS*;;esacfi;;${SYSTEM_OPENCLOUDOS})[ -d $Dir_YumRepos ] rm -rf $Dir_YumRepos/OpenCloudOS*;;${SYSTEM_OPENEULER})[ -d $Dir_YumRepos ] rm -rf $Dir_YumRepos/openEuler.repo;;${SYSTEM_OPENSUSE})[ -d $Dir_openSUSERepos ] ls $Dir_openSUSERepos/ | grep -E ^repo- | grep -Ev openh264 | xargs rm -rf;;${SYSTEM_ARCH})[ -f $File_ArchMirrorList ] sed -i 1,$d $File_ArchMirrorList;;${SYSTEM_ALPINE})[ -f $File_AlpineRepositories ] sed -i 1,$d $File_AlpineRepositories;;esac }## 换源 function ChangeMirrors() {## 打印修改前后差异function PrintDiff() {## 单一文件比较模式function DiffFile() {local diff_file$1local origin_file$2if [[ -s $diff_file ]] [[ -s $origin_file ]]; thenif [[ $(cat ${diff_file}) ! $(cat ${origin_file}) ]]; thenecho -e \n${BLUE}${diff_file}${PLAIN} - ${BLUE}${origin_file}${PLAIN}diff ${diff_file} ${origin_file} -d --coloralways -I -B -Efifi}## 目录文件比较模式function DiffDir() {local diff_dir$1local origin_dir$2for item in $(ls $diff_dir | xargs); doDiffFile ${diff_dir}/${item} ${origin_dir}/${item}done}if [[ -x /usr/bin/diff ${BACKED_UP} true ]]; thencase ${SYSTEM_FACTIONS} in${SYSTEM_DEBIAN})DiffFile $File_DebianSourceListBackup $File_DebianSourceList## Armbianif [ -f $File_ArmbianRelease ]; thenDiffFile $File_ArmbianSourceListBackup $File_ArmbianSourceListfi;;${SYSTEM_REDHAT} | ${SYSTEM_OPENCLOUDOS} | ${SYSTEM_OPENEULER})DiffDir $Dir_YumReposBackup $Dir_YumRepos;;${SYSTEM_OPENSUSE})DiffDir $Dir_openSUSEReposBackup $Dir_openSUSERepos;;${SYSTEM_ARCH})DiffFile $File_ArchMirrorListBackup $File_ArchMirrorList;;${SYSTEM_ALPINE})DiffFile $File_AlpineRepositoriesBackup $File_AlpineRepositories;;esacfi}## 调用换源函数case ${SYSTEM_FACTIONS} in${SYSTEM_DEBIAN})DebianMirrors;;${SYSTEM_REDHAT})RedHatMirrors;;${SYSTEM_OPENCLOUDOS})OpenCloudOSMirrors;;${SYSTEM_OPENEULER})openEulerMirrors;;${SYSTEM_OPENSUSE})openSUSEMirrors;;${SYSTEM_ARCH})ArchMirrors;;${SYSTEM_ALPINE})AlpineMirrors;;esac## 比较差异if [[ ${PRINT_DIFF} true ]]; thenPrintDifffi## 更新软件源echo -e \n$WORKING 开始${SYNC_MIRROR_TEXT}...\ncase ${SYSTEM_FACTIONS} in${SYSTEM_DEBIAN})apt-get update;;${SYSTEM_REDHAT} | ${SYSTEM_OPENCLOUDOS} | ${SYSTEM_OPENEULER})yum makecache;;${SYSTEM_OPENSUSE})zypper ref;;${SYSTEM_ARCH})pacman -Sy;;${SYSTEM_ALPINE})apk update -f;;esacif [ $? -eq 0 ]; thenecho -e \n$SUCCESS 软件源更换完毕elseecho -e \n$FAIL 软件源更换完毕但${SYNC_MIRROR_TEXT}失败\necho -e 请再次执行脚本并更换相同软件源后进行尝试若仍然${SYNC_MIRROR_TEXT}失败那么可能由以下原因导致echo -e 1. 网络问题例如连接异常、由地区影响的网络间歇式中断等echo -e 2. 软件源问题建议更换其它镜像站进行尝试少数情况下软件源若处于同步中状态则可能会出现文件同步错误问题echo -e \n软件源地址${WEB_PROTOCOL}://${SOURCE}/${SOURCE_BRANCH}\nexit 1fi }## 升级软件包 function UpgradeSoftware() {function CleanCache() {## 跳过特殊系统case ${SYSTEM_JUDGMENT} in${SYSTEM_RHEL} | ${SYSTEM_OPENSUSE} | ${SYSTEM_ARCH} | ${SYSTEM_ALPINE})return;;esac## 交互确认if [[ -z ${CLEAN_CACHE} ]]; thenCLEAN_CACHEfalselocal CHOICECHOICE$(echo -e \n${BOLD}└─ 是否清理已下载的软件包缓存? [Y/n] ${PLAIN})read -rp ${CHOICE} INPUT[[ -z ${INPUT} ]] INPUTYcase ${INPUT} in[Yy] | [Yy][Ee][Ss])CLEAN_CACHEtrue;;[Nn] | [Nn][Oo]) ;;*)echo -e \n$WARN 输入错误默认不清理;;esacfiif [[ ${CLEAN_CACHE} false ]]; thenreturnfi## 调用系统命令case ${SYSTEM_FACTIONS} in${SYSTEM_DEBIAN})apt-get autoremove -y /dev/null 21apt-get clean /dev/null 21;;${SYSTEM_REDHAT} | ${SYSTEM_OPENCLOUDOS} | ${SYSTEM_OPENEULER})yum autoremove -y /dev/null 21yum clean packages -y /dev/null 21;;esacecho -e \n$COMPLETE 清理完毕}## 跳过特殊系统case ${SYSTEM_JUDGMENT} in${SYSTEM_ARCH} | ${SYSTEM_RHEL})return;;esac## 交互确认if [[ -z ${UPGRADE_SOFTWARE} ]]; thenUPGRADE_SOFTWAREfalselocal CHOICECHOICE$(echo -e \n${BOLD}└─ 是否跳过更新软件包? [Y/n] ${PLAIN})read -rp ${CHOICE} INPUT[[ -z ${INPUT} ]] INPUTYcase ${INPUT} in[Yy] | [Yy][Ee][Ss]) ;;[Nn] | [Nn][Oo])UPGRADE_SOFTWAREtrue;;*)echo -e \n$WARN 输入错误默认不更新;;esacfiif [[ ${UPGRADE_SOFTWARE} false ]]; thenreturnfiecho -e ## 调用系统命令case ${SYSTEM_FACTIONS} in${SYSTEM_DEBIAN})apt-get upgrade -y;;${SYSTEM_REDHAT} | ${SYSTEM_OPENCLOUDOS} | ${SYSTEM_OPENEULER})yum update -y --skip-broken;;${SYSTEM_OPENSUSE})zypper update -y;;${SYSTEM_ALPINE})apk upgrade --no-cache;;esacCleanCache }## 运行结束 function RunEnd() {echo -e \n---------- 脚本执行结束 ----------echo -e \n\033[1;34mPowered by https://linuxmirrors.cn\033[0m\n }################################################################################ 更换基于 Debian 系 Linux 发行版的软件源 function DebianMirrors() {## 使用官方源if [[ ${USE_OFFICIAL_SOURCE} true ]]; thencase ${SYSTEM_JUDGMENT} in${SYSTEM_DEBIAN})SOURCEdeb.debian.org;;${SYSTEM_UBUNTU})SOURCEarchive.ubuntu.com;;${SYSTEM_KALI})SOURCEhttp.kali.org;;${SYSTEM_DEEPIN})SOURCEcommunity-packages.deepin.com;;esacfilocal source_suffixlocal tips## 默认禁用源码镜像以提高速度如需启用请自行取消注释local basic_url${WEB_PROTOCOL}://${SOURCE}/${SOURCE_BRANCH}case ${SYSTEM_JUDGMENT} in${SYSTEM_DEBIAN})case ${SYSTEM_VERSION_NUMBER} in12)source_suffixmain contrib non-free non-free-firmware;;*)source_suffixmain contrib non-free;;esacecho ${tips} deb ${basic_url} ${SYSTEM_VERSION_CODENAME} ${source_suffix} # deb-src ${basic_url} ${SYSTEM_VERSION_CODENAME} ${source_suffix} deb ${basic_url} ${SYSTEM_VERSION_CODENAME}-updates ${source_suffix} # deb-src ${basic_url} ${SYSTEM_VERSION_CODENAME}-updates ${source_suffix} deb ${basic_url} ${SYSTEM_VERSION_CODENAME}-backports ${source_suffix} # deb-src ${basic_url} ${SYSTEM_VERSION_CODENAME}-backports ${source_suffix} $File_DebianSourceList## 处理 debian-security 仓库local security_url${SOURCE_SECURITY:-${SOURCE}}if [[ -z ${SOURCE_SECURITY} ]]; thenif [[ ${USE_ABROAD_SOURCE} true ]]; thenlocal security_urlhttps://security.debian.org/${SOURCE_BRANCH_SECURITY:-${SOURCE_BRANCH}-security}elselocal security_url${WEB_PROTOCOL}://${SOURCE}/${SOURCE_BRANCH_SECURITY:-${SOURCE_BRANCH}-security}fielselocal security_url${WEB_PROTOCOL}://${SOURCE_SECURITY}/${SOURCE_BRANCH_SECURITY:-${SOURCE_BRANCH}-security}fiecho deb ${security_url} ${SYSTEM_VERSION_CODENAME}-security ${source_suffix} # deb-src ${security_url} ${SYSTEM_VERSION_CODENAME}-security ${source_suffix} $File_DebianSourceList;;${SYSTEM_UBUNTU})source_suffixmain restricted universe multiverseecho ${tips} deb ${basic_url} ${SYSTEM_VERSION_CODENAME} ${source_suffix} # deb-src ${basic_url} ${SYSTEM_VERSION_CODENAME} ${source_suffix} deb ${basic_url} ${SYSTEM_VERSION_CODENAME}-updates ${source_suffix} # deb-src ${basic_url} ${SYSTEM_VERSION_CODENAME}-updates ${source_suffix} deb ${basic_url} ${SYSTEM_VERSION_CODENAME}-backports ${source_suffix} # deb-src ${basic_url} ${SYSTEM_VERSION_CODENAME}-backports ${source_suffix} deb ${basic_url} ${SYSTEM_VERSION_CODENAME}-security ${source_suffix} # deb-src ${basic_url} ${SYSTEM_VERSION_CODENAME}-security ${source_suffix}## 预发布软件源不建议启用 # deb ${basic_url} ${SYSTEM_VERSION_CODENAME}-proposed ${source_suffix} # deb-src ${basic_url} ${SYSTEM_VERSION_CODENAME}-proposed ${source_suffix} $File_DebianSourceList;;${SYSTEM_KALI})source_suffixmain non-free contribecho ${tips} deb ${basic_url} ${SYSTEM_VERSION_CODENAME} ${source_suffix} # deb-src ${basic_url} ${SYSTEM_VERSION_CODENAME} ${source_suffix} $File_DebianSourceList;;${SYSTEM_DEEPIN})source_suffixapricot main contrib non-freeecho ${tips} deb ${basic_url} ${source_suffix} # deb-src ${basic_url} ${source_suffix} $File_DebianSourceList;;esac## Armbianif [ -f $File_ArmbianRelease ]; thenecho deb [signed-by/usr/share/keyrings/armbian.gpg] ${WEB_PROTOCOL}://${SOURCE}/armbian ${SYSTEM_VERSION_CODENAME} main ${SYSTEM_VERSION_CODENAME}-utils ${SYSTEM_VERSION_CODENAME}-desktop $File_ArmbianSourceListfi }## 更换基于 RedHat 系 Linux 发行版软件源 function RedHatMirrors() {## 安装/更换 EPEL (Extra Packages for Enterprise Linux) 附加软件包软件源function EPELMirrors() {## 安装 EPEL 软件包if [ ${VERIFICATION_EPEL} -ne 0 ]; thenecho -e \n${WORKING} 安装 epel-release 软件包...\nyum install -y https://mirrors.cloud.tencent.com/epel/epel-release-latest-${SYSTEM_VERSION_NUMBER:0:1}.noarch.rpmrm -rf $Dir_YumRepos/epel*fi## 删除原有 repo 源文件[ ${VERIFICATION_EPELFILES} -eq 0 ] rm -rf $Dir_YumRepos/epel*[ ${VERIFICATION_EPELBACKUPFILES} -eq 0 ] rm -rf $Dir_YumReposBackup/epel*## 生成 repo 源文件GenRepoFiles_EPELif [[ ${USE_OFFICIAL_SOURCE} true ]]; thenreturnfi# 更换 WEB 协议HTTP/HTTPScase ${SYSTEM_VERSION_NUMBER:0:1} in9 | 8)sed -i s|^#baseurlhttps|baseurl${WEB_PROTOCOL}|g $Dir_YumRepos/epel*;;7)sed -i s|^#baseurlhttp|baseurl${WEB_PROTOCOL}|g $Dir_YumRepos/epel*;;esac# 修改源sed -i s|^metalink|#metalink|g $Dir_YumRepos/epel*case ${SYSTEM_VERSION_NUMBER:0:1} in9 | 8)sed -i s|download.example/pub|${SOURCE}|g $Dir_YumRepos/epel*;;7)sed -i s|download.fedoraproject.org/pub|${SOURCE}|g $Dir_YumRepos/epel*;;esac[ -f $Dir_YumRepos/epel-cisco-openh264.repo ] rm -rf epel-cisco-openh264.repo # 删除不兼容的仓库}## 仅 EPEL 模式if [[ ${ONLY_EPEL} true ]]; thenEPELMirrorsreturnfi## 生成基于 RedHat 发行版和及其衍生发行版的官方 repo 源文件case ${SYSTEM_JUDGMENT} in${SYSTEM_RHEL})case ${SYSTEM_VERSION_NUMBER:0:1} in9)GenRepoFiles_RockyLinux ${SYSTEM_VERSION_NUMBER:0:1};;*)GenRepoFiles_CentOS ${SYSTEM_VERSION_NUMBER:0:1};;esac;;${SYSTEM_CENTOS})GenRepoFiles_CentOS ${SYSTEM_VERSION_NUMBER:0:1};;${SYSTEM_CENTOS_STREAM})GenRepoFiles_CentOSStream ${SYSTEM_VERSION_NUMBER:0:1};;${SYSTEM_ROCKY})GenRepoFiles_RockyLinux ${SYSTEM_VERSION_NUMBER:0:1};;${SYSTEM_ALMALINUX})GenRepoFiles_AlmaLinux ${SYSTEM_VERSION_NUMBER:0:1};;${SYSTEM_FEDORA})GenRepoFiles_Fedora;;${SYSTEM_OPENCLOUDOS})GenRepoFiles_OpenCloudOS ${SYSTEM_VERSION_NUMBER:0:1};;esac## 使用官方源if [[ ${USE_OFFICIAL_SOURCE} ! true ]]; then## 修改源cd $Dir_YumReposcase ${SYSTEM_JUDGMENT} in${SYSTEM_RHEL})case ${SYSTEM_VERSION_NUMBER:0:1} in9)# wget ${WEB_PROTOCOL}://${SOURCE}/${SOURCE_BRANCH}/RPM-GPG-KEY-rockyofficial -P /etc/pki/rpm-gpg# wget ${WEB_PROTOCOL}://${SOURCE}/${SOURCE_BRANCH}/RPM-GPG-KEY-Rocky-9 -P /etc/pki/rpm-gpgsed -e s|^#baseurlhttp|baseurl${WEB_PROTOCOL}|g \-e s|^mirrorlist|#mirrorlist|g \-e s|^gpgcheck1|gpgcheck0|g \-e s|^gpgkey|#gpgkey|g \-e s|dl.rockylinux.org/\$contentdir|${SOURCE}/${SOURCE_BRANCH}|g \-i \rocky.repo \rocky-addons.repo \rocky-devel.repo \rocky-extras.repo;;*)sed -i s|^#baseurlhttp|baseurl${WEB_PROTOCOL}|g CentOS-*sed -i s|^mirrorlist|#mirrorlist|g CentOS-*case ${SYSTEM_VERSION_NUMBER:0:1} in8)sed -i s|mirror.centos.org/\$contentdir|mirror.centos.org/centos-vault|g CentOS-*sed -i s/\$releasever/8.5.2111/g CentOS-*# 单独处理 CentOS-Linux-Sources.reposed -i s|vault.centos.org/\$contentdir|${SOURCE_VAULT:-${SOURCE}}/${SOURCE_BRANCH_VAULT:-centos-vault}|g CentOS-Linux-Sources.repo;;7)sed -i s|mirror.centos.org/\$contentdir|mirror.centos.org/${SOURCE_BRANCH}|g CentOS-*sed -i s/\$releasever/7/g CentOS-*# 单独处理 CentOS-Sources.reposed -i s|vault.centos.org/centos|${SOURCE_VAULT:-${SOURCE}}/${SOURCE_BRANCH_VAULT:-${SOURCE_BRANCH}}|g CentOS-Sources.repo;;esacsed -i s|mirror.centos.org|${SOURCE}|g CentOS-*;;esac;;${SYSTEM_CENTOS})sed -i s|^#baseurlhttp|baseurl${WEB_PROTOCOL}|g CentOS-*sed -i s|^mirrorlist|#mirrorlist|g CentOS-*case ${SYSTEM_VERSION_NUMBER:0:1} in8)## CentOS 8 操作系统版本结束了生命周期EOLLinux 社区已不再维护该操作系统版本最终版本为 8.5.2011# 原 centos 镜像中的 CentOS 8 相关内容已被官方移动从 2022-02 开始切换至 centos-vault 源sed -i s|mirror.centos.org/\$contentdir|mirror.centos.org/centos-vault|g CentOS-*sed -i s/\$releasever/8.5.2111/g CentOS-*# 单独处理 CentOS-Linux-Sources.reposed -i s|vault.centos.org/\$contentdir|${SOURCE_VAULT:-${SOURCE}}/${SOURCE_BRANCH_VAULT:-centos-vault}|g CentOS-Linux-Sources.repo;;7)sed -i s|mirror.centos.org/\$contentdir|mirror.centos.org/${SOURCE_BRANCH}|g CentOS-*sed -i s|vault.centos.org/centos|${SOURCE_VAULT:-${SOURCE}}/${SOURCE_BRANCH_VAULT:-${SOURCE_BRANCH}}|g CentOS-Sources.repo # 单独处理 CentOS-Sources.repo;;esacsed -i s|mirror.centos.org|${SOURCE}|g CentOS-*;;${SYSTEM_CENTOS_STREAM})# CentOS Stream 9 使用的是 centos-stream 镜像而 CentOS Stream 8 使用的是 centos 镜像case ${SYSTEM_VERSION_NUMBER:0:1} in9)sed -e s|^#baseurlhttps|baseurl${WEB_PROTOCOL}|g \-e s|^metalink|#metalink|g \-e s|mirror.stream.centos.org|${SOURCE}/${SOURCE_BRANCH}|g \-i \centos.repo \centos-addons.repo;;8)sed -i s|vault.centos.org/\$contentdir|${SOURCE_VAULT:-${SOURCE}}/${SOURCE_BRANCH_VAULT:-${SOURCE_BRANCH}}|g CentOS-Stream-Sources.repo # 单独处理 CentOS-Stream-Sources.reposed -e s|^#baseurlhttp|baseurl${WEB_PROTOCOL}|g \-e s|^mirrorlist|#mirrorlist|g \-e s|mirror.centos.org/\$contentdir|${SOURCE}/${SOURCE_BRANCH}|g \-i \CentOS-Stream-*;;esac;;${SYSTEM_ROCKY})case ${SYSTEM_VERSION_NUMBER:0:1} in9)sed -e s|^#baseurlhttp|baseurl${WEB_PROTOCOL}|g \-e s|^mirrorlist|#mirrorlist|g \-e s|dl.rockylinux.org/\$contentdir|${SOURCE}/${SOURCE_BRANCH}|g \-i \rocky.repo \rocky-addons.repo \rocky-devel.repo \rocky-extras.repo;;8)sed -e s|^#baseurlhttp|baseurl${WEB_PROTOCOL}|g \-e s|^mirrorlist|#mirrorlist|g \-e s|dl.rockylinux.org/\$contentdir|${SOURCE}/${SOURCE_BRANCH}|g \-i \Rocky-*;;esac;;${SYSTEM_ALMALINUX})case ${SYSTEM_VERSION_NUMBER:0:1} in9)sed -e s|^# baseurlhttp|baseurl${WEB_PROTOCOL}|g \-e s|^mirrorlist|#mirrorlist|g \-e s|repo.almalinux.org/vault|${SOURCE_VAULT:-${SOURCE}}/${SOURCE_BRANCH_VAULT:-almalinux-vault}|g \-e s|repo.almalinux.org/almalinux|${SOURCE}/${SOURCE_BRANCH}|g \-i \almalinux-*;;8)sed -e s|^mirrorlist|#mirrorlist|g \-e s|^# baseurlhttp|baseurl${WEB_PROTOCOL}|g \-e s|repo.almalinux.org/vault|${SOURCE_VAULT:-${SOURCE}}/${SOURCE_BRANCH_VAULT:-almalinux-vault}|g \-e s|repo.almalinux.org/almalinux|${SOURCE}/${SOURCE_BRANCH}|g \-i \almalinux-ha.repo \almalinux-nfv.repo \almalinux-plus.repo \almalinux-powertools.repo \almalinux-resilientstorage.repo \almalinux-rt.repo \almalinux-sap.repo \almalinux-saphana.repo \almalinux.repo;;esac;;${SYSTEM_FEDORA})sed -e s|^metalink|#metalink|g \-e s|^#baseurlhttp|baseurl${WEB_PROTOCOL}|g \-e s|download.example/pub/fedora/linux|${SOURCE}/${SOURCE_BRANCH}|g \-i \fedora.repo \fedora-updates.repo \fedora-modular.repo \fedora-updates-modular.repo \fedora-updates-testing.repo \fedora-updates-testing-modular.repo;;${SYSTEM_OPENCLOUDOS})case ${SYSTEM_VERSION_NUMBER:0:1} in8)sed -e s|^baseurlhttps|baseurl${WEB_PROTOCOL}|g \-e s|mirrors.opencloudos.tech/opencloudos|${SOURCE}/${SOURCE_BRANCH}|g \-i \OpenCloudOS-Debuginfo.repo \OpenCloudOS.repo \OpenCloudOS-Sources.repo;;esac;;esacfi## EPEL 附加软件包安装/换源case ${SYSTEM_JUDGMENT} in${SYSTEM_RHEL} | ${SYSTEM_CENTOS} | ${SYSTEM_CENTOS_STREAM} | ${SYSTEM_ROCKY} | ${SYSTEM_ALMALINUX} | ${SYSTEM_OPENCLOUDOS})[[ ${INSTALL_EPEL} true ]] EPELMirrors;;esac }## 更换基于 OpenCloudOS 发行版的软件源 function OpenCloudOSMirrors() {GenRepoFiles_OpenCloudOS ${SYSTEM_VERSION_NUMBER:0:1}## 使用官方源if [[ ${USE_OFFICIAL_SOURCE} true ]]; thenreturnfi## 修改源cd $Dir_YumReposcase ${SYSTEM_VERSION_NUMBER:0:1} in9)sed -e s|^baseurlhttps|baseurl${WEB_PROTOCOL}|g \-e s|mirrors.opencloudos.tech/opencloudos|${SOURCE}/${SOURCE_BRANCH}|g \-i \OpenCloudOS.repo;;esac }## 更换基于 openEuler 发行版的软件源 function openEulerMirrors() {GenRepoFiles_openEuler## 使用官方源if [[ ${USE_OFFICIAL_SOURCE} true ]]; thenreturnfi## 修改源cd $Dir_YumRepossed -e s|^#baseurlhttp|baseurl${WEB_PROTOCOL}|g \-e s|repo.openeuler.org|${SOURCE}/${SOURCE_BRANCH}|g \-i \openEuler.repo }## 更换基于 openSUSE 发行版的软件源 function openSUSEMirrors() {case ${SYSTEM_ID} inopensuse-leap)GenRepoFiles_openSUSE leap ${SYSTEM_VERSION_NUMBER};;opensuse-tumbleweed)GenRepoFiles_openSUSE tumbleweed;;esac## 使用官方源if [[ ${USE_OFFICIAL_SOURCE} true ]]; thenreturnfi## 修改源cd $Dir_openSUSERepos# 更换 WEB 协议HTTP/HTTPSsed -i s|^#baseurlhttp|baseurl${WEB_PROTOCOL}|g repo-*# 更换软件源case ${SYSTEM_ID} inopensuse-leap)case ${SYSTEM_VERSION_NUMBER} in15.[0-2])sed -i s|download.opensuse.org|${SOURCE}/${SOURCE_BRANCH}|g \repo-debug-non-oss.repo \repo-debug.repo \repo-debug-update-non-oss.repo \repo-debug-update.repo \repo-non-oss.repo \repo-oss.repo \repo-source-non-oss.repo \repo-source.repo \repo-update-non-oss.repo \repo-update.repo;;*)sed -i s|download.opensuse.org|${SOURCE}/${SOURCE_BRANCH}|g \repo-backports-debug-update.repo \repo-backports-update.repo \repo-debug-non-oss.repo \repo-debug.repo \repo-debug-update-non-oss.repo \repo-debug-update.repo \repo-non-oss.repo \repo-oss.repo \repo-sle-debug-update.repo \repo-sle-update.repo \repo-source.repo \repo-update-non-oss.repo \repo-update.repo;;esac;;opensuse-tumbleweed)sed -i s|download.opensuse.org|${SOURCE}/${SOURCE_BRANCH}|g \repo-debug.repo \repo-non-oss.repo \repo-openh264.repo \repo-oss.repo \repo-source.repo \repo-update.repo;;esac }## 更换基于 Arch Linux 发行版的软件源 function ArchMirrors() {## 使用官方源if [[ ${USE_OFFICIAL_SOURCE} true ]]; thenSOURCEmirrors.aliyun.comecho -e \n${TIP} 由于 Arch Linux 无官方源因此已切换至阿里源\nfi## 修改源case ${SOURCE_BRANCH} inarchlinuxarm)echo Server ${WEB_PROTOCOL}://${SOURCE}/${SOURCE_BRANCH}/\$arch/\$repo $File_ArchMirrorList;;archlinuxcn)echo Server ${WEB_PROTOCOL}://${SOURCE}/${SOURCE_BRANCH}/\$arch $File_ArchMirrorList;;*)echo Server ${WEB_PROTOCOL}://${SOURCE}/${SOURCE_BRANCH}/\$repo/os/\$arch $File_ArchMirrorList;;esac }## 更换基于 Alpine Linux 发行版的软件源 function AlpineMirrors() {## 使用官方源if [[ ${USE_OFFICIAL_SOURCE} true ]]; thenSOURCEdl-cdn.alpinelinux.orgfilocal version_nameecho ${SYSTEM_PRETTY_NAME} | grep edge -qif [ $? -eq 0 ]; thenversion_nameedgeelseversion_namev${SYSTEM_VERSION_NUMBER%.*}fi## 修改源echo ${WEB_PROTOCOL}://${SOURCE}/${SOURCE_BRANCH}/${version_name}/main ${WEB_PROTOCOL}://${SOURCE}/${SOURCE_BRANCH}/${version_name}/community $File_AlpineRepositories }################################################################################ 生成 CentOS 官方 repo 源文件 function GenRepoFiles_CentOS() {case $1 in8)cat $Dir_YumRepos/CentOS-Linux-AppStream.repo \EOF # CentOS-Linux-AppStream.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[appstream] nameCentOS Linux $releasever - AppStream mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoAppStreaminfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$releasever/AppStream/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Linux-BaseOS.repo \EOF # CentOS-Linux-BaseOS.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[baseos] nameCentOS Linux $releasever - BaseOS mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoBaseOSinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Linux-ContinuousRelease.repo \EOF # CentOS-Linux-ContinuousRelease.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead. # # The Continuous Release (CR) repository contains packages for the next minor # release of CentOS Linux. This repository only has content in the time period # between an upstream release and the official CentOS Linux release. These # packages have not been fully tested yet and should be considered beta # quality. They are made available for people willing to test and provide # feedback for the next release.[cr] nameCentOS Linux $releasever - ContinuousRelease mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepocrinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$releasever/cr/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Linux-Debuginfo.repo \EOF # CentOS-Linux-Debuginfo.repo # # All debug packages are merged into a single repo, split by basearch, and are # not signed.[debuginfo] nameCentOS Linux $releasever - Debuginfo baseurlhttp://debuginfo.centos.org/$releasever/$basearch/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Linux-Devel.repo \EOF # CentOS-Linux-Devel.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[devel] nameCentOS Linux $releasever - Devel WARNING! FOR BUILDROOT USE ONLY! mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoDevelinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$releasever/Devel/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Linux-Extras.repo \EOF # CentOS-Linux-Extras.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[extras] nameCentOS Linux $releasever - Extras mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoextrasinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$releasever/extras/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Linux-FastTrack.repo \EOF # CentOS-Linux-FastTrack.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[fasttrack] nameCentOS Linux $releasever - FastTrack mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepofasttrackinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$releasever/fasttrack/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Linux-HighAvailability.repo \EOF # CentOS-Linux-HighAvailability.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[ha] nameCentOS Linux $releasever - HighAvailability mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoHighAvailabilityinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$releasever/HighAvailability/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Linux-Media.repo \EOF # CentOS-Linux-Media.repo # # You can use this repo to install items directly off the installation media. # Verify your mount point matches one of the below file:// paths.[media-baseos] nameCentOS Linux $releasever - Media - BaseOS baseurlfile:///media/CentOS/BaseOSfile:///media/cdrom/BaseOSfile:///media/cdrecorder/BaseOS gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[media-appstream] nameCentOS Linux $releasever - Media - AppStream baseurlfile:///media/CentOS/AppStreamfile:///media/cdrom/AppStreamfile:///media/cdrecorder/AppStream gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Linux-Plus.repo \EOF # CentOS-Linux-Plus.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[plus] nameCentOS Linux $releasever - Plus mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepocentosplusinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$releasever/centosplus/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Linux-PowerTools.repo \EOF # CentOS-Linux-PowerTools.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[powertools] nameCentOS Linux $releasever - PowerTools mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoPowerToolsinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$releasever/PowerTools/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Linux-Sources.repo \EOF # CentOS-Linux-Sources.repo[baseos-source] nameCentOS Linux $releasever - BaseOS - Source baseurlhttp://vault.centos.org/$contentdir/$releasever/BaseOS/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[appstream-source] nameCentOS Linux $releasever - AppStream - Source baseurlhttp://vault.centos.org/$contentdir/$releasever/AppStream/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[extras-source] nameCentOS Linux $releasever - Extras - Source baseurlhttp://vault.centos.org/$contentdir/$releasever/extras/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[plus-source] nameCentOS Linux $releasever - Plus - Source baseurlhttp://vault.centos.org/$contentdir/$releasever/centosplus/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOF;;7)cat $Dir_YumRepos/CentOS-Base.repo \EOF # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist does not work for you, as a fall back you can try the # remarked out baseurl line instead. # #[base] nameCentOS-$releasever - Base mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoosinfra$infra #baseurlhttp://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#released updates [updates] nameCentOS-$releasever - Updates mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoupdatesinfra$infra #baseurlhttp://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that may be useful [extras] nameCentOS-$releasever - Extras mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoextrasinfra$infra #baseurlhttp://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages [centosplus] nameCentOS-$releasever - Plus mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepocentosplusinfra$infra #baseurlhttp://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 EOFcat $Dir_YumRepos/CentOS-CR.repo \EOF # CentOS-CR.repo # # The Continuous Release ( CR ) repository contains rpms that are due in the next # release for a specific CentOS Version ( eg. next release in CentOS-7 ); these rpms # are far less tested, with no integration checking or update path testing having # taken place. They are still built from the upstream sources, but might not map # to an exact upstream distro release. # # These packages are made available soon after they are built, for people willing # to test their environments, provide feedback on content for the next release, and # for people looking for early-access to next release content. # # The CR repo is shipped in a disabled state by default; its important that users # understand the implications of turning this on. # # NOTE: We do not use a mirrorlist for the CR repos, to ensure content is available # to everyone as soon as possible, and not need to wait for the external # mirror network to seed first. However, many local mirrors will carry CR repos # and if desired you can use one of these local mirrors by editing the baseurl # line in the repo config below. #[cr] nameCentOS-$releasever - cr baseurlhttp://mirror.centos.org/centos/$releasever/cr/$basearch/ gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 enabled0 EOFcat $Dir_YumRepos/CentOS-Debuginfo.repo \EOF # CentOS-Debug.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. ## All debug packages from all the various CentOS-7 releases # are merged into a single repo, split by BaseArch # # Note: packages in the debuginfo repo are currently not signed #[base-debuginfo] nameCentOS-7 - Debuginfo baseurlhttp://debuginfo.centos.org/7/$basearch/ gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-7 enabled0 # EOFcat $Dir_YumRepos/CentOS-fasttrack.repo \EOF [fasttrack] nameCentOS-7 - fasttrack mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepofasttrackinfra$infra #baseurlhttp://mirror.centos.org/centos/$releasever/fasttrack/$basearch/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 EOFcat $Dir_YumRepos/CentOS-Media.repo \EOF # CentOS-Media.repo # # This repo can be used with mounted DVD media, verify the mount point for # CentOS-7. You can use this repo and yum to install items directly off the # DVD ISO that we release. # # To use this repo, put in your DVD and use it with the other repos too: # yum --enablerepoc7-media [command] # # or for ONLY the media repo, do this: # # yum --disablerepo\* --enablerepoc7-media [command][c7-media] nameCentOS-$releasever - Media baseurlfile:///media/CentOS/file:///media/cdrom/file:///media/cdrecorder/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 EOFcat $Dir_YumRepos/CentOS-Sources.repo \EOF # CentOS-Sources.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist does not work for you, as a fall back you can try the # remarked out baseurl line instead. # #[base-source] nameCentOS-$releasever - Base Sources baseurlhttp://vault.centos.org/centos/$releasever/os/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#released updates [updates-source] nameCentOS-$releasever - Updates Sources baseurlhttp://vault.centos.org/centos/$releasever/updates/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that may be useful [extras-source] nameCentOS-$releasever - Extras Sources baseurlhttp://vault.centos.org/centos/$releasever/extras/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages [centosplus-source] nameCentOS-$releasever - Plus Sources baseurlhttp://vault.centos.org/centos/$releasever/centosplus/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 EOF;;esac }## 生成 CentOS Stream 官方 repo 源文件 function GenRepoFiles_CentOSStream() {case $1 in9)cat $Dir_YumRepos/centos.repo \EOF [baseos] nameCentOS Stream $releasever - BaseOS #baseurlhttps://mirror.stream.centos.org/$releasever-stream/BaseOS/$basearch/os/ metalinkhttps://mirrors.centos.org/metalink?repocentos-baseos-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled1[baseos-debug] nameCentOS Stream $releasever - BaseOS - Debug metalinkhttps://mirrors.centos.org/metalink?repocentos-baseos-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[baseos-source] nameCentOS Stream $releasever - BaseOS - Source metalinkhttps://mirrors.centos.org/metalink?repocentos-baseos-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[appstream] nameCentOS Stream $releasever - AppStream #baseurlhttps://mirror.stream.centos.org/$releasever-stream/AppStream/$basearch/os/ metalinkhttps://mirrors.centos.org/metalink?repocentos-appstream-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled1[appstream-debug] nameCentOS Stream $releasever - AppStream - Debug metalinkhttps://mirrors.centos.org/metalink?repocentos-appstream-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[appstream-source] nameCentOS Stream $releasever - AppStream - Source metalinkhttps://mirrors.centos.org/metalink?repocentos-appstream-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[crb] nameCentOS Stream $releasever - CRB #baseurlhttps://mirror.stream.centos.org/$releasever-stream/CRB/$basearch/os/ metalinkhttps://mirrors.centos.org/metalink?repocentos-crb-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled0[crb-debug] nameCentOS Stream $releasever - CRB - Debug metalinkhttps://mirrors.centos.org/metalink?repocentos-crb-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[crb-source] nameCentOS Stream $releasever - CRB - Source metalinkhttps://mirrors.centos.org/metalink?repocentos-crb-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 EOFcat $Dir_YumRepos/centos-addons.repo \EOF [highavailability] nameCentOS Stream $releasever - HighAvailability #baseurlhttps://mirror.stream.centos.org/$releasever-stream/HighAvailability/$basearch/os/ metalinkhttps://mirrors.centos.org/metalink?repocentos-highavailability-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled0[highavailability-debug] nameCentOS Stream $releasever - HighAvailability - Debug metalinkhttps://mirrors.centos.org/metalink?repocentos-highavailability-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[highavailability-source] nameCentOS Stream $releasever - HighAvailability - Source metalinkhttps://mirrors.centos.org/metalink?repocentos-highavailability-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[nfv] nameCentOS Stream $releasever - NFV #baseurlhttps://mirror.stream.centos.org/$releasever-stream/NFV/$basearch/os/ metalinkhttps://mirrors.centos.org/metalink?repocentos-nfv-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled0[nfv-debug] nameCentOS Stream $releasever - NFV - Debug metalinkhttps://mirrors.centos.org/metalink?repocentos-nfv-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[nfv-source] nameCentOS Stream $releasever - NFV - Source metalinkhttps://mirrors.centos.org/metalink?repocentos-nfv-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[rt] nameCentOS Stream $releasever - RT #baseurlhttps://mirror.stream.centos.org/$releasever-stream/RT/$basearch/os/ metalinkhttps://mirrors.centos.org/metalink?repocentos-rt-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled0[rt-debug] nameCentOS Stream $releasever - RT - Debug metalinkhttps://mirrors.centos.org/metalink?repocentos-rt-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[rt-source] nameCentOS Stream $releasever - RT - Source metalinkhttps://mirrors.centos.org/metalink?repocentos-rt-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[resilientstorage] nameCentOS Stream $releasever - ResilientStorage #baseurlhttps://mirror.stream.centos.org/$releasever-stream/ResilientStorage/$basearch/os/ metalinkhttps://mirrors.centos.org/metalink?repocentos-resilientstorage-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled0[resilientstorage-debug] nameCentOS Stream $releasever - ResilientStorage - Debug metalinkhttps://mirrors.centos.org/metalink?repocentos-resilientstorage-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[resilientstorage-source] nameCentOS Stream $releasever - ResilientStorage - Source metalinkhttps://mirrors.centos.org/metalink?repocentos-resilientstorage-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0[extras-common] nameCentOS Stream $releasever - Extras packages #baseurlhttps://mirror.stream.centos.org/SIGs/$releasever-stream/extras/$basearch/extras-common/ metalinkhttps://mirrors.centos.org/metalink?repocentos-extras-sig-extras-common-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled1[extras-common-source] nameCentOS Stream $releasever - Extras packages - Source metalinkhttps://mirrors.centos.org/metalink?repocentos-extras-sig-extras-common-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 EOF;;8)cat $Dir_YumRepos/CentOS-Stream-AppStream.repo \EOF # CentOS-Stream-AppStream.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[appstream] nameCentOS Stream $releasever - AppStream mirrorlisthttp://mirrorlist.centos.org/?release$streamarch$basearchrepoAppStreaminfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$stream/AppStream/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Stream-BaseOS.repo \EOF # CentOS-Stream-BaseOS.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[baseos] nameCentOS Stream $releasever - BaseOS mirrorlisthttp://mirrorlist.centos.org/?release$streamarch$basearchrepoBaseOSinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$stream/BaseOS/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Stream-Debuginfo.repo \EOF # CentOS-Stream-Debuginfo.repo # # All debug packages are merged into a single repo, split by basearch, and are # not signed.[debuginfo] nameCentOS Stream $releasever - Debuginfo baseurlhttp://debuginfo.centos.org/$stream/$basearch/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Stream-Extras-common.repo \EOF # CentOS-Stream-Extras-common.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[extras-common] nameCentOS Stream $releasever - Extras common packages mirrorlisthttp://mirrorlist.centos.org/?release$streamarch$basearchrepoextras-extras-common #baseurlhttp://mirror.centos.org/$contentdir/$stream/extras/$basearch/extras-common/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras EOFcat $Dir_YumRepos/CentOS-Stream-Extras.repo \EOF # CentOS-Stream-Extras.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[extras] nameCentOS Stream $releasever - Extras mirrorlisthttp://mirrorlist.centos.org/?release$streamarch$basearchrepoextrasinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$stream/extras/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Stream-HighAvailability.repo \EOF # CentOS-Stream-HighAvailability.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[ha] nameCentOS Stream $releasever - HighAvailability mirrorlisthttp://mirrorlist.centos.org/?release$streamarch$basearchrepoHighAvailabilityinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$stream/HighAvailability/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Stream-Media.repo \EOF # CentOS-Stream-Media.repo # # You can use this repo to install items directly off the installation media. # Verify your mount point matches one of the below file:// paths.[media-baseos] nameCentOS Stream $releasever - Media - BaseOS baseurlfile:///media/CentOS/BaseOSfile:///media/cdrom/BaseOSfile:///media/cdrecorder/BaseOS gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[media-appstream] nameCentOS Stream $releasever - Media - AppStream baseurlfile:///media/CentOS/AppStreamfile:///media/cdrom/AppStreamfile:///media/cdrecorder/AppStream gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Stream-NFV.repo \EOF # CentOS-Stream-NFV.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[nfv] nameCentOS Stream $releasever - NFV mirrorlisthttp://mirrorlist.centos.org/?release$streamarch$basearchrepoNFVinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$stream/NFV/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Stream-PowerTools.repo \EOF # CentOS-Stream-PowerTools.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[powertools] nameCentOS Stream $releasever - PowerTools mirrorlisthttp://mirrorlist.centos.org/?release$streamarch$basearchrepoPowerToolsinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$stream/PowerTools/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Stream-RealTime.repo \EOF # CentOS-Stream-RealTime.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[rt] nameCentOS Stream $releasever - RealTime mirrorlisthttp://mirrorlist.centos.org/?release$streamarch$basearchrepoRTinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$stream/RT/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Stream-ResilientStorage.repo \EOF # CentOS-Stream-ResilientStorage.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for CentOS updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[resilientstorage] nameCentOS Stream $releasever - ResilientStorage mirrorlisthttp://mirrorlist.centos.org/?release$streamarch$basearchrepoResilientStorageinfra$infra #baseurlhttp://mirror.centos.org/$contentdir/$stream/ResilientStorage/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOFcat $Dir_YumRepos/CentOS-Stream-Sources.repo \EOF # CentOS-Stream-Sources.repo[baseos-source] nameCentOS Stream $releasever - BaseOS - Source baseurlhttp://vault.centos.org/$contentdir/$stream/BaseOS/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[appstream-source] nameCentOS Stream $releasever - AppStream - Source baseurlhttp://vault.centos.org/$contentdir/$stream/AppStream/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[powertools-source] nameCentOS Stream $releasever - PowerTools - Source baseurlhttp://vault.centos.org/$contentdir/$stream/PowerTools/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[extras-source] nameCentOS Stream $releasever - Extras - Source baseurlhttp://vault.centos.org/$contentdir/$stream/extras/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[ha-source] nameCentOS Stream $releasever - HighAvailability - Source baseurlhttp://vault.centos.org/$contentdir/$stream/HighAvailability/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[rt-source] nameCentOS Stream $releasever - RT - Source baseurlhttp://vault.centos.org/$contentdir/$stream/RT/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[resilientstorage-source] nameCentOS Stream $releasever - ResilientStorage - Source baseurlhttp://vault.centos.org/$contentdir/$stream/ResilientStorage/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[nfv-source] nameCentOS Stream $releasever - NFV - Source baseurlhttp://vault.centos.org/$contentdir/$stream/NFV/Source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOF;;esac }## 生成 Rocky Linux 官方 repo 源文件 function GenRepoFiles_RockyLinux() {case $1 in9)cat $Dir_YumRepos/rocky.repo \EOF # rocky.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[baseos] nameRocky Linux $releasever - BaseOS mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoBaseOS-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/os/ gpgcheck1 enabled1 countme1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[baseos-debug] nameRocky Linux $releasever - BaseOS - Debug mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoBaseOS-$releasever-debug$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/debug/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[baseos-source] nameRocky Linux $releasever - BaseOS - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoBaseOS-$releasever-source$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/BaseOS/source/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[appstream] nameRocky Linux $releasever - AppStream mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoAppStream-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/AppStream/$basearch/os/ gpgcheck1 enabled1 countme1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[appstream-debug] nameRocky Linux $releasever - AppStream - Debug mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoAppStream-$releasever-debug$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/AppStream/$basearch/debug/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[appstream-source] nameRocky Linux $releasever - AppStream - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoAppStream-$releasever-source$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/AppStream/source/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[crb] nameRocky Linux $releasever - CRB mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoCRB-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/CRB/$basearch/os/ gpgcheck1 enabled0 countme1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[crb-debug] nameRocky Linux $releasever - CRB - Debug mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoCRB-$releasever-debug$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/CRB/$basearch/debug/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[crb-source] nameRocky Linux $releasever - CRB - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoCRB-$releasever-source$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/CRB/source/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9 EOFcat $Dir_YumRepos/rocky-addons.repo \EOF # rocky-addons.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[highavailability] nameRocky Linux $releasever - High Availability mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoHighAvailability-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/HighAvailability/$basearch/os/ gpgcheck1 enabled0 countme1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[highavailability-debug] nameRocky Linux $releasever - High Availability - Debug mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoHighAvailability-$releasever-debug$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/HighAvailability/$basearch/debug/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[highavailability-source] nameRocky Linux $releasever - High Availability - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoHighAvailability-$releasever-source$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/HighAvailability/source/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[resilientstorage] nameRocky Linux $releasever - Resilient Storage mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoResilientStorage-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/ResilientStorage/$basearch/os/ gpgcheck1 enabled0 countme1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[resilientstorage-debug] nameRocky Linux $releasever - Resilient Storage - Debug mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoResilientStorage-$releasever-debug$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/ResilientStorage/$basearch/debug/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[resilientstorage-source] nameRocky Linux $releasever - Resilient Storage - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoResilientStorage-$releasever-source$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/ResilientStorage/source/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[nfv] nameRocky Linux $releasever - NFV mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoNFV-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/NFV/$basearch/os/ gpgcheck1 enabled0 countme1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[nfv-debug] nameRocky Linux $releasever - NFV Debug mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoRT-$releasever-debug$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/NFV/$basearch/debug/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[nfv-source] nameRocky Linux $releasever - NFV Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoRT-$releasever-source$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/NFV/source/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[rt] nameRocky Linux $releasever - Realtime mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoRT-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/RT/$basearch/os/ gpgcheck1 enabled0 countme1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[rt-debug] nameRocky Linux $releasever - Realtime Debug mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoRT-$releasever-debug$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/RT/$basearch/debug/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[rt-source] nameRocky Linux $releasever - Realtime Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoRT-$releasever-source$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/RT/source/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[sap] nameRocky Linux $releasever - SAP mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoSAP-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/SAP/$basearch/os/ gpgcheck1 enabled0 countme1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[sap-debug] nameRocky Linux $releasever - SAP Debug mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoSAP-$releasever-debug$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/SAP/$basearch/debug/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[sap-source] nameRocky Linux $releasever - SAP Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoSAP-$releasever-source$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/SAP/source/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[saphana] nameRocky Linux $releasever - SAPHANA mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoSAPHANA-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/SAPHANA/$basearch/os/ gpgcheck1 enabled0 countme1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[saphana-debug] nameRocky Linux $releasever - SAPHANA Debug mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoSAPHANA-$releasever-debug$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/SAPHANA/$basearch/debug/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[saphana-source] nameRocky Linux $releasever - SAPHANA Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoSAPHANA-$releasever-source$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/SAPHANA/source/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9 EOFcat $Dir_YumRepos/rocky-devel.repo \EOF # rocky-devel.repo # # devel and no-package-left-behind[devel] nameRocky Linux $releasever - Devel WARNING! FOR BUILDROOT ONLY DO NOT LEAVE ENABLED mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepodevel-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/devel/$basearch/os/ gpgcheck1 enabled0 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9 EOFcat $Dir_YumRepos/rocky-extras.repo \EOF # rocky-extras.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[extras] nameRocky Linux $releasever - Extras mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoextras-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/extras/$basearch/os/ gpgcheck1 enabled1 countme1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[extras-debug] nameRocky Linux $releasever - Extras Debug mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoextras-$releasever-debug$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/extras/$basearch/debug/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[extras-source] nameRocky Linux $releasever - Extras Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoextras-$releasever-source$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/extras/source/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[plus] nameRocky Linux $releasever - Plus mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoplus-$releasever$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/plus/$basearch/os/ gpgcheck1 enabled0 countme1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[plus-debug] nameRocky Linux $releasever - Plus - Debug mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoplus-$releasever-debug$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/plus/$basearch/debug/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[plus-source] nameRocky Linux $releasever - Plus - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoplus-$releasever-source$rltype #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/plus/source/tree/ gpgcheck1 enabled0 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9 EOF;;8)cat $Dir_YumRepos/Rocky-AppStream.repo \EOF # Rocky-AppStream.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[appstream] nameRocky Linux $releasever - AppStream mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoAppStream-$releasever #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/AppStream/$basearch/os/ gpgcheck1 enabled1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-BaseOS.repo \EOF # Rocky-BaseOS.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[baseos] nameRocky Linux $releasever - BaseOS mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoBaseOS-$releasever #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/os/ gpgcheck1 enabled1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-Debuginfo.repo \EOF # Rocky-Debuginfo.repo #[baseos-debug] nameRocky Linux $releasever - BaseOS - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoBaseOS-$releasever-debug #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial[appstream-debug] nameRocky Linux $releasever - AppStream - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoAppStream-$releasever-debug #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/AppStream/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial[ha-debug] nameRocky Linux $releasever - High Availability - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoHighAvailability-$releasever-debug #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/HighAvailability/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial[powertools-debug] nameRocky Linux $releasever - PowerTools - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoPowerTools-$releasever-debug #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/PowerTools/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial[resilient-storage-debug] nameRocky Linux $releasever - Resilient Storage - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoResilientStorage-$releasever-debug #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/ResilientStorage/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-Devel.repo \EOF # Rocky-Devel.repo #[devel] nameRocky Linux $releasever - Devel WARNING! FOR BUILDROOT AND KOJI USE mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoDevel-$releasever #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/Devel/$basearch/os/ gpgcheck1 enabled0 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-Extras.repo \EOF # Rocky-Extras.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[extras] nameRocky Linux $releasever - Extras mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoextras-$releasever #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/extras/$basearch/os/ gpgcheck1 enabled1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-HighAvailability.repo \EOF # Rocky-HighAvailability.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[ha] nameRocky Linux $releasever - HighAvailability mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoHighAvailability-$releasever #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/HighAvailability/$basearch/os/ gpgcheck1 enabled0 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-Media.repo \EOF # Rocky-Media.repo # # You can use this repo to install items directly off the installation media. # Verify your mount point matches one of the below file:// paths.[media-baseos] nameRocky Linux $releasever - Media - BaseOS baseurlfile:///media/Rocky/BaseOSfile:///media/cdrom/BaseOSfile:///media/cdrecorder/BaseOS gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial[media-appstream] nameRocky Linux $releasever - Media - AppStream baseurlfile:///media/Rocky/AppStreamfile:///media/cdrom/AppStreamfile:///media/cdrecorder/AppStream gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-NFV.repo \EOF # Rocky-NFV.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[nfv] nameRocky Linux $releasever - NFV mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoNFV-$releasever #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/nfv/$basearch/os/ gpgcheck1 enabled0 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-Plus.repo \EOF # Rocky-Plus.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[plus] nameRocky Linux $releasever - Plus mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchreporockyplus-$releasever #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/plus/$basearch/os/ gpgcheck1 enabled0 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-PowerTools.repo \EOF # Rocky-PowerTools.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[powertools] nameRocky Linux $releasever - PowerTools mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoPowerTools-$releasever #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/PowerTools/$basearch/os/ gpgcheck1 enabled0 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-ResilientStorage.repo \EOF # Rocky-ResilientStorage.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[resilient-storage] nameRocky Linux $releasever - ResilientStorage mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoResilientStorage-$releasever #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/ResilientStorage/$basearch/os/ gpgcheck1 enabled0 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-RT.repo \EOF # Rocky-RT.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead.[rt] nameRocky Linux $releasever - Realtime mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?arch$basearchrepoRT-$releasever #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/RT/$basearch/os/ gpgcheck1 enabled0 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOFcat $Dir_YumRepos/Rocky-Sources.repo \EOF # Rocky-Sources.repo[baseos-source] nameRocky Linux $releasever - BaseOS - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoBaseOS-$releasever-source #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/BaseOS/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial[appstream-source] nameRocky Linux $releasever - AppStream - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoAppStream-$releasever-source #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/AppStream/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial#[extras-source] #nameRocky Linux $releasever - Extras - Source #mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoextras-$releasever-source #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/extras/source/tree/ #gpgcheck1 #enabled0 #gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial#[plus-source] #nameRocky Linux $releasever - Plus - Source #mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoplus-$releasever-source #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/Plus/source/tree/ #gpgcheck1 #enabled0 #gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial[ha-source] nameRocky Linux $releasever - High Availability - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoHighAvailability-$releasever-source #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/HighAvailability/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial[powertools-source] nameRocky Linux $releasever - PowerTools - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoPowerTools-$releasever-source #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/PowerTools/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial[resilient-storage-source] nameRocky Linux $releasever - Resilient Storage - Source mirrorlisthttps://mirrors.rockylinux.org/mirrorlist?archsourcerepoResilientStorage-$releasever-source #baseurlhttp://dl.rockylinux.org/$contentdir/$releasever/ResilientStorage/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial EOF;;esac }## 生成 AlmaLinux 官方 repo 源文件 function GenRepoFiles_AlmaLinux() {case $1 in9)cat $Dir_YumRepos/almalinux-appstream.repo \EOF [appstream] nameAlmaLinux $releasever - AppStream mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/appstream # baseurlhttps://repo.almalinux.org/almalinux/$releasever/AppStream/$basearch/os/ enabled1 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata1[appstream-debug] nameAlmaLinux $releasever - AppStream - Debug mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/appstream-debug # baseurlhttps://repo.almalinux.org/vault/$releasever/AppStream/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[appstream-source] nameAlmaLinux $releasever - AppStream - Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/appstream-source # baseurlhttps://repo.almalinux.org/vault/$releasever/AppStream/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0 EOFcat $Dir_YumRepos/almalinux-baseos.repo \EOF [baseos] nameAlmaLinux $releasever - BaseOS mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/baseos # baseurlhttps://repo.almalinux.org/almalinux/$releasever/BaseOS/$basearch/os/ enabled1 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata1[baseos-debug] nameAlmaLinux $releasever - BaseOS - Debug mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/baseos-debug # baseurlhttps://repo.almalinux.org/vault/$releasever/BaseOS/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[baseos-source] nameAlmaLinux $releasever - BaseOS - Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/baseos-source # baseurlhttps://repo.almalinux.org/vault/$releasever/BaseOS/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0 EOFcat $Dir_YumRepos/almalinux-crb.repo \EOF [crb] nameAlmaLinux $releasever - CRB mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/crb # baseurlhttps://repo.almalinux.org/almalinux/$releasever/CRB/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[crb-debug] nameAlmaLinux $releasever - CRB - Debug mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/crb-debug # baseurlhttps://repo.almalinux.org/vault/$releasever/CRB/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[crb-source] nameAlmaLinux $releasever - CRB - Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/crb-source # baseurlhttps://repo.almalinux.org/vault/$releasever/CRB/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0 EOFcat $Dir_YumRepos/almalinux-extras.repo \EOF [extras] nameAlmaLinux $releasever - Extras mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/extras # baseurlhttps://repo.almalinux.org/almalinux/$releasever/extras/$basearch/os/ enabled1 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[extras-debug] nameAlmaLinux $releasever - Extras - Debug mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/extras-debug # baseurlhttps://repo.almalinux.org/vault/$releasever/extras/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[extras-source] nameAlmaLinux $releasever - Extras - Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/extras-source # baseurlhttps://repo.almalinux.org/vault/$releasever/extras/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0 EOFcat $Dir_YumRepos/almalinux-highavailability.repo \EOF [highavailability] nameAlmaLinux $releasever - HighAvailability mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/highavailability # baseurlhttps://repo.almalinux.org/almalinux/$releasever/HighAvailability/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[highavailability-debug] nameAlmaLinux $releasever - HighAvailability - Debug mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/highavailability-debug # baseurlhttps://repo.almalinux.org/vault/$releasever/HighAvailability/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[highavailability-source] nameAlmaLinux $releasever - HighAvailability - Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/highavailability-source # baseurlhttps://repo.almalinux.org/vault/$releasever/HighAvailability/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0 EOFcat $Dir_YumRepos/almalinux-nfv.repo \EOF [nfv] nameAlmaLinux $releasever - NFV mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/nfv # baseurlhttps://repo.almalinux.org/almalinux/$releasever/NFV/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[nfv-debug] nameAlmaLinux $releasever - NFV - Debug mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/nfv-debug # baseurlhttps://repo.almalinux.org/vault/$releasever/NFV/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[nfv-source] nameAlmaLinux $releasever - NFV - Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/nfv-source # baseurlhttps://repo.almalinux.org/vault/$releasever/NFV/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0 EOFcat $Dir_YumRepos/almalinux-plus.repo \EOF [plus] nameAlmaLinux $releasever - Plus mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/plus # baseurlhttps://repo.almalinux.org/almalinux/$releasever/plus/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[plus-debug] nameAlmaLinux $releasever - Plus - Debug mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/plus-debug # baseurlhttps://repo.almalinux.org/vault/$releasever/plus/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[plus-source] nameAlmaLinux $releasever - Plus - Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/plus-source # baseurlhttps://repo.almalinux.org/vault/$releasever/plus/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0 EOFcat $Dir_YumRepos/almalinux-resilientstorage.repo \EOF [resilientstorage] nameAlmaLinux $releasever - ResilientStorage mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/resilientstorage # baseurlhttps://repo.almalinux.org/almalinux/$releasever/ResilientStorage/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[resilientstorage-debug] nameAlmaLinux $releasever - ResilientStorage - Debug mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/resilientstorage-debug # baseurlhttps://repo.almalinux.org/vault/$releasever/ResilientStorage/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[resilientstorage-source] nameAlmaLinux $releasever - ResilientStorage - Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/resilientstorage-source # baseurlhttps://repo.almalinux.org/vault/$releasever/ResilientStorage/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0 EOFcat $Dir_YumRepos/almalinux-rt.repo \EOF [rt] nameAlmaLinux $releasever - RT mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/rt # baseurlhttps://repo.almalinux.org/almalinux/$releasever/RT/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[rt-debug] nameAlmaLinux $releasever - RT - Debug mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/rt-debug # baseurlhttps://repo.almalinux.org/vault/$releasever/RT/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[rt-source] nameAlmaLinux $releasever - RT - Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/rt-source # baseurlhttps://repo.almalinux.org/vault/$releasever/RT/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0 EOFcat $Dir_YumRepos/almalinux-sap.repo \EOF [sap] nameAlmaLinux $releasever - SAP mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/sap # baseurlhttps://repo.almalinux.org/almalinux/$releasever/SAP/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[sap-debug] nameAlmaLinux $releasever - SAP - Debug mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/sap-debug # baseurlhttps://repo.almalinux.org/vault/$releasever/SAP/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[sap-source] nameAlmaLinux $releasever - SAP - Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/sap-source # baseurlhttps://repo.almalinux.org/vault/$releasever/SAP/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0 EOFcat $Dir_YumRepos/almalinux-saphana.repo \EOF [saphana] nameAlmaLinux $releasever - SAPHANA mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/saphana # baseurlhttps://repo.almalinux.org/almalinux/$releasever/SAPHANA/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[saphana-debug] nameAlmaLinux $releasever - SAPHANA - Debug mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/saphana-debug # baseurlhttps://repo.almalinux.org/vault/$releasever/SAPHANA/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0[saphana-source] nameAlmaLinux $releasever - SAPHANA - Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/saphana-source # baseurlhttps://repo.almalinux.org/vault/$releasever/SAPHANA/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 metadata_expire86400 enabled_metadata0 EOF;;8)cat $Dir_YumRepos/almalinux-ha.repo \EOF # almalinux-ha.repo[ha] nameAlmaLinux $releasever - HighAvailability mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/ha # baseurlhttps://repo.almalinux.org/almalinux/$releasever/HighAvailability/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Sources [ha-source] nameAlmaLinux $releasever - HighAvailability Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/ha-source # baseurlhttps://repo.almalinux.org/vault/$releasever/HighAvailability/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Debuginfo [ha-debuginfo] nameAlmaLinux $releasever - HighAvailability debuginfo mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/ha-debuginfo # baseurlhttps://repo.almalinux.org/vault/$releasever/HighAvailability/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux EOFcat $Dir_YumRepos/almalinux-nfv.repo \EOF # almalinux-nfv.repo[nfv] nameAlmaLinux $releasever - Real Time for NFV mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/nfv # baseurlhttps://repo.almalinux.org/almalinux/$releasever/NFV/$basearch/os/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Sources [nfv-source] nameAlmaLinux $releasever - Real Time for NFV Sources mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/nfv-source # baseurlhttps://repo.almalinux.org/vault/$releasever/NFV/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Debuginfo [nfv-debuginfo] nameAlmaLinux $releasever - Real Time for NFV Debuginfo mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/nfv-debuginfo # baseurlhttps://repo.almalinux.org/vault/$releasever/NFV/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux EOFcat $Dir_YumRepos/almalinux-plus.repo \EOF # almalinux-plus.repo[plus] nameAlmaLinux $releasever - Plus mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/plus # baseurlhttps://repo.almalinux.org/almalinux/$releasever/plus/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Sources [plus-source] nameAlmaLinux $releasever - Plus Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/plus-source # baseurlhttps://repo.almalinux.org/vault/$releasever/plus/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Debuginfo [plus-debuginfo] nameAlmaLinux $releasever - Plus debuginfo mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/plus-debuginfo # baseurlhttps://repo.almalinux.org/vault/$releasever/plus/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux EOFcat $Dir_YumRepos/almalinux-powertools.repo \EOF # almalinux-powertools.repo[powertools] nameAlmaLinux $releasever - PowerTools mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/powertools # baseurlhttps://repo.almalinux.org/almalinux/$releasever/PowerTools/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Sources [powertools-source] nameAlmaLinux $releasever - PowerTools Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/powertools-source # baseurlhttps://repo.almalinux.org/vault/$releasever/PowerTools/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Debuginfo [powertools-debuginfo] nameAlmaLinux $releasever - PowerTools debuginfo mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/powertools-debuginfo # baseurlhttps://repo.almalinux.org/vault/$releasever/PowerTools/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux EOFcat $Dir_YumRepos/almalinux-resilientstorage.repo \EOF # almalinux-resilientstorage.repo[resilientstorage] nameAlmaLinux $releasever - ResilientStorage mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/resilientstorage # baseurlhttps://repo.almalinux.org/almalinux/$releasever/ResilientStorage/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Sources [resilientstorage-source] nameAlmaLinux $releasever - ResilientStorage Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/resilientstorage-source # baseurlhttps://repo.almalinux.org/vault/$releasever/ResilientStorage/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Debuginfo [resilientstorage-debuginfo] nameAlmaLinux $releasever - ResilientStorage debuginfo mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/resilientstorage-debuginfo # baseurlhttps://repo.almalinux.org/vault/$releasever/ResilientStorage/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux EOFcat $Dir_YumRepos/almalinux-rt.repo \EOF # almalinux-rt.repo[rt] nameAlmaLinux $releasever - Real Time mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/rt # baseurlhttps://repo.almalinux.org/almalinux/$releasever/RT/$basearch/os/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Sources [rt-source] nameAlmaLinux $releasever - Real Time Sources mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/rt-source # baseurlhttps://repo.almalinux.org/vault/$releasever/RT/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Debuginfo [rt-debuginfo] nameAlmaLinux $releasever - Real Time Debuginfo mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/rt-debuginfo # baseurlhttps://repo.almalinux.org/vault/$releasever/RT/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux EOFcat $Dir_YumRepos/almalinux-sap.repo \EOF # almalinux-sap.repo[sap] nameAlmaLinux $releasever - SAP mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/sap # baseurlhttps://repo.almalinux.org/almalinux/$releasever/SAP/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Sources [sap-source] nameAlmaLinux $releasever - SAP Sources mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/sap-source # baseurlhttps://repo.almalinux.org/vault/$releasever/SAP/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Debuginfo [sap-debuginfo] nameAlmaLinux $releasever - SAP Debuginfo mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/sap-debuginfo # baseurlhttps://repo.almalinux.org/vault/$releasever/SAP/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux EOFcat $Dir_YumRepos/almalinux-saphana.repo \EOF # almalinux-saphana.repo[saphana] nameAlmaLinux $releasever - SAP HANA mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/saphana # baseurlhttps://repo.almalinux.org/almalinux/$releasever/SAPHANA/$basearch/os/ enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Sources [saphana-source] nameAlmaLinux $releasever - SAP HANA Sources mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/saphana-source # baseurlhttps://repo.almalinux.org/vault/$releasever/SAPHANA/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Debuginfo [saphana-debuginfo] nameAlmaLinux $releasever - SAP HANA Debuginfo mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/saphana-debuginfo # baseurlhttps://repo.almalinux.org/vault/$releasever/SAPHANA/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux EOFcat $Dir_YumRepos/almalinux.repo \EOF # almalinux.repo[baseos] nameAlmaLinux $releasever - BaseOS mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/baseos # baseurlhttps://repo.almalinux.org/almalinux/$releasever/BaseOS/$basearch/os/ enabled1 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux[appstream] nameAlmaLinux $releasever - AppStream mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/appstream # baseurlhttps://repo.almalinux.org/almalinux/$releasever/AppStream/$basearch/os/ enabled1 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux[extras] nameAlmaLinux $releasever - Extras mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/extras # baseurlhttps://repo.almalinux.org/almalinux/$releasever/extras/$basearch/os/ enabled1 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Sources [baseos-source] nameAlmaLinux $releasever - BaseOS Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/baseos-source # baseurlhttps://repo.almalinux.org/vault/$releasever/BaseOS/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux[appstream-source] nameAlmaLinux $releasever - AppStream Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/appstream-source # baseurlhttps://repo.almalinux.org/vault/$releasever/AppStream/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux[extras-source] nameAlmaLinux $releasever - Extras Source mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/extras-source # baseurlhttps://repo.almalinux.org/vault/$releasever/extras/Source/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux## Debuginfo [baseos-debuginfo] nameAlmaLinux $releasever - BaseOS debuginfo mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/baseos-debuginfo # baseurlhttps://repo.almalinux.org/vault/$releasever/BaseOS/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux[appstream-debuginfo] nameAlmaLinux $releasever - AppStream debuginfo mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/appstream-debuginfo # baseurlhttps://repo.almalinux.org/vault/$releasever/AppStream/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux[extras-debuginfo] nameAlmaLinux $releasever - Extras debuginfo mirrorlisthttps://mirrors.almalinux.org/mirrorlist/$releasever/extras-debuginfo # baseurlhttps://repo.almalinux.org/vault/$releasever/extras/debug/$basearch/ enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux EOF;;esac }## 生成 Fedora 官方 repo 源文件 function GenRepoFiles_Fedora() {cat $Dir_YumRepos/fedora-cisco-openh264.repo \EOF [fedora-cisco-openh264] nameFedora $releasever openh264 (From Cisco) - $basearch metalinkhttps://mirrors.fedoraproject.org/metalink?repofedora-cisco-openh264-$releaseverarch$basearch typerpm enabled1 metadata_expire14d repo_gpgcheck0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableTrue[fedora-cisco-openh264-debuginfo] nameFedora $releasever openh264 (From Cisco) - $basearch - Debug metalinkhttps://mirrors.fedoraproject.org/metalink?repofedora-cisco-openh264-debug-$releaseverarch$basearch typerpm enabled0 metadata_expire14d repo_gpgcheck0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableTrue EOFcat $Dir_YumRepos/fedora.repo \EOF [fedora] nameFedora $releasever - $basearch #baseurlhttp://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ metalinkhttps://mirrors.fedoraproject.org/metalink?repofedora-$releaseverarch$basearch enabled1 countme1 metadata_expire7d repo_gpgcheck0 typerpm gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[fedora-debuginfo] nameFedora $releasever - $basearch - Debug #baseurlhttp://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repofedora-debug-$releaseverarch$basearch enabled0 metadata_expire7d repo_gpgcheck0 typerpm gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[fedora-source] nameFedora $releasever - Source #baseurlhttp://download.example/pub/fedora/linux/releases/$releasever/Everything/source/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repofedora-source-$releaseverarch$basearch enabled0 metadata_expire7d repo_gpgcheck0 typerpm gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse EOFcat $Dir_YumRepos/fedora-updates.repo \EOF [updates] nameFedora $releasever - $basearch - Updates #baseurlhttp://download.example/pub/fedora/linux/updates/$releasever/Everything/$basearch/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-released-f$releaseverarch$basearch enabled1 countme1 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[updates-debuginfo] nameFedora $releasever - $basearch - Updates - Debug #baseurlhttp://download.example/pub/fedora/linux/updates/$releasever/Everything/$basearch/debug/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-released-debug-f$releaseverarch$basearch enabled0 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[updates-source] nameFedora $releasever - Updates Source #baseurlhttp://download.example/pub/fedora/linux/updates/$releasever/Everything/SRPMS/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-released-source-f$releaseverarch$basearch enabled0 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse EOFcat $Dir_YumRepos/fedora-modular.repo \EOF [fedora-modular] nameFedora Modular $releasever - $basearch #baseurlhttp://download.example/pub/fedora/linux/releases/$releasever/Modular/$basearch/os/ metalinkhttps://mirrors.fedoraproject.org/metalink?repofedora-modular-$releaseverarch$basearch enabled1 countme1 #metadata_expire7d repo_gpgcheck0 typerpm gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[fedora-modular-debuginfo] nameFedora Modular $releasever - $basearch - Debug #baseurlhttp://download.example/pub/fedora/linux/releases/$releasever/Modular/$basearch/debug/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repofedora-modular-debug-$releaseverarch$basearch enabled0 metadata_expire7d repo_gpgcheck0 typerpm gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[fedora-modular-source] nameFedora Modular $releasever - Source #baseurlhttp://download.example/pub/fedora/linux/releases/$releasever/Modular/source/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repofedora-modular-source-$releaseverarch$basearch enabled0 metadata_expire7d repo_gpgcheck0 typerpm gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse EOFcat $Dir_YumRepos/fedora-updates-modular.repo \EOF [updates-modular] nameFedora Modular $releasever - $basearch - Updates #baseurlhttp://download.example/pub/fedora/linux/updates/$releasever/Modular/$basearch/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-released-modular-f$releaseverarch$basearch enabled1 countme1 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[updates-modular-debuginfo] nameFedora Modular $releasever - $basearch - Updates - Debug #baseurlhttp://download.example/pub/fedora/linux/updates/$releasever/Modular/$basearch/debug/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-released-modular-debug-f$releaseverarch$basearch enabled0 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[updates-modular-source] nameFedora Modular $releasever - Updates Source #baseurlhttp://download.example/pub/fedora/linux/updates/$releasever/Modular/SRPMS/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-released-modular-source-f$releaseverarch$basearch enabled0 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse EOFcat $Dir_YumRepos/fedora-updates-testing.repo \EOF [updates-testing] nameFedora $releasever - $basearch - Test Updates #baseurlhttp://download.example/pub/fedora/linux/updates/testing/$releasever/Everything/$basearch/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-testing-f$releaseverarch$basearch enabled0 countme1 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[updates-testing-debuginfo] nameFedora $releasever - $basearch - Test Updates Debug #baseurlhttp://download.example/pub/fedora/linux/updates/testing/$releasever/Everything/$basearch/debug/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-testing-debug-f$releaseverarch$basearch enabled0 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[updates-testing-source] nameFedora $releasever - Test Updates Source #baseurlhttp://download.example/pub/fedora/linux/updates/testing/$releasever/Everything/SRPMS/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-testing-source-f$releaseverarch$basearch enabled0 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse EOFcat $Dir_YumRepos/fedora-updates-testing-modular.repo \EOF [updates-testing-modular] nameFedora Modular $releasever - $basearch - Test Updates #baseurlhttp://download.example/pub/fedora/linux/updates/testing/$releasever/Modular/$basearch/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-testing-modular-f$releaseverarch$basearch enabled0 countme1 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[updates-testing-modular-debuginfo] nameFedora Modular $releasever - $basearch - Test Updates Debug #baseurlhttp://download.example/pub/fedora/linux/updates/$releasever/Modular/$basearch/debug/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-testing-modular-debug-f$releaseverarch$basearch enabled0 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse[updates-testing-modular-source] nameFedora Modular $releasever - Test Updates Source #baseurlhttp://download.example/pub/fedora/linux/updates/$releasever/Modular/SRPMS/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoupdates-testing-modular-source-f$releaseverarch$basearch enabled0 repo_gpgcheck0 typerpm gpgcheck1 metadata_expire6h gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailableFalse EOF }## 生成 OpenCloudOS 官方 repo 源文件 function GenRepoFiles_OpenCloudOS() {case $1 in9)cat $Dir_YumRepos/OpenCloudOS.repo \EOF [BaseOS] nameBaseOS $releasever - $basearch baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/BaseOS/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS-9[AppStream] nameAppStream $releasever - $basearch baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/AppStream/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS-9[extras] nameextras $releasever - $basearch baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/extras/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS-9[BaseOS-debuginfo] nameBaseOS-debuginfo $releasever - $basearch baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/BaseOS/$basearch/debug/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS-9[AppStream-debuginfo] nameAppStream-debuginfo $releasever - $basearch baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/AppStream/$basearch/debug/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS-9[extras-debuginfo] nameextras-debuginfo $releasever - $basearch baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/extras/$basearch/debug/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS-9[BaseOS-source] nameBaseOS-source $releasever baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/BaseOS/source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS-9[AppStream-source] nameAppStream-source $releasever baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/AppStream/source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS-9[extras-source] nameextras-source $releasever baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/extras/source/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS-9 EOF;;8)cat $Dir_YumRepos/OpenCloudOS-Debuginfo.repo \EOF # OpenCloudOS-Debuginfo.repo # # Author: OpenCloudOS infrastructureopencloudos.tech # [BaseOS-debuginfo] nameOpenCloudOS $releasever - BaseOS-debuginfo baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/BaseOS/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[AppStream-debuginfo] nameOpenCloudOS $releasever - AppStream-debuginfo baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/AppStream/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[Extras-debuginfo] nameOpenCloudOS $releasever - Extras-debuginfo baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/Extras/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[HighAvailability-debuginfo] nameOpenCloudOS $releasever - HighAvailability-debuginfo baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/HighAvailability/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[PowerTools-debuginfo] nameOpenCloudOS $releasever - PowerTools-debuginfo baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/PowerTools/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[ResilientStorage-debuginfo] nameOpenCloudOS $releasever - ResilientStorage-debuginfo baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/ResilientStorage/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[Plus-debuginfo] nameOpenCloudOS $releasever - Plus-debuginfo baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/Plus/$basearch/debug/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS EOFcat $Dir_YumRepos/OpenCloudOS.repo \EOF # OpenCloudOS.repo # # Author: OpenCloudOS infrastructureopencloudos.tech # [BaseOS] nameOpenCloudOS $releasever - BaseOS baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/BaseOS/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[AppStream] nameOpenCloudOS $releasever - AppStream baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/AppStream/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[Extras] nameOpenCloudOS $releasever - Extras baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/Extras/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[HighAvailability] nameOpenCloudOS $releasever - HighAvailability baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/HighAvailability/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[PowerTools] nameOpenCloudOS $releasever - PowerTools baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/PowerTools/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[ResilientStorage] nameOpenCloudOS $releasever - ResilientStorage baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/ResilientStorage/$basearch/os/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[Plus] nameOpenCloudOS $releasever - Plus baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/Plus/$basearch/os/ gpgcheck1 enabled1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS EOFcat $Dir_YumRepos/OpenCloudOS-Sources.repo \EOF # OpenCloudOS-Sources.repo # # Author: OpenCloudOS infrastructureopencloudos.tech # [BaseOS-source] nameOpenCloudOS $releasever - Base-source baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/BaseOS/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[AppStream-source] nameOpenCloudOS $releasever - AppStream-source baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/AppStream/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[Extras-source] nameOpenCloudOS $releasever - Extras-source baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/Extras/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[HighAvailability-source] nameOpenCloudOS $releasever - HighAvailability-source baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/HighAvailability/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[PowerTools-source] nameOpenCloudOS $releasever - PowerTools-source baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/PowerTools/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[ResilientStorage-source] nameOpenCloudOS $releasever - ResilientStorage-source baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/ResilientStorage/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS[Plus-source] nameOpenCloudOS $releasever - Plus-source baseurlhttps://mirrors.opencloudos.tech/opencloudos/$releasever/Plus/source/tree/ gpgcheck1 enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenCloudOS EOF;;esac }## 生成 openEuler 官方 repo 源文件 function GenRepoFiles_openEuler() {cat $Dir_YumRepos/openEuler.repo \EOF [OS] nameOS baseurlhttp://repo.openeuler.org/openEuler-$releasever/OS/$basearch/ enabled1 gpgcheck1 gpgkeyhttp://repo.openeuler.org/openEuler-$releasever/OS/$basearch/RPM-GPG-KEY-openEuler[everything] nameeverything baseurlhttp://repo.openeuler.org/openEuler-$releasever/everything/$basearch/ enabled1 gpgcheck1 gpgkeyhttp://repo.openeuler.org/openEuler-$releasever/everything/$basearch/RPM-GPG-KEY-openEuler[EPOL] nameEPOL baseurlhttp://repo.openeuler.org/openEuler-$releasever/EPOL/main/$basearch/ enabled1 gpgcheck1 gpgkeyhttp://repo.openeuler.org/openEuler-$releasever/OS/$basearch/RPM-GPG-KEY-openEuler[debuginfo] namedebuginfo baseurlhttp://repo.openeuler.org/openEuler-$releasever/debuginfo/$basearch/ enabled1 gpgcheck1 gpgkeyhttp://repo.openeuler.org/openEuler-$releasever/debuginfo/$basearch/RPM-GPG-KEY-openEuler[source] namesource baseurlhttp://repo.openeuler.org/openEuler-$releasever/source/ enabled1 gpgcheck1 gpgkeyhttp://repo.openeuler.org/openEuler-$releasever/source/RPM-GPG-KEY-openEuler[update] nameupdate baseurlhttp://repo.openeuler.org/openEuler-$releasever/update/$basearch/ enabled1 gpgcheck1 gpgkeyhttp://repo.openeuler.org/openEuler-$releasever/OS/$basearch/RPM-GPG-KEY-openEuler[update-source] nameupdate-source baseurlhttp://repo.openeuler.org/openEuler-$releasever/update/source/ enabled1 gpgcheck1 gpgkeyhttp://repo.openeuler.org/openEuler-$releasever/source/RPM-GPG-KEY-openEuler EOF }## 生成 openSUSE 官方 repo 源文件 function GenRepoFiles_openSUSE() {case $1 inleap)case $2 in15.[0-2])cat $Dir_openSUSERepos/repo-debug-non-oss.repo \EOF [repo-debug-non-oss] nameDebug Repository (Non-OSS) enabled0 autorefresh1 baseurlhttp://download.opensuse.org/debug/distribution/leap/$releasever/repo/non-oss/ typeNONE keeppackages0 EOFcat $Dir_openSUSERepos/repo-debug.repo \EOF [repo-debug] nameDebug Repository enabled0 autorefresh1 baseurlhttp://download.opensuse.org/debug/distribution/leap/$releasever/repo/oss/ typeNONE keeppackages0 EOFcat $Dir_openSUSERepos/repo-debug-update-non-oss.repo \EOF [repo-debug-update-non-oss] nameUpdate Repository (Debug, Non-OSS) enabled0 autorefresh1 baseurlhttp://download.opensuse.org/debug/update/leap/$releasever/non-oss/ typeNONE keeppackages0 EOFcat $Dir_openSUSERepos/repo-debug-update.repo \EOF [repo-debug-update] nameUpdate Repository (Debug) enabled0 autorefresh1 baseurlhttp://download.opensuse.org/debug/update/leap/$releasever/oss/ typeNONE keeppackages0 EOFcat $Dir_openSUSERepos/repo-non-oss.repo \EOF [repo-non-oss] nameNon-OSS Repository enabled1 autorefresh1 baseurlhttp://download.opensuse.org/distribution/leap/$releasever/repo/non-oss/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-oss.repo \EOF [repo-oss] nameMain Repository enabled1 autorefresh1 baseurlhttp://download.opensuse.org/distribution/leap/$releasever/repo/oss/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-source-non-oss.repo \EOF [repo-source-non-oss] nameSource Repository (Non-OSS) enabled0 autorefresh1 baseurlhttp://download.opensuse.org/source/distribution/leap/$releasever/repo/non-oss/ typeNONE keeppackages0 EOFcat $Dir_openSUSERepos/repo-source.repo \EOF [repo-source] nameSource Repository enabled0 autorefresh1 baseurlhttp://download.opensuse.org/source/distribution/leap/$releasever/repo/oss/ typeNONE keeppackages0 EOFcat $Dir_openSUSERepos/repo-update-non-oss.repo \EOF [repo-update-non-oss] nameUpdate Repository (Non-Oss) enabled1 autorefresh1 baseurlhttp://download.opensuse.org/update/leap/$releasever/non-oss/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-update.repo \EOF [repo-update] nameMain Update Repository enabled1 autorefresh1 baseurlhttp://download.opensuse.org/update/leap/$releasever/oss/ typerpm-md keeppackages0 EOF;;*)cat $Dir_openSUSERepos/repo-backports-debug-update.repo \EOF [repo-backports-debug-update] nameUpdate repository with updates for openSUSE Leap debuginfo packages from openSUSE Backports enabled0 autorefresh1 baseurlhttp://download.opensuse.org/update/leap/$releasever/backports_debug/ typeNONE keeppackages0 EOFcat $Dir_openSUSERepos/repo-backports-update.repo \EOF [repo-backports-update] nameUpdate repository of openSUSE Backports enabled1 autorefresh1 baseurlhttp://download.opensuse.org/update/leap/$releasever/backports/ path/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-debug-non-oss.repo \EOF [repo-debug-non-oss] nameDebug Repository (Non-OSS) enabled0 autorefresh1 baseurlhttp://download.opensuse.org/debug/distribution/leap/$releasever/repo/non-oss/ keeppackages0 EOFcat $Dir_openSUSERepos/repo-debug.repo \EOF [repo-debug] nameDebug Repository enabled0 autorefresh1 baseurlhttp://download.opensuse.org/debug/distribution/leap/$releasever/repo/oss/ keeppackages0 EOFcat $Dir_openSUSERepos/repo-debug-update-non-oss.repo \EOF [repo-debug-update-non-oss] nameUpdate Repository (Debug, Non-OSS) enabled0 autorefresh1 baseurlhttp://download.opensuse.org/debug/update/leap/$releasever/non-oss/ keeppackages0 EOFcat $Dir_openSUSERepos/repo-debug-update.repo \EOF [repo-debug-update] nameUpdate Repository (Debug) enabled0 autorefresh1 baseurlhttp://download.opensuse.org/debug/update/leap/$releasever/oss/ keeppackages0 EOFcat $Dir_openSUSERepos/repo-non-oss.repo \EOF [repo-non-oss] nameNon-OSS Repository enabled1 autorefresh1 baseurlhttp://download.opensuse.org/distribution/leap/$releasever/repo/non-oss/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-oss.repo \EOF [repo-oss] nameMain Repository enabled1 autorefresh1 baseurlhttp://download.opensuse.org/distribution/leap/$releasever/repo/oss/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-sle-debug-update.repo \EOF [repo-sle-debug-update] nameUpdate repository with debuginfo for updates from SUSE Linux Enterprise 15 enabled0 autorefresh1 baseurlhttp://download.opensuse.org/debug/update/leap/$releasever/sle/ path/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-sle-update.repo \EOF [repo-sle-update] nameUpdate repository with updates from SUSE Linux Enterprise 15 enabled1 autorefresh1 baseurlhttp://download.opensuse.org/update/leap/$releasever/sle/ path/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-source.repo \EOF [repo-source] nameSource Repository enabled0 autorefresh1 baseurlhttp://download.opensuse.org/source/distribution/leap/$releasever/repo/oss/ keeppackages0 EOFcat $Dir_openSUSERepos/repo-update-non-oss.repo \EOF [repo-update-non-oss] nameUpdate Repository (Non-Oss) enabled1 autorefresh1 baseurlhttp://download.opensuse.org/update/leap/$releasever/non-oss/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-update.repo \EOF [repo-update] nameMain Update Repository enabled1 autorefresh1 baseurlhttp://download.opensuse.org/update/leap/$releasever/oss/ typerpm-md keeppackages0 EOF;;esac;;tumbleweed)cat $Dir_openSUSERepos/repo-debug.repo \EOF [repo-debug] nameopenSUSE-Tumbleweed-Debug enabled0 autorefresh1 baseurlhttp://download.opensuse.org/debug/tumbleweed/repo/oss/ path/ keeppackages0 EOFcat $Dir_openSUSERepos/repo-non-oss.repo \EOF [repo-non-oss] nameopenSUSE-Tumbleweed-Non-Oss enabled1 autorefresh1 baseurlhttp://download.opensuse.org/tumbleweed/repo/non-oss/ path/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-openh264.repo \EOF [repo-openh264] nameOpen H.264 Codec (openSUSE Tumbleweed) enabled1 autorefresh1 baseurlhttp://codecs.opensuse.org/openh264/openSUSE_Tumbleweed path/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-oss.repo \EOF [repo-oss] nameopenSUSE-Tumbleweed-Oss enabled1 autorefresh1 baseurlhttp://download.opensuse.org/tumbleweed/repo/oss/ path/ typerpm-md keeppackages0 EOFcat $Dir_openSUSERepos/repo-source.repo \EOF [repo-source] nameopenSUSE-Tumbleweed-Source enabled0 autorefresh1 baseurlhttp://download.opensuse.org/source/tumbleweed/repo/oss/ path/ keeppackages0 EOFcat $Dir_openSUSERepos/repo-update.repo \EOF [repo-update] nameopenSUSE-Tumbleweed-Update enabled1 autorefresh1 baseurlhttp://download.opensuse.org/update/tumbleweed/ path/ typerpm-md keeppackages0 EOF;;esac }## 生成 EPEL 附加软件包官方 repo 源文件 function GenRepoFiles_EPEL() {case ${SYSTEM_VERSION_NUMBER:0:1} in9)cat $Dir_YumRepos/epel.repo \EOF [epel] nameExtra Packages for Enterprise Linux $releasever - $basearch # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/$releasever/Everything/$basearch/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-$releaseverarch$basearchinfra$infracontent$contentdir enabled1 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever[epel-debuginfo] nameExtra Packages for Enterprise Linux $releasever - $basearch - Debug # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/$releasever/Everything/$basearch/debug/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-debug-$releaseverarch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever gpgcheck1[epel-source] nameExtra Packages for Enterprise Linux $releasever - $basearch - Source # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/$releasever/Everything/source/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-source-$releaseverarch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever gpgcheck1 EOFcat $Dir_YumRepos/epel-testing.repo \EOF [epel-testing] nameExtra Packages for Enterprise Linux $releasever - Testing - $basearch # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/$releasever/Everything/$basearch/ metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-epel$releaseverarch$basearchinfra$infracontent$contentdir enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever[epel-testing-debuginfo] nameExtra Packages for Enterprise Linux $releasever - Testing - $basearch - Debug # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/$releasever/Everything/$basearch/debug/ metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-debug-epel$releaseverarch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever gpgcheck1[epel-testing-source] nameExtra Packages for Enterprise Linux $releasever - Testing - $basearch - Source # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/$releasever/Everything/source/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-source-epel$releaseverarch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever gpgcheck1 EOFcat $Dir_YumRepos/epel-next.repo \EOF [epel-next] nameExtra Packages for Enterprise Linux $releasever - Next - $basearch # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/next/$releasever/Everything/$basearch/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-next-$releaseverarch$basearchinfra$infracontent$contentdir enabled1 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever[epel-next-debuginfo] nameExtra Packages for Enterprise Linux $releasever - Next - $basearch - Debug # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/next/$releasever/Everything/$basearch/debug/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-next-debug-$releaseverarch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever gpgcheck1[epel-next-source] nameExtra Packages for Enterprise Linux $releasever - Next - $basearch - Source # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/next/$releasever/Everything/source/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-next-source-$releaseverarch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever gpgcheck1 EOFcat $Dir_YumRepos/epel-next-testing.repo \EOF [epel-next-testing] nameExtra Packages for Enterprise Linux $releasever - Next - Testing - $basearch # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/next/$releasever/Everything/$basearch/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-testing-next-$releaseverarch$basearchinfra$infracontent$contentdir enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever[epel-next-testing-debuginfo] nameExtra Packages for Enterprise Linux $releasever - Next - Testing - $basearch - Debug # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/next/$releasever/Everything/$basearch/debug/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-testing-next-debug-$releaseverarch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever gpgcheck1[epel-next-testing-source] nameExtra Packages for Enterprise Linux $releasever - Next - Testing - $basearch - Source # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/next/$releasever/Everything/source/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-testing-next-source-$releaseverarch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever gpgcheck1 EOFcat $Dir_YumRepos/epel-cisco-openh264.repo \EOF [epel-cisco-openh264] nameExtra Packages for Enterprise Linux $releasever openh264 (From Cisco) - $basearch metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-cisco-openh264-$releaseverarch$basearch typerpm enabled1 metadata_expire14d repo_gpgcheck0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever skip_if_unavailableTrue[epel-cisco-openh264-debuginfo] nameExtra Packages for Enterprise Linux $releasever openh264 (From Cisco) - $basearch - Debug metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-cisco-openh264-debug-$releaseverarch$basearch typerpm enabled0 metadata_expire14d repo_gpgcheck0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever skip_if_unavailableTrue[epel-cisco-openh264-source] nameExtra Packages for Enterprise Linux $releasever openh264 (From Cisco) - $basearch - Source metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-cisco-openh264-source-$releaseverarch$basearch typerpm enabled0 metadata_expire14d repo_gpgcheck0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever skip_if_unavailableTrue EOF;;8)cat $Dir_YumRepos/epel.repo \EOF [epel] nameExtra Packages for Enterprise Linux 8 - $basearch # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/8/Everything/$basearch metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-8arch$basearchinfra$infracontent$contentdir enabled1 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8[epel-debuginfo] nameExtra Packages for Enterprise Linux 8 - $basearch - Debug # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/8/Everything/$basearch/debug metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-debug-8arch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 gpgcheck1[epel-source] nameExtra Packages for Enterprise Linux 8 - $basearch - Source # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/8/Everything/source/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-source-8arch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 gpgcheck1 EOFcat $Dir_YumRepos/epel-testing.repo \EOF [epel-testing] nameExtra Packages for Enterprise Linux 8 - Testing - $basearch # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/8/Everything/$basearch metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-epel8arch$basearchinfra$infracontent$contentdir enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8[epel-testing-debuginfo] nameExtra Packages for Enterprise Linux 8 - Testing - $basearch - Debug # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/8/Everything/$basearch/debug metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-debug-epel8arch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 gpgcheck1[epel-testing-source] nameExtra Packages for Enterprise Linux 8 - Testing - $basearch - Source # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/8/Everything/source/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-source-epel8arch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 gpgcheck1 EOFcat $Dir_YumRepos/epel-modular.repo \EOF [epel-modular] # This repo has been RETIRED, see https://pagure.io/epel/issue/198 for more details. nameExtra Packages for Enterprise Linux Modular 8 - $basearch - RETIRED # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/8/Modular/$basearch metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-modular-8arch$basearchinfra$infracontent$contentdir enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8[epel-modular-debuginfo] # This repo has been RETIRED, see https://pagure.io/epel/issue/198 for more details. nameExtra Packages for Enterprise Linux Modular 8 - $basearch - Debug - RETIRED # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/8/Modular/$basearch/debug metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-modular-debug-8arch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 gpgcheck1[epel-modular-source] # This repo has been RETIRED, see https://pagure.io/epel/issue/198 for more details. nameExtra Packages for Enterprise Linux Modular 8 - $basearch - Source - RETIRED # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/8/Modular/source/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-modular-source-8arch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 gpgcheck1 EOFcat $Dir_YumRepos/epel-testing-modular.repo \EOF [epel-testing-modular] # This repo has been RETIRED, see https://pagure.io/epel/issue/198 for more details. nameExtra Packages for Enterprise Linux Modular 8 - Testing - $basearch - RETIRED # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/8/Modular/$basearch metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-modular-epel8arch$basearchinfra$infracontent$contentdir enabled0 gpgcheck1 countme1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8[epel-testing-modular-debuginfo] # This repo has been RETIRED, see https://pagure.io/epel/issue/198 for more details. nameExtra Packages for Enterprise Linux Modular 8 - Testing - $basearch - Debug - RETIRED # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/8/Modular/$basearch/debug metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-modular-debug-epel8arch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 gpgcheck1[epel-testing-modular-source] # This repo has been RETIRED, see https://pagure.io/epel/issue/198 for more details. nameExtra Packages for Enterprise Linux Modular 8 - Testing - $basearch - Source - RETIRED # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurlhttps://download.example/pub/epel/testing/8/Modular/source/tree/ metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-modular-source-epel8arch$basearchinfra$infracontent$contentdir enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 gpgcheck1 EOF;;7)cat $Dir_YumRepos/epel.repo \EOF [epel] nameExtra Packages for Enterprise Linux 7 - $basearch #baseurlhttp://download.fedoraproject.org/pub/epel/7/$basearch metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-7arch$basearch failovermethodpriority enabled1 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7[epel-debuginfo] nameExtra Packages for Enterprise Linux 7 - $basearch - Debug #baseurlhttp://download.fedoraproject.org/pub/epel/7/$basearch/debug metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-debug-7arch$basearch failovermethodpriority enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck1[epel-source] nameExtra Packages for Enterprise Linux 7 - $basearch - Source #baseurlhttp://download.fedoraproject.org/pub/epel/7/SRPMS metalinkhttps://mirrors.fedoraproject.org/metalink?repoepel-source-7arch$basearch failovermethodpriority enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck1 EOFcat $Dir_YumRepos/epel-testing.repo \EOF [epel-testing] nameExtra Packages for Enterprise Linux 7 - Testing - $basearch #baseurlhttp://download.fedoraproject.org/pub/epel/testing/7/$basearch metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-epel7arch$basearch failovermethodpriority enabled0 gpgcheck1 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7[epel-testing-debuginfo] nameExtra Packages for Enterprise Linux 7 - Testing - $basearch - Debug #baseurlhttp://download.fedoraproject.org/pub/epel/testing/7/$basearch/debug metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-debug-epel7arch$basearch failovermethodpriority enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck1[epel-testing-source] nameExtra Packages for Enterprise Linux 7 - Testing - $basearch - Source #baseurlhttp://download.fedoraproject.org/pub/epel/testing/7/SRPMS metalinkhttps://mirrors.fedoraproject.org/metalink?repotesting-source-epel7arch$basearch failovermethodpriority enabled0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck1 EOF;;esac }## 处理命令选项 function CommandOptions() {## 命令帮助function Output_Help_Info() {echo -e 命令选项(参数名/含义/参数值)--abroad 使用海外软件源 无--edu 使用中国大陆教育网软件源 无--source 指定软件源地址 地址--source-security 指定 Debian 的 security 软件源地址 地址--source-vault 指定 CentOS/AlmaLinux 的 vault 软件源地址 地址--use-official-source 使用操作系统官方软件源 无--branch 指定软件源分支(路径) 分支名--branch-security 指定 Debian 的 security 软件源分支(路径) 分支名--branch-vault 指定 CentOS/AlmaLinux 的 vault 软件源分支(路径) 分支名--codename 指定 Debian 系操作系统的版本代号 代号名称--protocol 指定 WEB 协议 http 或 https--intranet 优先使用内网地址 true 或 false--install-epel 安装 EPEL 附加软件包 true 或 false--only-epel 仅更换 EPEL 软件源模式 无--close-firewall 关闭防火墙 true 或 false--backup 备份原有软件源 true 或 false--ignore-backup-tips 忽略覆盖备份提示 无--upgrade-software 更新软件包 true 或 false--clean-cache 清理下载缓存 true 或 false--print-diff 打印源文件修改前后差异 无问题报告 https://github.com/SuperManito/LinuxMirrors/issues}## 判断参数while [ $# -gt 0 ]; docase $1 in## 海外模式--abroad)USE_ABROAD_SOURCEtrue;;## 中国大陆教育网模式--edu)USE_EDU_SOURCEtrue;;## 指定软件源地址--source)if [ $2 ]; thenecho $2 | grep -Eq \(|\)|\[|\]|\{|\}if [ $? -eq 0 ]; thenOutput_Error 检测到无效参数值 ${BLUE}$2${PLAIN} 请输入有效的地址elseSOURCE$(echo $2 | sed -e s,^http[s]\?://,,g -e s,/$,,)shiftfielseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定软件源地址fi;;--source-security)if [ $2 ]; thenecho $2 | grep -Eq \(|\)|\[|\]|\{|\}if [ $? -eq 0 ]; thenOutput_Error 检测到无效参数值 ${BLUE}$2${PLAIN} 请输入有效的地址elseSOURCE_SECURITY$(echo $2 | sed -e s,^http[s]\?://,,g -e s,/$,,)shiftfielseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定软件源地址fi;;--source-vault)if [ $2 ]; thenecho $2 | grep -Eq \(|\)|\[|\]|\{|\}if [ $? -eq 0 ]; thenOutput_Error 检测到无效参数值 ${BLUE}$2${PLAIN} 请输入有效的地址elseSOURCE_VAULT$(echo $2 | sed -e s,^http[s]\?://,,g -e s,/$,,)shiftfielseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定软件源地址fi;;## 使用官方源--use-official-source)USE_OFFICIAL_SOURCEtrue;;## 指定软件源分支--branch)if [ $2 ]; thenSOURCE_BRANCH$2shiftelseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定软件源地址fi;;--branch-security)if [ $2 ]; thenSOURCE_BRANCH_SECURITY$2shiftelseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定软件源地址fi;;--branch-vault)if [ $2 ]; thenSOURCE_BRANCH_VAULT$2shiftelseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定软件源地址fi;;## 指定 Debian 系操作系统的版本代号--codename)if [ $2 ]; thenDEBIAN_CODENAME$2shiftelseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定版本代号fi;;## 优先使用内网地址--intranet)if [ $2 ]; thencase $2 in[Tt]rue | [Ff]alse)USE_INTRANET_SOURCE${2,,}shift;;*)Output_Error 检测到 ${BLUE}$2${PLAIN} 为无效参数值请在该参数后指定 true 或 false 作为参数值;;esacelseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定 true 或 false 作为参数值fi;;## WEB 协议HTTP/HTTPS--protocol | --web-protocol)if [ $2 ]; thencase $2 inhttp | https | HTTP | HTTPS)WEB_PROTOCOL$2shift;;*)Output_Error 检测到 ${BLUE}$2${PLAIN} 为无效参数值请在该参数后指定 http 或 https 作为参数值;;esacelseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定 WEB 协议HTTP/HTTPSfi;;## 安装 EPEL 附加软件包--install-epel)if [ $2 ]; thencase $2 in[Tt]rue | [Ff]alse)INSTALL_EPEL${2,,}shift;;*)Output_Error 检测到 ${BLUE}$2${PLAIN} 为无效参数值请在该参数后指定 true 或 false 作为参数值;;esacelseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定 true 或 false 作为参数值fi;;--only-epel)ONLY_EPELtrueINSTALL_EPELtrue;;## 关闭防火墙--close-firewall)if [ $2 ]; thencase $2 in[Tt]rue | [Ff]alse)CLOSE_FIREWALL${2,,}shift;;*)Output_Error 检测到 ${BLUE}$2${PLAIN} 为无效参数值请在该参数后指定 true 或 false 作为参数值;;esacelseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定 true 或 false 作为参数值fi;;## 备份原有软件源--backup)if [ $2 ]; thencase $2 in[Tt]rue | [Ff]alse)BACKUP${2,,}shift;;*)Output_Error 检测到 ${BLUE}$2${PLAIN} 为无效参数值请在该参数后指定 true 或 false 作为参数值;;esacelseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定 true 或 false 作为参数值fi;;## 忽略覆盖备份提示--ignore-backup-tips)IGNORE_BACKUP_TIPStrue;;## 更新软件包--upgrade-software | --updata-software)if [ $2 ]; thencase $2 in[Tt]rue | [Ff]alse)UPGRADE_SOFTWARE${2,,}shift;;*)Output_Error 检测到 ${BLUE}$2${PLAIN} 为无效参数值请在该参数后指定 true 或 false 作为参数值;;esacelseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定 true 或 false 作为参数值fi;;## 清理下载缓存--clean-cache)if [ $2 ]; thencase $2 in[Tt]rue | [Ff]alse)CLEAN_CACHE${2,,}shift;;*)Output_Error 检测到 ${BLUE}$2${PLAIN} 为无效参数值请在该参数后指定 true 或 false 作为参数值;;esacelseOutput_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请在该参数后指定 true 或 false 作为参数值fi;;## 打印源文件修改前后差异--print-diff)PRINT_DIFFtrue;;## 命令帮助--help)Output_Help_Infoexit;;*)Output_Error 检测到 ${BLUE}$1${PLAIN} 为无效参数请确认后重新输入;;esacshiftdone## 给部分命令选项赋予默认值ONLY_EPEL${ONLY_EPEL:-false}BACKUP${BACKUP:-true}USE_OFFICIAL_SOURCE${USE_OFFICIAL_SOURCE:-false}IGNORE_BACKUP_TIPS${IGNORE_BACKUP_TIPS:-false}PRINT_DIFF${PRINT_DIFF:-false} }## 组合函数 function Combin_Function() {PermissionJudgmentEnvJudgmentCheckCommandOptionsStartTitleChooseMirrorsChooseWebProtocolChooseInstallEPELCloseFirewallBackupOriginalMirrorsRemoveOriginMirrorsChangeMirrorsUpgradeSoftwareRunEnd }CommandOptions $ Combin_Function
http://www.zqtcl.cn/news/816312/

相关文章:

  • 企业网站seo优做网站的旅行社
  • 十大免费自助建站上传网站到空间
  • 深圳企业做网站简约个人网站
  • 茂名放心营销网站开发网站怎么做app
  • php语言 网站建设专业的外贸网站建设公司价格
  • 看英语做游戏的网站wordpress与微信对接
  • 企业网站打不开了看守所加强自身网站建设工作
  • 长汀网站建设做电池的有哪些网站
  • 做软件常用的网站厦门建设局地址
  • 沭阳三剑客做网站科技 公司 响应式 网站
  • 深圳网站建设培训哪家好曲阜网架公司
  • wordpress建立网站实例贵阳网站开发谁家做的好
  • 百度网站推广怎么收费中国科技成果
  • 枣庄企业网站建设wordpress 评论群发
  • 网站视觉设计方案视频制作素材
  • 哪个网站专做民宿wordpress 主题教程
  • 网站后台 设计北京海淀区官网
  • 公司官网网站建设想法wordpress oss
  • 如何自己创建网站招聘网站代理
  • 手机网页视频提取工具seo网站是什么
  • seo网站优化公司龙岩网站设计一般要多久
  • 江苏自助建站系统哪家好go语言网站开发
  • 建设网站 注册与登陆wordpress产品上传
  • 河北省住房与建设厅网站陶瓷刀具网站策划书
  • 大型商城网站建设方案程序外包
  • 邵阳网站建设制作电子商务网站开发软件
  • 怎样推广网站平台树莓派 wordpress mysql
  • 互联网公司网站建设wordpress发文章设置文字大小
  • 国科联创网站建设无锡网站建设有限公司
  • 网站开发官网源码石家庄怎样做网站