<?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>RHEL &#8211; My Shitty Code</title>
	<atom:link href="https://myshittycode.com/tag/rhel/feed/" rel="self" type="application/rss+xml" />
	<link>https://myshittycode.com</link>
	<description>Embracing the Messiness in Search of Epic Solutions</description>
	<lastBuildDate>Fri, 06 Jan 2023 04:00:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://myshittycode.com/wp-content/uploads/2022/04/cropped-icon-32x32.png</url>
	<title>RHEL &#8211; My Shitty Code</title>
	<link>https://myshittycode.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">205304208</site>	<item>
		<title>RPM: Performing Offline Installation</title>
		<link>https://myshittycode.com/2020/07/04/rpm-performing-offline-installation/</link>
					<comments>https://myshittycode.com/2020/07/04/rpm-performing-offline-installation/#respond</comments>
		
		<dc:creator><![CDATA[Shitty Author]]></dc:creator>
		<pubDate>Sun, 05 Jul 2020 00:34:40 +0000</pubDate>
				<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[RHEL]]></category>
		<guid isPermaLink="false">http://myshittycode.com/?p=1177</guid>

					<description><![CDATA[<p>PROBLEM To perform an offline (or airgapped) installation, sometimes it&#8217;s not sufficient to download just the needed RPM package. In most cases, this package requires a list of dependencies to be installed too. For example, Nginx requires at least 20 different packages in order for its installation to be successful:- SOLUTION The first step to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2020/07/04/rpm-performing-offline-installation/">RPM: Performing Offline Installation</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">PROBLEM</h2>



<p>To perform an offline (or airgapped) installation, sometimes it&#8217;s not sufficient to download just the needed RPM package. In most cases, this package requires a list of dependencies to be installed too.</p>



<p>For example, <b>Nginx</b> requires at least 20 different packages in order for its installation to be successful:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ sudo yum deplist nginx
package: nginx.x86_64 1:1.16.1-1.el7
  dependency: /bin/sh
   provider: bash.x86_64 4.2.46-34.el7
  dependency: libc.so.6(GLIBC_2.17)(64bit)
   provider: glibc.x86_64 2.17-307.el7.1
  dependency: libcrypt.so.1()(64bit)
   provider: glibc.x86_64 2.17-307.el7.1
  ...
  ...
  ...
  dependency: system-logos
   provider: redhat-logos.noarch 70.7.0-1.el7
  dependency: systemd
   provider: systemd.x86_64 219-73.el7_8.8
</pre></div>


<h2 class="wp-block-heading">SOLUTION</h2>



<p>The first step to spin up an instance using the same Linux distro/version and this instance must have internet access.</p>



<p>Download the following yum plugin that allows the package(s) to be downloaded without installing them:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sudo yum install yum-plugin-downloadonly
</pre></div>


<p>Download the needed package (in this case, <b>Nginx</b>) and its dependencies into a directory:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sudo yum install --downloadonly --downloaddir=/tmp/nginx nginx
</pre></div>


<p>To inspect what&#8217;s being downloaded:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ ls -a /tmp/nginx | sort
.
..
dejavu-fonts-common-2.33-6.el7.noarch.rpm
dejavu-sans-fonts-2.33-6.el7.noarch.rpm
fontconfig-2.13.0-4.3.el7.x86_64.rpm
fontpackages-filesystem-1.44-8.el7.noarch.rpm
gd-2.0.35-26.el7.x86_64.rpm
gperftools-libs-2.6.1-1.el7.x86_64.rpm
libjpeg-turbo-1.2.90-8.el7.x86_64.rpm
libX11-1.6.7-2.el7.x86_64.rpm
libX11-common-1.6.7-2.el7.noarch.rpm
libXau-1.0.8-2.1.el7.x86_64.rpm
libxcb-1.13-1.el7.x86_64.rpm
libXpm-3.5.12-1.el7.x86_64.rpm
nginx-1.16.1-1.el7.x86_64.rpm
nginx-all-modules-1.16.1-1.el7.noarch.rpm
nginx-filesystem-1.16.1-1.el7.noarch.rpm
nginx-mod-http-image-filter-1.16.1-1.el7.x86_64.rpm
nginx-mod-http-perl-1.16.1-1.el7.x86_64.rpm
nginx-mod-http-xslt-filter-1.16.1-1.el7.x86_64.rpm
nginx-mod-mail-1.16.1-1.el7.x86_64.rpm
nginx-mod-stream-1.16.1-1.el7.x86_64.rpm
redhat-indexhtml-7-13.el7.noarch.rpm
</pre></div>


<p>Now, this directory can be safely compressed into a tarball to be copied to the target instance without internet access.</p>



<p>After extracting the tarball in the target instance, it&#8217;s time to install the package:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sudo yum -y --disablerepo=* localinstall /tmp/nginx/*.rpm
</pre></div>


<p>This command is smart enough to figure out all the dependencies within the directory and install them in the proper order.</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2020/07/04/rpm-performing-offline-installation/">RPM: Performing Offline Installation</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://myshittycode.com/2020/07/04/rpm-performing-offline-installation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1177</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching using Disk

Served from: myshittycode.com @ 2026-02-19 05:02:16 by W3 Total Cache
-->