<?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>系统运维 &#187; yum</title>
	<atom:link href="http://www.osyunwei.com/archives/tag/yum/feed" rel="self" type="application/rss+xml" />
	<link>https://www.osyunwei.com</link>
	<description>国产化OS/AnolisOS/openEuler/RHEL/CentOS/Rocky Linux/Debian/Ubuntu Linux FreeBSD 服务器教程 &#124; Windows Server 2003/2008/2012/2016/2019/2022/2025服务器教程</description>
	<lastBuildDate>Wed, 01 Apr 2026 08:27:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux下使用DNF命令下载安装包到指定目录</title>
		<link>https://www.osyunwei.com/archives/17063.html</link>
		<comments>https://www.osyunwei.com/archives/17063.html#comments</comments>
		<pubDate>Thu, 19 Mar 2026 17:26:48 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dnf]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=17063</guid>
		<description><![CDATA[需求：内网服务器没有yum源，要离线安装依赖包 解决方法：部署一台相同版本的可以联网的服务器，使用DNF命令下载依赖包，上传到内网服务器离线安装。 具体操作： 我们以RHEL 8/9/10系列操作系统为例 1、安装dnf-utils工具包 默认的 dnf 命令只能做基础的安装、卸载和更新。我们需要安装增强工具包 dnf-utils 才能制作离线安装包 dnf install -y dnf-utils #安装工具包 2、创建目录 #创建临时目录，作为虚拟系统根目录，用来计算依赖关系，不会影响真实的系统 mkdir -p /tmp/fake #创建存储目录，下载好的所有 .rpm 文件都保持在这里 mkdir -p /root/yum-rpm-full-x86 3、下载安装包到指定目录 dnf install --installroot=/tmp/fake --downloadonly --downloaddir=/root/yum-rpm-full-x86 \ wget telnet nmap traceroute ntp rsync lrzsz OpenIPMI ipmitool freeipmi screen ncurses-devel bind-utils libffi-devel libnfnetlink-devel libnl3-devel popt-devel tcpdump wireshark \ libtool [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/17063.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/17063.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS下使用createrepo制作离线yum源</title>
		<link>https://www.osyunwei.com/archives/13225.html</link>
		<comments>https://www.osyunwei.com/archives/13225.html#comments</comments>
		<pubDate>Sat, 28 Jan 2023 01:59:33 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=13225</guid>
		<description><![CDATA[1、先要有一台能够联网的服务器，这里我们使用CentOS-7.x系统 2、配置yum文件，设置install安装时自动将rpm包保存到本地 vi /etc/yum.conf cachedir=/var/cache/yum/$basearch/$releasever keepcache=1（0：不下载 ，1：下载至本地 ），需要改成1 :wq! #保存退出 3、设置好之后，我们执行软件包安装 #比如我们需要安装编译nginx的依赖包 yum install make gcc gcc-c++ perl zlib-devel 4、安装完成后，我们去这个路径下，就可以看到该install安装的rpm包都被保存到该目录下。 注意：有3个目录下面的rpm包都需要拷贝 cd /var/cache/yum/x86_64/7/base/packages cd /var/cache/yum/x86_64/7/extras/packages cd /var/cache/yum/x86_64/7/updates/packages 5、拷贝rpm包 #创建本地rpm包存放目录 mkdir -p /data/yum/x86_64/7/base/packages mkdir -p /data/yum/x86_64/7/extras/packages mkdir -p /data/yum/x86_64/7/updates/packages mv /var/cache/yum/x86_64/7/base/packages/* /data/yum/x86_64/7/base/packages mv /var/cache/yum/x86_64/7/extras/packages/* /data/yum/x86_64/7/extras/packages mv /var/cache/yum/x86_64/7/updates/packages/* /data/yum/x86_64/7/updates/packages 6、制作离线源 #安装createrepo yum install createrepo #rpm安装 rpm -ivh [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/13225.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/13225.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS使用系统镜像文件配置本地Yum源</title>
		<link>https://www.osyunwei.com/archives/12175.html</link>
		<comments>https://www.osyunwei.com/archives/12175.html#comments</comments>
		<pubDate>Wed, 18 May 2022 14:29:36 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=12175</guid>
		<description><![CDATA[操作系统：CentOS 8.x  CentOS 7.x 需求：在项目部署中无法连接外网，编译安装软件需要用到yum源安装依赖包。 解决方案：使用系统镜像文件配置本地yum源 一、下载系统镜像文件 CentOS 8.x  https://vault.centos.org/8.5.2111/isos/x86_64/CentOS-8.5.2111-x86_64-dvd1.iso CentOS 7.x  http://ftp.sjtu.edu.cn/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-DVD-2009.iso 二、创建目录 mkdir  -p  /mnt/iso   #创建系统镜像文件存放目录 mkdir  -p  /mnt/cdrom   #创建系统镜像挂载目录 上传下载好的系统镜像文件到/mnt/iso目录下 三、挂载系统镜像文件 #将系统镜像文件挂载到/mnt/cdrom目录 mount -o loop  /mnt/iso/CentOS-8.5.2111-x86_64-dvd1.iso   /mnt/cdrom 提示：mount: /mnt/cdrom: WARNING: device write-protected, mounted read-only. 使用df -h查看，会出现类似下面的挂载目录，说明挂载成功 /dev/loop0      7.8G  7.8G     0 100% /mnt/cdrom 三、配置本地yum源 mv  /etc/yum.repos.d  /etc/yum.repos.d-bak  #备份目录 mkdir   /etc/yum.repos.d #创建新的目录 vi  /etc/yum.repos.d/CentOS-Media.repo  #CentOS 8.x 配置文件 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/12175.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/12175.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS官方停止维护后yum源失效解决办法</title>
		<link>https://www.osyunwei.com/archives/11217.html</link>
		<comments>https://www.osyunwei.com/archives/11217.html#comments</comments>
		<pubDate>Mon, 05 Apr 2021 14:22:28 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=11217</guid>
		<description><![CDATA[截止目前CentOS 5和6官方已经停止维护，yum命令默认已经无法使用。 CentOS官方提供了一个旧版软件存档http://vault.centos.org/，我们可以使用这个连接替换yum源。 注意：CentOS官方不会再更新此连接，这仅仅是一份旧版快照，我们仅可用它来做yum源，服务器系统建议还是尽可能升级到官方支持的版本。 1、查询当前系统版本 cat /etc/issue CentOS release 6.10 (Final) Kernel \r on an \m #当前系统版本是CentOS 6.10  yum install wget #测试安装软件，默认无法使用yum命令 2、创建yum源文件 mv /etc/yum.repos.d/CentOS-Base.repo    /etc/yum.repos.d/CentOS-Base.repo-backup #备份默认的源文件 vi /etc/yum.repos.d/CentOS-Base.repo #编辑源文件 [base] name=CentOS-6 failovermethod=priority #vault源，速度很慢，我们注释掉 #baseurl=http://vault.centos.org/6.10/os/x86_64/ #换成国内的镜像 baseurl=http://mirrors.sohu.com/centos/6.10/os/x86_64/ #baseurl=http://mirrors4.tuna.tsinghua.edu.cn/centos-vault/6.10/os/x86_64/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 enabled=1 :wq! #保存退出 yum clean all yum makecache  #生成缓存 yum install wget #再次测试安装软件 成功使用yum安装了wget [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/11217.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/11217.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS使用本地光盘做yum源</title>
		<link>https://www.osyunwei.com/archives/5511.html</link>
		<comments>https://www.osyunwei.com/archives/5511.html#comments</comments>
		<pubDate>Tue, 30 Oct 2012 04:28:48 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[yum]]></category>
		<category><![CDATA[本地光盘做yum源]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=5511</guid>
		<description><![CDATA[说明： 操作系统：CentOS 5.8 一、使用光盘做yum源安装软件 将光盘放入光驱中，登录到系统，执行以下操作 mkdir /media/cdrom  #新建光盘挂载目录 mount /dev/cdrom  /media/cdrom   #挂载光盘 rpm --import   /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #安装证书 rpm --import   /etc/pki/rpm-gpg/RPM-GPG-KEY-beta yum clean all #清理yum 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容 版权所有,转载请注明出处及原文链接 yum --disablerepo=\* --enablerepo=c5-media install  php #使用光盘源安装软件 umount  /media/cdrom  #卸载光盘 二、使用系统镜像文件做yum源安装软件 将系统镜像文件上传到/usr/local/src目录中 /usr/local/src/CentOS-5.8-x86_64-bin-DVD-1of2.iso #系统镜像文件存放目录 mkdir /media/cdrom #新建镜像文件挂载目录 mount -t iso9660 -o loop /usr/local/src/CentOS-5.8-x86_64-bin-DVD-1of2.iso  /media/cdrom #挂载系统镜像 yum --disablerepo=\* --enablerepo=c5-media clean [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/5511.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/5511.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RHEL 6.2配置本地yum源</title>
		<link>https://www.osyunwei.com/archives/2241.html</link>
		<comments>https://www.osyunwei.com/archives/2241.html#comments</comments>
		<pubDate>Mon, 13 Feb 2012 02:54:29 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[RHEL]]></category>
		<category><![CDATA[yum]]></category>
		<category><![CDATA[配置本地yum源]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=2241</guid>
		<description><![CDATA[一、挂载本地光盘到系统：把rhel6.2安装光盘放入光驱，在终端命令行下操作       mkdir /media/rhel   #新建挂载目录       mount /dev/cdrom  /media/rhel  #挂载光盘到/media/rhel目录下       cd  /media/rhel  #进入挂载目录       ls   #查看挂载目录，光盘挂载成功 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 二、配置本地yum源       cd /etc/yum.repos.d/   #进入yum配置目录       touch  rhel-media.repo   #建立yum配置文件       vi  rhel-media.repo   #编辑配置文件，添加以下内容   三、清除yum缓存，使用yum install自动安装软件       yum clean all   #清除yum缓存       yum install php   #安装php 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 至此，RHEL 6.2配置本地yum源教程完成，现在可以使用yum install命令安装软件了。 &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/2241.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/2241.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/2241.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
