<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.linuxsa.org/index.php?action=history&amp;feed=atom&amp;title=Centos%E4%BF%AE%E6%94%B9yum%E6%BA%90</id>
	<title>Centos修改yum源 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.linuxsa.org/index.php?action=history&amp;feed=atom&amp;title=Centos%E4%BF%AE%E6%94%B9yum%E6%BA%90"/>
	<link rel="alternate" type="text/html" href="https://wiki.linuxsa.org/index.php?title=Centos%E4%BF%AE%E6%94%B9yum%E6%BA%90&amp;action=history"/>
	<updated>2026-04-17T16:50:29Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.linuxsa.org/index.php?title=Centos%E4%BF%AE%E6%94%B9yum%E6%BA%90&amp;diff=226&amp;oldid=prev</id>
		<title>Evan：​/* 1、备份 */</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxsa.org/index.php?title=Centos%E4%BF%AE%E6%94%B9yum%E6%BA%90&amp;diff=226&amp;oldid=prev"/>
		<updated>2025-05-21T07:59:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;1、备份&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
=1、备份=&lt;br /&gt;
&lt;br /&gt;
 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup&lt;br /&gt;
&lt;br /&gt;
=May 2025=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat  CentOS-Base.repo&lt;br /&gt;
# CentOS-Base.repo&lt;br /&gt;
#&lt;br /&gt;
# The mirror system uses the connecting IP address of the client and the&lt;br /&gt;
# update status of each mirror to pick mirrors that are updated to and&lt;br /&gt;
# geographically close to the client.  You should use this for CentOS updates&lt;br /&gt;
# unless you are manually picking other mirrors.&lt;br /&gt;
#&lt;br /&gt;
# If the mirrorlist= does not work for you, as a fall back you can try the &lt;br /&gt;
# remarked out baseurl= line instead.&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
 &lt;br /&gt;
[base]&lt;br /&gt;
name=CentOS-$releasever - Base - mirrors.aliyun.com&lt;br /&gt;
failovermethod=priority&lt;br /&gt;
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/&lt;br /&gt;
        http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/&lt;br /&gt;
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7&lt;br /&gt;
 &lt;br /&gt;
#released updates &lt;br /&gt;
[updates]&lt;br /&gt;
name=CentOS-$releasever - Updates - mirrors.aliyun.com&lt;br /&gt;
failovermethod=priority&lt;br /&gt;
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/&lt;br /&gt;
        http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/&lt;br /&gt;
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7&lt;br /&gt;
 &lt;br /&gt;
#additional packages that may be useful&lt;br /&gt;
[extras]&lt;br /&gt;
name=CentOS-$releasever - Extras - mirrors.aliyun.com&lt;br /&gt;
failovermethod=priority&lt;br /&gt;
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/&lt;br /&gt;
        http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/&lt;br /&gt;
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7&lt;br /&gt;
 &lt;br /&gt;
#additional packages that extend functionality of existing packages&lt;br /&gt;
[centosplus]&lt;br /&gt;
name=CentOS-$releasever - Plus - mirrors.aliyun.com&lt;br /&gt;
failovermethod=priority&lt;br /&gt;
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/&lt;br /&gt;
        http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/&lt;br /&gt;
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
enabled=0&lt;br /&gt;
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7&lt;br /&gt;
 &lt;br /&gt;
#contrib - packages by Centos Users&lt;br /&gt;
[contrib]&lt;br /&gt;
name=CentOS-$releasever - Contrib - mirrors.aliyun.com&lt;br /&gt;
failovermethod=priority&lt;br /&gt;
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/&lt;br /&gt;
        http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/&lt;br /&gt;
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
enabled=0&lt;br /&gt;
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CentOS 5&lt;br /&gt;
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo&lt;br /&gt;
&lt;br /&gt;
或者&lt;br /&gt;
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo&lt;br /&gt;
&lt;br /&gt;
CentOS 6&lt;br /&gt;
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo&lt;br /&gt;
&lt;br /&gt;
或者&lt;br /&gt;
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo&lt;br /&gt;
&lt;br /&gt;
CentOS 7&lt;br /&gt;
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo&lt;br /&gt;
&lt;br /&gt;
或者&lt;br /&gt;
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=3、之后运行yum makecache生成缓存=&lt;br /&gt;
 yum makecache&lt;br /&gt;
&lt;br /&gt;
=参考=&lt;br /&gt;
http://mirrors.aliyun.com/help/centos&lt;br /&gt;
&lt;br /&gt;
 [[category:linux]]  [[category:ops]]&lt;/div&gt;</summary>
		<author><name>Evan</name></author>
	</entry>
</feed>