关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

国外centos 无法更新

发布时间:2022-08-30 18:06:39

解决办法

1、进入到 /etc/yum.repos.d目录下

cd /etc/yum.repos.d

2、先备份原来的 CentOS-Base.repo 文件

cp CentOS-Base.repo CentOS-Base.repo.old

3、修改 CentOS-Base.repo 文件

vi CentOS-Base.repo

主要修改 baseurl 的值,包括 [base]、[updates] 和 [extras]

[base]name=CentOS-$releasever - Base# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra# baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/baseurl=https://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6# released updates[updates]name=CentOS-$releasever - Updates# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra# baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/baseurl=https://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6# additional packages that may be useful[extras]name=CentOS-$releasever - Extras# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra# baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/baseurl=https://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6



/template/Home/Zkeys/PC/Static