==== dnf installer bash script (Rocky Linux 9) ====
When you run the code below, ensure to redirect output and errors to a log file.\\
**If this is a new install, consider the SELinux settings.**
This may not be needed, but if slow downloading of packages occurs, modify /etc/dnf/dnf.conf to **use the fastest mirror**. A fix is noted in [[virtualbox_for_centos_stream_notes|Virtual Box running CentOS8 Stream]]
__Errors with the script__:
* RPM Perl-Array-Diff not available - now working in RL 9.2
* RPM Perl-IO-All not available - now working in RL 9.2
* Both can be installed using cpanm (see [[install_configure_cpan|CPAN Tips]])
* Errors running ''dnf -y copr enable stenstorp/lightdm'' but system still boots into Xfce OK
* perl-Math-Round not available, but perl-Math-Round-0.07-25.fc38.noarch.rpm works
\\
----
\\
#!/bin/bash
#
# install-my-dnf-packages.bash
# Rocky Linux 9.3 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 "dnf -y install wget"
dnf -y install wget
echo ""
echo "dnf -y install epel-release"
dnf -y install epel-release
echo ""
echo "Enable the CRB repo (added by EPEL, the old PowerTools)"
dnf install dnf-plugins-core
/usr/bin/crb enable
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 "*****************************************************************"
# Do not install optional packages (avoid problems with mod_security)
dnf -y groupinstall "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 "About to install: xorg-x11-fonts*"
dnf -y install xorg-x11-fonts*
echo ""
echo "About to install: libreoffice*"
dnf -y install libreoffice*
echo ""
echo "About to install: mariadb*"
dnf -y install mariadb*
echo ""
echo "About to install: cups"
dnf -y install cups
echo ""
echo "About to install: alpine"
dnf -y install alpine
echo ""
echo "About to install: ImageMagick*"
dnf -y install ImageMagick*
echo ""
echo "About to install: gedit"
dnf -y install gedit
echo ""
echo "About to install: lftp"
dnf -y install lftp*
echo ""
echo "About to install: traceroute"
dnf -y install traceroute
echo ""
echo "About to install: firewall-config"
dnf -y install firewall-config
echo ""
echo "About to install: ftp"
dnf -y install ftp
echo ""
echo "About to install: mate-user-admin"
dnf -y install mate-user-admin
echo ""
echo "About to install: mutt"
dnf -y install mutt
echo ""
echo "About to install: NetworkManager*"
dnf -y install NetworkManager*
echo ""
echo "About to install: openconnect*"
echo "NOTE: Check for openconnect-devel errors"
dnf -y install openconnect*
echo ""
echo "About to install: postfix"
dnf -y install postfix
echo ""
echo "About to install: s-nail since mailx is not available in Rocky Linux 9"
dnf -y install s-nail
echo ""
echo "About to install: evince"
dnf -y install evince
echo ""
echo "About to install: remmina"
dnf -y install remmina
echo ""
echo "About to install: ncftp"
dnf -y install ncftp
echo ""
echo "About to install: dkms"
dnf -y install dkms
echo ""
echo "About to install: gstreamer1* gstreamer1-*"
dnf -y install gstreamer1* gstreamer1-*
echo ""
echo "About to install: PackageKit-gstreamer-plugin"
dnf -y install PackageKit-gstreamer-plugin
echo ""
echo "About to install: gimp"
dnf -y install gimp
echo ""
echo "About to install: php-xml"
dnf -y install php-xml # phpMyAdmin
echo ""
echo "About to install: fail2ban.noarch"
dnf -y install fail2ban.noarch
echo ""
echo "About to install: python3-PyMySQL"
dnf -y install python3-PyMySQL
echo ""
echo "About to install: python3-pytz"
dnf -y install python3-pytz
echo ""
echo "About to install: python3-pip"
dnf -y install python3-pip
echo ""
echo "TODO: About to install: perl-Array-Diff.noarch"
# If won't install, use cpanm
# find_missing_asm_files.pl
dnf -y install perl-Array-Diff.noarch
echo ""
echo "About to install: perl-Array-Unique.noarch"
dnf -y install perl-Array-Unique.noarch
echo ""
echo "About to install: perl-CPAN"
dnf -y install perl-CPAN
echo ""
echo "About to install: perl-File-Slurp.noarch"
dnf -y install perl-File-Slurp.noarch
echo ""
echo "About to install: perl-HTML-TableExtract.noarch"
dnf -y install perl-HTML-TableExtract.noarch
echo ""
echo "About to install: perl-IPC-System-Simple.noarch"
dnf -y install perl-IPC-System-Simple.noarch
echo ""
echo "TODO About to install: perl-IO-All.noarch"
# check_stations.pl
# If EPEL 9 version not available, use cpanm
dnf -y install perl-IO-All.noarch
echo ""
echo "About to install: perl-JSON"
dnf -y install perl-JSON
echo ""
echo "About to install: perl-List-MoreUtils"
dnf -y install perl-List-MoreUtils
echo ""
echo "About to install: perl-List-Compare.noarch"
dnf -y install perl-List-Compare.noarch
echo ""
echo "About to install: perl-LWP*"
dnf -y install perl-LWP*
echo ""
echo "installing perl-Hash-MultiValue"
dnf -y install perl-Hash-MultiValue
echo ""
echo "installing perl-DBD-MySQL"
dnf -y install perl-DBD-MySQL
echo ""
echo "About to install: bind-utils"
dnf -y install bind-utils
echo ""
echo "About to install: qt5-qtx11extras"
dnf -y install "qt5-qtx11extras" # VirtualBox
echo ""
echo "About to install: qt5-qttools-libs-help"
dnf -y install "qt5-qttools-libs-help" # VirtualBox
echo ""
echo "About to install: vsftpd"
dnf -y install vsftpd
echo ""
echo "About to install: jq" # TAT
dnf -y install jq
# For sponge command, such as:
# find . -type f -exec sh -c 'jq . "{}"|sponge "{}"' \;
echo ""
echo "About to install: moreutils"
dnf -y install moreutils
echo ""
echo "About to install: tidy"
dnf -y install tidy
echo ""
echo "About to install: pv"
dnf -y install pv
echo ""
echo "About to install: vim"
dnf -y install vim
echo ""
echo "About to install: gparted"
dnf -y install gparted
echo ""
echo "About to install: ncdu"
dnf -y install ncdu
echo ""
echo "About to install: gnome-tweaks"
dnf -y install gnome-tweaks
echo ""
echo "About to install: gnome-*"
dnf -y install gnome-*
echo ""
echo "About to install: seahorse"
dnf -y install seahorse
echo ""
echo "About to install: keepassxc"
dnf -y install keepassxc
echo ""
echo "About to install: firefox"
dnf -y install firefox
echo ""
echo "About to install: thunderbird"
dnf -y install thunderbird
echo ""
echo "About to install: libcurl-devel"
dnf -y install libcurl-devel
echo ""
echo "About to install: samba-*"
dnf -y install samba-*
echo ""
echo "About to install: totem"
dnf -y install totem
echo ""
echo "About to install: wgrib2"
dnf -y install wgrib2
echo ""
echo "About to install: mytop"
dnf -y install mytop
echo ""
echo "About to install: 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 "About to install: Google Chrome Beta"
cd /root/downloads
if [[ -f google-chrome-beta_current_x86_64.rpm ]]; then
rm google-chrome-beta_current_x86_64.rpm
fi
wget https://dl.google.com/linux/direct/google-chrome-beta_current_x86_64.rpm
dnf -y localinstall google-chrome-beta_current_x86_64.rpm
echo ""
echo "About to install: vlc"
dnf -y install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm
dnf -y install vlc
echo ""
echo "About to install: inxi"
dnf -y install inxi
echo ""
echo "About to install: audacity"
dnf -y install audacity
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 "Installing XFCE for Rocky Linux 9... *"
echo "See https://docs.rockylinux.org/guides/desktop/xfce_installation/"
echo "for more information. "
echo "*****************************************************************"
dnf -y copr enable stenstorp/lightdm
dnf -y groupinstall "xfce"
dnf -y install xfce4-cpugraph-plugin
dnf -y install xfce4-weather-plugin
dnf -y install lightdm
systemctl disable gdm
systemctl enable lightdm
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 "Test, then fix VPN if needed *"
echo "See: https://bugzilla.redhat.com/show_bug.cgi?id=1549242 "
echo "As root: update-crypto-policies --set LEGACY "
echo "*****************************************************************"
echo ""
echo "*****************************************************************"
echo "MATE not yet available for Rocky Linux 9 *"
echo "See https://forums.rockylinux.org/t/mate-being-added-to-epel-8-and-9/6479/4"
echo "*****************************************************************"
echo ""
echo "*****************************************************************"
echo "* END OF INSTALL *"
echo "*****************************************************************"
echo ""