CentOS配置镜像源

CentOS配置镜像源

# 备份
mv
/etc/yum.repos.d/CentOS-Linux-AppStream.repo CentOS-Linux-AppStream.repo.back mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup mv /etc/yum.repos.d/CentOS-Linux-BaseOS.repo /etc/yum.repos.d/CentOS-Base.repo.backup # Centos8下载,centos8官方源已下线,建议切换centos-vault源 wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo # Centos7下载 wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo # Centos6下载,centos6官方源已下线,建议切换centos-vault源 wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo #清理缓存并生成新缓存 yum clean all yum makecache

#启用epel仓库(提供额外的软件包)
yum -y install epel-release

安装必要软件:yum -y install fio nvme-cli ipmitool sysstat vim

 Redhot配置镜像源

#适用于Redhot9
cd /etc/yum.repos.d/
rm -f redhat.repo
vim aliyun.repo

[AppStream]
name=AppStream
baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/AppStream/x86_64/os/
gpgcheck=0
enabled=1
 
[BaseOS]
name=BaseOS
baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/BaseOS/x86_64/os/
gpgcheck=0
enabled=1

yum -y clean all && yum -y makecache

 

posted @ 2025-04-17 14:41  Fēngwèi  阅读(92)  评论(0)    收藏  举报