Basic AlmaLinux Server Setup Checklist (Post-Installation)

1. Update the Server

dnf update -y

2. Set the Hostname

hostnamectl set-hostname your.hostname.com

3. Create a New Sudo User

adduser newadmin
passwd newadmin
usermod -aG wheel newadmin

4. Configure the Firewall

Enable and start firewalld

systemctl enable firewalld –now

Allow basic ports (SSH, HTTP, HTTPS)

firewall-cmd –permanent –add-service=ssh
firewall-cmd –permanent –add-service=http
firewall-cmd –permanent –add-service=https
firewall-cmd –reload

5. Partition the Disk (if not yet done)

Use lsblk to identify available disks.

Example using fdisk for /dev/sdb:

fdisk /dev/sdb

Follow prompts to create new partition (n), write (w)

mkfs.ext4 /dev/sdb1
mkdir /mnt/data
mount /dev/sdb1 /mnt/data
echo “/dev/sdb1 /mnt/data ext4 defaults 0 0” >> /etc/fstab

6. Set Up SSH Security

Edit SSH config:

nano /etc/ssh/sshd_config

Change: PermitRootLogin no
Optional: Port 2222 (custom port)

systemctl restart sshd

7. Install Common Utilities

dnf install -y wget curl git net-tools vim unzip

8. Set Timezone & Enable NTP

timedatectl set-timezone Asia/Dubai
dnf install -y chrony
systemctl enable chronyd –now

9. Install and Configure a Web Stack (Optional)

For example, LAMP:

dnf install -y httpd mariadb-server php php-mysqlnd
systemctl enable httpd mariadb –now

By admin