Skip to main content

Rocky Linux Installation Guide

Basic System Configuration

Update the System

Open the terminal and run the following command to update the system:

sudo dnf update -y

Set Up SSH Access

Make sure the SSH service is started:

sudo systemctl enable sshd
sudo systemctl start sshd

Rename the Machine

hostnamectl set-hostname your_server`s_name

Update Software

dnf update

Install Enterprise Extra Software Repository

dnf install epel-release

Configure the Firewall

Enable Firewalld and configure basic rules:

Enable the Firewalld service and add a rule to allow SSH access:

sudo systemctl enable firewalld
sudo systemctl start firewalld
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload

Basic Software

Install Common Software

Install common software as needed, for example:

sudo dnf install vim git wget curl build-essential cmake make git-lfs -y

btop, htop

dnf install htop
dnf install btop

docker

Docker installation script:

#!/bin/bash
# Update system software
dnf update
# Add the official repository
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# Install the corresponding software
dnf install docker-ce docker-ce-cli containerd.io
# Set Docker to start on boot
systemctl enable docker
# Start Docker
systemctl start docker