UnderHost
Knowledgebase Docs

Getting Started with Rocky Linux 9 on Your VPS

Rocky Linux 9 setup guide: SSH access, yum updates, firewall (firewalld), user management, RHEL 9 compatibility.

On this page

Rocky Linux 9 is a community-driven, RHEL 9-compatible operating system. It's the successor to CentOS and is ideal for production servers requiring stability, long-term support, and enterprise compatibility. Perfect for hosting control panels, databases, and business applications.

About Rocky Linux 9

  • Release date: July 2022
  • Support until: May 2032 (10 years)
  • RHEL compatible: 1:1 compatibility with RHEL 9
  • Package manager: yum/dnf (not apt)
  • Init system: systemd

Rocky vs RHEL vs CentOS

OSCostSupportUse Case
Rocky Linux 9FreeCommunity + sponsorsProduction, perfect for most
RHEL 9$$$Red Hat officialEnterprise support contracts
CentOS StreamFreeRolling releaseCutting-edge, less stable

Connect via SSH

ssh root@your-vps-ip

# With SSH key
ssh -i ~/.ssh/id_rsa root@your-vps-ip

Update System

# Update package lists and system
dnf update -y

# Install automatic security updates
dnf install dnf-automatic -y
systemctl enable dnf-automatic.timer
systemctl start dnf-automatic.timer

Configure Firewall

# Check firewall status
firewall-cmd --state

# Enable and start firewalld
systemctl enable firewalld
systemctl start firewalld

# Allow SSH (critical!)
firewall-cmd --permanent --add-service=ssh
firewall-cmd --permanent --add-port=22/tcp

# Allow HTTP/HTTPS
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https

# Reload firewall
firewall-cmd --reload

# Check rules
firewall-cmd --list-all

Install Packages

# Development tools
dnf groupinstall "Development Tools" -y
dnf install git curl wget -y

# Utilities
dnf install htop tmux vim nano zip unzip -y

# Web servers and databases
dnf install nginx -y                # Web server
dnf install mysql-server -y         # MySQL
dnf install php php-fpm -y          # PHP

SELinux Management

SELinux (Security Enhanced Linux) restricts what processes can access:**

# Check SELinux status
getenforce
sestatus

# Disable SELinux (if causing issues - not recommended for production)
setenforce 0

# Set to permissive mode (log violations but don't block)
setenforce 1

# Edit /etc/selinux/config for permanent changes

Next Steps

  1. Set up SSH key authentication
  2. Create non-root user and configure sudo
  3. Install a control panel (aaPanel, DirectAdmin)
  4. Configure SELinux policies for your apps
  5. Set up monitoring and backups
  6. Deploy your applications
Rocky Linux is RHEL-compatible

All RHEL documentation applies to Rocky Linux. This means enterprise tooling, control panels (cPanel, DirectAdmin), and production packages work seamlessly.

Related: Rocky Linux 8 | OS comparison | VPS setup | RHEL-based systems

Was this article helpful?

Need a server with this OS?

Deploy Linux or Windows workloads on an UnderHost Cloud VPS or dedicated server with the operating system that fits your stack.

Related articles

Back to Operating Systems