0

I'm using Almalinux 9 and dnf, but RHEL, CentOS, or similar would work the same. Is there a correct way to download updates at one point in time and then install at a later time? I have dev/test servers and prod servers. I would like for the dev/test servers and prod servers to download updates at the same time. That's no problem. I schedule dnf upgrade --downloadonly /my/cached/updates -y and I have all the RPM files in a single directory, and it's the same RPMs on dev/test and prod. Now let's say I want my dev/test servers to install upgrades at the same time that they download them, but I want my prod servers to wait a full week before install. I don't ever want to install anything on my prod system that hasn't been installed and tested in dev/test first. So I don't want any new updates in prod that may have been released during the week after I upgraded dev/test but before I upgrade prod.

Should I simply run dnf install /my/cached/updates/*.rpm -y on prod a week later or is there a better way of going about all of this?

1
  • Why not just skip the step and set a cron job to install the updates at the time that that you want? Commented Dec 10, 2024 at 22:11

1 Answer 1

-1
  1. Set up a repo on your master server:
  • dnf install createrepo_c
  • createrepo_c /path/to/RPMs
  • Serve it via nginx/apache/vsftpd whatever
  1. Point your slave servers to this repo (you can check existing repos in /etc/yum.repos.d/ - yeah, it's still yum for compatibility)
  2. Run dnf --disablerepo=* --enablerepo=master update on your slave servers

AI should have probably given the same answer in under 30 seconds.


Option N2: may or may not work, probably it should:

  1. Distribute RPMs however you want (rsync/scp/etc or even serve them via Samba/NFS/etc)
  2. Run
cd /directory/with/RPMs rpm -Uvh *rpm 

The first method is a lot more preferable.

2
  • I get enough half-baked answers from AI, not to trust it when I want a solid answer. Trusting AI is like saying 2+2=5 is close enough. Commented Dec 11, 2024 at 13:38
  • Both ChatGPT and ClaudeAI have been quite good recently. Like really good. Commented Dec 12, 2024 at 1:08

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.