Installing Rocky Linux 9
A detailed guide on installing rocky linux is available at: docs.rockylinux.org.
Download and verify ISO
-
Download using
wget
:wget https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.0-20220808.0-x86_64-dvd.iso
-
Check validity of ISO
wget https://download.rockylinux.org/pub/rocky/9.0/isos/x86_64/CHECKSUM sha256sum -c CHECKSUM --ignore-missing
-
Make bootable USB
sudo dd if=/path/to/iso.iso of=/dev/sdX status=progress
Change
/path/to/iso
and/dev/sdX
appropriately. Uselsblk
ordiskutil list
(macos) to find available drives.
Install OS using anaconda
Follow the instructions shown. Setup keyboard, language, drive, softwares, network, hostname, time & date, root password and default user. Make sure to give administrator
privileges to default user.
Installing Graphical environment (Gnome)
sudo dnf group list
sudo dnf groupinstall "Workstation"
sudo dnf groupinstall "Server with GUI"
sudo systemctl set-default graphical
sudo reboot
Install CUDA drivers and cudatoolkit
A detailed instruction is available at: cuda-installation-guide-linux.
-
Install development tools, kernel, libraries
sudo dnf config-manager --set-enabled crb # codeready-builder sudo dnf group install -y "Development tools" sudo dnf install epel-release rpmfusion-free-release # extra and free sudo dnf install -y kernel-devel kernel-headers
-
Instructions from Nvidia Cudatoolkit: developer.nvidia.com/cuda-downloads.
sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo sudo dnf clean all sudo dnf -y module install nvidia-driver:latest-dkms sudo dnf -y install cuda
-
Post-installation setup
Append to bash environment:
export PATH=/usr/local/cuda-11.8/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64\ ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
-
Install third-party libraries
sudo dnf install libX11-devel libXi-devel libXmu-devel make mesa-libGLU-devel freeimage-devel sudo dnf --enablerepo=devel install freeglut-devel
-
Verify cuda environment
Download cuda samples, compile and run
deviceQuery
.
Setup terminal environment
-
Install zsh
sudo dnf install zsh
-
(Optional) setup and customizations
- ohmyzsh: https://ohmyz.sh/
- nordtheme: https://www.nordtheme.com/
- Fira code fonts: https://github.com/tonsky/FiraCode
Install libraries, apps, tools
-
Monitoring apps
sudo dnf install htop btop glances
-
Build tools
sudo dnf install libdrm-devel systemd-devel sudo dnf install cmake ncurses-devel git gcc-c++ sudo dnf install qt5-qtdeclarative
additional:
sudo dnf install gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig # programming
-
Audio/Video dependencies
sudo dnf install vlc ffmpeg ffmpeg-devel
Install popular apps using Flatpak
-
Setup
FlatHub
repo: flathub.orgsudo dnf install flatpak flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo sudo reboot
-
Install vscode, spotify, etc.
flatpak install flathub com.spotify.Client flatpak install flathub com.slack.Slack flatpak install flathub us.zoom.Zoom
Setup python environment
Install a conda environment using mambaforge: github.com/conda-forge/miniforge
More info
- CRB: (CRB is "Code Ready Builder" - PowerTools was a carryover from CentOS, which is still the equivalent of CRB in RHEL. crb will be the repository name going forward in Rocky Linux and other derivatives.) More info
Additional resources:
- https://www.linuxcapable.com/how-to-install-ffmpeg-on-rocky-linux-9/
- https://medium.com/@panda1100/setup-nvidia-gpu-driver-on-rocky-linux-9-0-166d7ce111b2A
- https://darryldias.me/2021/nvidia-drivers-on-rocky-linux/
- https://www.if-not-true-then-false.com/2021/install-nvidia-drivers-on-centos-rhel-rocky-linux/