CentOS 7 更换软件仓库

CentOS 7 于2024年6月30日停止维护,官方仓库已经没有软件了,想要继续使用 ,需要更换软件仓库,这里更换到阿里云的软件仓库 https://developer.aliyun.com/mirror/

查看目前可用的软件数量

bash 复制代码
yum repolist

更换软件仓库:

1、更换到 root 用户

bash 复制代码
su - root

2、 删除默认的官方软件仓库

bash 复制代码
rm -rf /etc/yum.repos.d/*

3、查看目前仓库情况

bash 复制代码
yum repolist

4、打开阿里云的镜像网站: https://developer.aliyun.com/mirror/ ,复制命令到终端上执行

bash 复制代码
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
bash 复制代码
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

5、查看软件仓库最新情况

bash 复制代码
yum repolist
相关推荐
知星小度S17 小时前
系统核心解析:深入操作系统内部机制——进程管理与控制指南(一)【进程/PCB】
linux·运维·服务器·进程
码农101号1 天前
运维安全05 - iptables规则保存与恢复
运维·网络·安全
Empty_7771 天前
SELinux安全上下文
linux·服务器·安全
bug攻城狮1 天前
解决Ubuntu中apt-get -y安装时弹出交互提示的问题
linux·运维·ubuntu
xiachong271 天前
ubuntu18.04安装PCL1.14
linux·ubuntu
夜阑珊夭夭1 天前
linux自定义网卡名字
linux·运维
czhc11400756631 天前
Linux912 shell:$# $1 $?;RHEL 8 AppStream BaseOS
linux
佛天华1 天前
centos 时间校准
linux·运维·centos
小柯J桑_1 天前
Linux:线程封装
linux·运维·c++