+91-81782-71104

Home » Linux » Replicating an RHEL / Rocky Linux system on another RHEL machine that has no internet access

Replicating an RHEL / Rocky Linux system on another RHEL machine that has no internet access

Problem: Internet access is missing on target system where setup has to be done

Need: To setup a new system based upon an existing system, by capturing binary installable of all user installed packages and install them on remote system

Generating Zip containing Binary installers for all required packages

dnf history userinstalled > target-packages.lst
mkdir pkgs
cd pkgs
sudo dnf download `cat ../target-packages.lst` --resolve
cd ..
zip -r pkgs.zip pkgs

Edit

Copy to target system

Use scp / rsync / OneDrive Link / other method to take pkgs.zip file to other system

Install rpm binaries

Download / copy file zip file to target system and run following commands for installation

unzip pkgs.zip
sudo dnf install pkgs/*.rpm

Figuring out all currently installed packages

sudo dnf repoquery --installed --queryformat '%{name}' > all-installed-pkgs.lst

Leave a Reply

Your email address will not be published. Required fields are marked *