-
备份原有的YUM仓库配置文件
sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup2.下载阿里云的CentOS仓库配置文件
sudo curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo3.清理缓存并生成新的仓库缓存
sudo yum clean all 清理yum缓存 sudo yum makecache 生成新的缓存 yum update 更新yum源完成上述步骤后,您的系统将使用阿里云的YUM仓库。您可以使用
yum update来测试是否一切正常。一句话更换源
关于报错 Command not found# 此报错是由于系统没有安装 curl 软件包导致,安装命令如下 dnf install -y curl || yum install -y curl GNU/Linux国内线路------------------------------------------------------------------------------------- bash <(curl -sSL https://linuxmirrors.cn/main.sh) github bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh) gitee bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) gitcode bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) Docker jsdev bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/ChangeMirrors.sh) 腾讯eo bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) GNU/Linux海外线路------------------------------------------------------------------------------------- bash <(curl -sSL https://linuxmirrors.cn/main.sh) --abroad github bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh) --abroad gitee bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --abroad gitcode bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --abroad jsdev bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/ChangeMirrors.sh) --abroad 腾讯eo bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --abroad Docker 安装与换源脚本------------------------------------------------------------------------------------- bash <(curl -sSL https://linuxmirrors.cn/docker.sh) bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/DockerInstallation.sh) bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/DockerInstallation.sh) bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh)一句话更换源适配版本
操作系统 适配版本 Debian 8~13 Ubuntu 14~25 Kali Linux all Linux Mint 19~22 / LMDE 6 Deepin(深度) all Zorin OS all Armbian all Proxmox VE all Raspberry Pi OS all Red Hat Enterprise Linux 7~10 Fedora 30~42 CentOS 7~8 / Stream 8~10 Rocky Linux 8~10 AlmaLinux 8~10 Oracle Linux 8~10 openEuler(开源欧拉) 20~25 OpenCloudOS(鸥栖) 8.6~9 / Stream 23 openKylin(开放麒麟) all Anolis OS(龙蜥) 8 / 23 openSUSE Leap 15 ~ 16 / Tumbleweed Arch Linux all Manjaro all Alpine Linux v3 / edge Gentoo all NixOS 19~25
© 版权声明
文章版权归作者所有,转载请预留文章地址。s.wbsun.net
THE END

暂无评论内容