• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Swift Guides

Howtos, Tutorials & Guides

  • Home
  • Servers
  • Applications
  • Opinions
  • Search
You are here: Home / Servers / Initial Rocky or Alma Linux Server Setup

Initial Rocky or Alma Linux Server Setup

May 27, 2024 by Sourabh Verma

Rocky and Alma Linux setup are almost the same and so is the configuration. Here in this guide, we will do some initial Rocky or Alma Linux server setup that will add a solid foundation as well as it will also add a good layer of security.

Initial-rocky-or-alma-linux-server-setup
Initial-rocky-or-alma-linux-server-setup

Prerequisite

  • You must have a Rocky or Alma Linux server installed
  • Root user and password ready

Step 1 – Login as root

1. Open the “putty” SSH tool, and enter your “server’s public IP address” in the Host Name field. Enter “22” in port and click on “Open“.

2. If it shows you any kind of warning, click on “accept”.

3. Enter “root” in place of username and hit “Enter”

4. Enter the “password” and hit “Enter“

Step 2 – Creating a new user

The first thing that we will do is, we will create a user so that we can perform further actions.

$ adduser ashish

Step 3 – Assigning “sudo” privileges to the new user

Execute the below command to create a new user “ashish”

$ usermod -aG wheel ashish

1. Set password for new user

$ passwd ashish

Note: Enter the password of your choice. Make sure to enter a strong password.

Step 3 – Installing and setting up firewall

Rocky and Alma Linux works best with “Firewalld” as the firewall. Hence, we will install the same for our setup

$ dnf install firewalld -y

The above command will install Firewalld on your server.

Step 4 – Start, enable and setup firewall

Execute the following commands to start and enable the firewall

 $ systemctl start firewalld
$ systemctl enable firewalld

“OpenSSH” is enabled by default in the firewall so we will add “http” and “https” in the firewall so that our server can accept on both “http” and “https” requests.

Step 5 – Allow http and https in firewall

Execute the given below commands one by one to allow http and https through the firewall

 $ firewall-cmd --permanent --add-service=http
$ firewall-cmd --permanent --add-service=https

Reload the firewall to apply new rules

$ firewall-cmd --reload

That’s it, you have your server with a solid foundation.

Category: Servers Tagged In: alma, rocky, Server

Like my work? Don't Forget to Share

Share on Facebook Share on Twitter Share on LinkedIn Share on Reddit Share on WhatsApp Share via Email

Hi, welcome to SwiftGuides! With over 12 years of experience in Linux, SysAdmin, databases, cloud computing, and other IT-related areas, I make sure publish easy-to-follow, 100% working tutorials. I hope you like my work. Thanks!

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Stay With Us

Follow on Facebook Follow on Twitter Follow on LinkedIn Follow on Reddit Subscribe on YouTube Follow on Instagram

SwiftGuides: Howtos, Tutorials & Guides © 2025 · All Rights Reserved

  • Contact Us
  • Privacy Policy
  • Disclaimer