<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>国内源 &#8211; 就爱分享</title>
	<atom:link href="https://www.9host.org/tag/%e5%9b%bd%e5%86%85%e6%ba%90/feed" rel="self" type="application/rss+xml" />
	<link>https://www.9host.org</link>
	<description>最爱分享各种资源的中文独立博客</description>
	<lastBuildDate>Fri, 20 Dec 2024 03:28:53 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>CentOS 8 更换yum国内源</title>
		<link>https://www.9host.org/1704.html</link>
					<comments>https://www.9host.org/1704.html#respond</comments>
		
		<dc:creator><![CDATA[河马大叔]]></dc:creator>
		<pubDate>Wed, 30 Aug 2023 04:20:41 +0000</pubDate>
				<category><![CDATA[新手教程]]></category>
		<category><![CDATA[CentOS 8]]></category>
		<category><![CDATA[国内源]]></category>
		<guid isPermaLink="false">https://www.9host.org/?p=1704</guid>

					<description><![CDATA[centos7和centos8的版本不同，个人在实&#8230;]]></description>
										<content:encoded><![CDATA[<p>centos7和centos8的版本不同，个人在实践当中发现centos7更换yum源的配置方法在centos8当中并不适用，以下为个人实现centos8配置国内yum源过程：</p>
<p>操作的主要思路为：</p>
<p>在不删除源文件的基础上，将源文件备份<br />
下载最新centos8国内的yum源文件<br />
更换地址<br />
主要实现的代码如下：<br />
进入root，切换至yum.repos.d目录</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">cd /etc/yum.repos.d/</pre>
<p>创建新文件夹并将源文件备份为repo.bak</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">mkdir backup && mv *repo backup/</pre>
<p>下载国内yum源文件</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo</pre>
<p>更新下载yum源地址</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">sed -i -e"s|mirrors.cloud.aliyuncs.com|mirrors.aliyun.com|g " /etc/yum.repos.d/CentOS-*</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">sed -i -e "s|releasever|releasever-stream|g" /etc/yum.repos.d/CentOS-*</pre>
<p>生成缓存</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">yum clean all && yum makecache</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.9host.org/1704.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
