Offline Update Rocky 9.2

Hy everybody.

In our company we have an extremly strict security policies. Now I have a fresh Rocky 9.2 - minimal headless server installation witout an access to internet and I should to update the installation and also install some packages.

I have made some research, but have found no reliable sources regarding offline update.

Can anyone help me, how to proceed when trying to update offline?

Thank you in advance!

Download content of repositories to local volume and point the repo definitions (in /etc/yum.repos.d/) to those local “mirrors”.

Thank you, I will try.
Maybe some more detailed hint would be really helpfull. I am not as skilled.

Lets say that you have on your machine a copy in path
/mirrors/rockylinux.org/9/BaseOS/x86_64/os/
directories Packages and repodata and repo definition:

# cat /etc/yum.repos.d/mybase.repo
[my-baseos]
baseurl = file:///mirrors/rockylinux.org/$releasever/BaseOS/$basearch/os/
cost = 990
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
name = My - Rocky $releasever - BaseOS

Then dnf should find the packages.

How you download and copy files from public mirrors (regularly) to your strict environment is up to you.

2 Likes

Heh… you were slightly faster then I was :smiley: Guess I don’t need to post anymore… except that gpgkey should probably be:
/etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
:wink:

1 Like

Great, man, thanks a lot!

I appreciate it a lot!

Best,
Laco

Gosh, I should sed my copy-paste’s. :woozy_face:

2 Likes

Hi all,

Thank you both once again!

Meanwhile, I have found a link for installing Rocky 9, it works like a charm and I would like to share it with anybody.

Working Offline Rocky 9 Installation Guide

Maybe it will help someone.

Best!