RHEL 8 / RHEL 9 (and perhaps more) installation script:
Currently I have a Setup script that installs repos & programs and does other setup tasks on a new local RHEL installation. I am working to "genericize" the scripts for different versions of RHEL. My install lines are the usual dnf -y install clamav clamav-update dconf-editor mtr fail2ban postfix ftp nasm. This works well in RHEL 8 but due to missing repos or programs in "9", multiple installs fail. For example, if say dconf-editor isn't available, all the programs in the line after it fails. My script has 10 of these lines (different programs, of course) and multiple lines failed in the "9" installation.
A "hack" fix that I need only to UN-comment in my script reads the programs I want installed from a text file list, then calls dnf for EACH one. My hesitation is that, in RHEL each invocation of dnf first takes 15-30 seconds for subscription-manager to do whatever 'checking' it needs to do; that'd equate to 70-100 of these "pauses"! WithOUT these 'pauses' my script runs between and hour to an hour-and-a-half, depending on hardware per machine.
My question, therefore, becomes: Is there a way in yum/dnf to have ONLY THE MISSING PROGRAM fail on a line of multiple programs or do I implement my hack fix so that no one fail will clobber other installs?
Thank you.
dnf install issue
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: dnf install issue
Maybe
I'm not very convinced that will do what you want but it's the only likely thing I could see in man dnf. Edit: no, it works. Tried yum install this that clamd and it fails with "No match for arguemtn: this" but works with --setopt='strict=False' and ignores this and that and installs clamd and its prereqs.
Code: Select all
strict boolean
If disabled, all unavailable packages or packages with broken dependencies given to DNF command
will be skipped without raising the error causing the whole operation to fail. Currently works for
install command only. The default is True.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: dnf install issue
It's certainly worth a try. Thank you!