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
| OS | Cost | Support | Use Case |
|---|---|---|---|
| Rocky Linux 9 | Free | Community + sponsors | Production, perfect for most |
| RHEL 9 | $$$ | Red Hat official | Enterprise support contracts |
| CentOS Stream | Free | Rolling release | Cutting-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
- Set up SSH key authentication
- Create non-root user and configure sudo
- Install a control panel (aaPanel, DirectAdmin)
- Configure SELinux policies for your apps
- Set up monitoring and backups
- Deploy your applications
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
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.





















