Skip to content

Instantly share code, notes, and snippets.

@kaichao
Last active April 4, 2026 01:55
Show Gist options
  • Select an option

  • Save kaichao/934c48f1d1f6b4ffeb63e3b59eaaa03c to your computer and use it in GitHub Desktop.

Select an option

Save kaichao/934c48f1d1f6b4ffeb63e3b59eaaa03c to your computer and use it in GitHub Desktop.
Offline Installation on Rocky Linux 9.4 Using Docker

Prerequisites

  • A networked server with Docker installed (can be any Linux distribution)
  • A target offline server running Rocky Linux 9.4
  • Both servers have the same architecture (e.g., x86_64)

Key Concept

The container image (rockylinux/rockylinux:9.4) provides an environment identical to the target offline server. This ensures all downloaded RPM packages are compatible, regardless of the networked server's host operating system.

Step 1: Download Offline Packages on the Networked Server

Use a Rocky Linux 9.4 container to download all required RPM packages with dependencies.

# Run container to download fio and its dependencies
docker run --rm -it \
  -v /tmp/offline:/root/offline \
  rockylinux/rockylinux:9.4 \
  bash

Download offline package in container

# Install dnf download plugin
dnf install -y dnf-plugins-core
# Change to the mounted directory
cd /root/offline
# Download fio with all dependencies
dnf download --resolve fio

Note: The downloaded RPM packages will appear in /tmp/offline on the host machine. The networked server's operating system doesn't matter—only the container image version must match the target server.

Step 2: Transfer Packages to Target Offline Server

Copy the entire /tmp/offline directory from the networked server to the target offline server using one of the following methods:

  • USB drive: Copy files to USB and transfer manually

  • SCP (if network allows): scp -r /tmp/offline user@offline-server:/path/to/destination

On the target server, place the packages in a directory (e.g., /tmp/rpms).

Step 3: Install package on the Target Offline Server

Navigate to the directory containing RPM packages and install them without accessing network repositories.

Method A: Using dnf localinstall with disabled repos (Recommended)

# Navigate to the packages directory
cd /tmp/rpms

# Install all RPM packages, disabling all network repositories
sudo dnf localinstall -y --disablerepo=* *.rpm

Method B: Using rpm directly

# Navigate to the packages directory
cd /tmp/rpms

# Install all RPM packages directly
sudo rpm -ivh *.rpm

Verify Installation

# Check fio version
fio --version

# Verify installed files
rpm -ql fio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment