dnf installer bash script (CentOS 8 Stream and Rocky Linux 8)

When you run the code below, ensure to redirect output and errors to a log file.

Before using, ensure /etc/dnf/dnf.conf is set to use the fastest mirror, with a fix noted in Virtual Box running CentOS8 Stream

#!/bin/bash
#
# install-my-dnf-packages.bash
# CentOS 8 Stream / Rocky Linux 8 version
#
# NOTES:
# Installed groups can be found with:
# dnf group list
#
# Contents of groups can be found with:
# dnf group info "Group Name"
#
# TO RUN:
# ./install-my-dnf-packages.bash > /tmp/install-my-dnf-packages.log 2>&1
#

echo ""
echo "*****************************************************************"
echo "*                     Beginning all Updates                     *"
echo "*****************************************************************"


echo "*****************************************************************"
echo "*                         PowerTools                            *"
# https://serverfault.com/questions/997896/how-to-enable-powertools-repository-in-centos-8
echo "*****************************************************************"
dnf install dnf-plugins-core
dnf config-manager --set-enabled powertools


echo ""
echo "dnf -y install wget"
dnf -y install wget

echo ""
echo "dnf -y install epel-release"
dnf -y install epel-release


echo "*****************************************************************"
echo "***************** UPDATING CURRENT PACKAGES  ********************"
echo "*****************************************************************"
dnf -y update


echo ""
echo "******************** FOR VBox Guest Additions *******************"
dnf -y install kernel-headers kernel-devel gcc make perl 
dnf -y install elfutils elfutils-devel elfutils-libelf elfutils-libelf-devel


echo ""
echo "********************* NOW INSTALLING GROUP ********************"
echo "Basic Web Server"
echo "*****************************************************************"
dnf -y groupinstall --with-optional "Basic Web Server"


echo ""
echo "********************* NOW INSTALLING GROUP ********************"
echo "Graphical Administration Tools"
echo "*****************************************************************"
dnf -y groupinstall --with-optional "Graphical Administration Tools"


echo ""
echo "********************* NOW INSTALLING GROUP ********************"
echo "Development Tools"
echo "*****************************************************************"
dnf -y groupinstall --with-optional "Development Tools"


echo ""
echo "********************* NOW INSTALLING GROUP ********************"
echo "Scientific Support"
echo "*****************************************************************"
dnf -y groupinstall --with-optional "Scientific Support"


echo ""
echo "********************* NOW INSTALLING GROUP ********************"
echo "Smart Card Support"
echo "*****************************************************************"
dnf -y groupinstall --with-optional "Smart Card Support"


echo ""
echo "********************* NOW INSTALLING GROUP ********************"
echo "System Tools"
echo "*****************************************************************"
dnf -y groupinstall --with-optional "System Tools"


echo ""
echo "********************* NOW INSTALLING EXTRAS  ********************"
echo ""
echo "installing xorg-x11-fonts*"
dnf -y install xorg-x11-fonts*

echo ""
echo "installing libreoffice*"
dnf -y install libreoffice*

echo ""
echo "installing mariadb*"
dnf -y install mariadb*

echo ""
echo "installing cups"
dnf -y install cups

echo ""
echo "installing ImageMagick*"
dnf -y install ImageMagick*

echo ""
echo "installing gedit"
dnf -y install gedit

echo ""
echo "installing lftp"
dnf -y install lftp*

echo ""
echo "installing traceroute"
dnf -y install traceroute

echo ""
echo "installing ftp"
dnf -y install ftp

echo ""
echo "installing mutt"
dnf -y install mutt

echo ""
echo "installing NetworkManager*"
dnf -y install NetworkManager*

echo ""
echo "installing openconnect*"
dnf -y install openconnect*

echo ""
echo "installing postfix mailx"
dnf -y install postfix mailx

echo ""
echo "installing evince"
dnf -y install evince

echo ""
echo "installing ncftp"
dnf -y install ncftp

echo ""
echo "installing dkms"
dnf -y install dkms

echo ""
echo "installing gstreamer1* gstreamer1-*"
dnf -y install gstreamer1* gstreamer1-*

echo ""
echo "installing PackageKit-gstreamer-plugin"
dnf -y install PackageKit-gstreamer-plugin

echo ""
echo "installing gimp"
dnf -y install gimp

#echo ""
#echo "installing php php-mbstring php-mcrypt php-mysql"
#dnf -y install php php-mbstring php-mcrypt php-mysql

echo ""
echo "installing php-xml"
dnf -y install php-xml                         # phpMyAdmin

echo ""
echo "installing fail2ban.noarch"
dnf -y install fail2ban.noarch                 # epel

echo ""
echo "installing perl-Array-Diff.noarch"
dnf -y install perl-Array-Diff.noarch

echo ""
echo "installing perl-Array-Unique.noarch"
dnf -y install perl-Array-Unique.noarch

echo ""
echo "installing perl-CPAN"
dnf -y install perl-CPAN

echo ""
echo "installing perl-File-Slurp.noarch"
dnf -y install perl-File-Slurp.noarch          # base

echo ""
echo "installing perl-IPC-System-Simple.noarch"
dnf -y install perl-IPC-System-Simple.noarch   # base

echo ""
echo "installing perl-IO-All.noarch"
dnf -y install perl-IO-All.noarch              # epel

echo ""
echo "installing perl-List-MoreUtils"
dnf -y install perl-List-MoreUtils

echo ""
echo "installing perl-LWP*"
dnf -y install perl-LWP*

echo ""
echo "installing perl-Tie-IxHash"
dnf -y install perl-Tie-IxHash

echo ""
echo "installing bind-utils"
dnf -y install bind-utils

echo ""
echo "installing qt5-qtx11extras"
dnf -y install "qt5-qtx11extras"               # VirtualBox EL7

echo ""
echo "installing vsftpd"
dnf -y install vsftpd

echo ""
echo "installing jq"                                      # TAT
dnf -y install jq

echo ""
echo "installing tidy"
dnf -y install tidy

echo ""
echo "installing pv"
dnf -y install pv

echo ""
echo "installing vim"
dnf -y install vim

echo ""
echo "installing gnome-tweaks"
dnf -y install gnome-tweaks

echo ""
echo "installing keepass"
dnf -y install keepass

echo ""
echo "installing firefox"
dnf -y install firefox

echo ""
echo "installing libcurl-devel"
dnf -y install libcurl-devel

echo ""
echo "installing samba-*"
dnf -y install samba-*

echo ""
echo "installing totem"
dnf -y install totem

echo ""
echo "installing Google Chrome"
if [[ ! -e /root/downloads ]]; then
    mkdir /root/downloads
fi
cd /root/downloads
if [[ -f google-chrome-stable_current_x86_64.rpm ]]; then
    rm google-chrome-stable_current_x86_64.rpm
fi
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf -y localinstall google-chrome-stable_current_x86_64.rpm

echo ""
echo "installing vlc"
dnf -y install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
dnf -y install vlc

echo ""
echo "installing remmina"
dnf -y copr enable castor/remmina
dnf -y install 'remmina*'

echo ""
echo "installing rdesktop"
dnf -y install rdesktop

echo ""
echo "installing pidgin"
dnf -y install pidgin

echo ""
echo "installing qt5-qtx11extras"
dnf -y install qt5-qtx11extras

echo ""
echo "*********************** Install RPM Fusion Repo *****************"
# For GIMP HEIF/HEIC support
# https://www.linuxcapable.com/how-to-install-enable-rpm-fusion-on-centos-8-stream/
dnf -y install https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
echo "gimp-heif-plugin"
dnf -y install gimp-heif-plugin.x86_64

echo ""
echo "*********************** ENABLE SERVICES  ************************"
systemctl start httpd.service
systemctl enable httpd.service
systemctl start chronyd.service
systemctl enable chronyd.service
systemctl start postfix
systemctl enable postfix


echo ""
echo "******************** ENABLE GRAPHICAL LOGIN  ********************"
systemctl isolate graphical.target
systemctl set-default graphical.target


echo ""
echo "*****************************************************************"
echo "*                       AUTO install DONE                       *"
echo "*****************************************************************"


echo ""
echo "*****************************************************************"
echo "You probably want to reboot your machine, then finish next      *"
echo "steps.                                                          *"
echo "*****************************************************************"
echo ""


echo ""
echo "*****************************************************************"
echo "Fix VPN                                                         *"
echo "See: https://bugzilla.redhat.com/show_bug.cgi?id=1549242         "
echo "As root: update-crypto-policies --set LEGACY                     "
echo "*****************************************************************"


echo ""
echo "*****************************************************************"
echo "Install MATE using instructions at:                             *"
echo "https://copr.fedorainfracloud.org/coprs/stenstorp/MATE/          "
echo "*****************************************************************"
echo ""