DirectAdmin System Requirements and RHEL 9 Preparation
DirectAdmin requires a clean RHEL 9 server with at least 2GB RAM and 20GB disk space for basic operation. Your server needs a valid hostname, static IP address, and root access for the installation process.
Start by updating your RHEL 9 system packages:
sudo dnf update -y
sudo dnf install wget curl nano -y
Set your server hostname properly. Replace "server.yourdomain.com" with your actual hostname:
sudo hostnamectl set-hostname server.yourdomain.com
echo "127.0.0.1 server.yourdomain.com" >> /etc/hosts
DirectAdmin performs strict licensing checks based on your server's IP and hostname configuration. Verify your DNS records point correctly to your server before proceeding with the installation.
Download and Install DirectAdmin on RHEL 9
DirectAdmin provides an automated installation script that handles most configuration tasks. Download the installer to your server:
cd /root
wget https://download.directadmin.com/setup.sh
chmod +x setup.sh
Run the installation script with your license credentials. You'll need your DirectAdmin license ID and key:
./setup.sh auto
The installer will prompt for several configuration options. Choose these recommended settings for RHEL 9:
- Apache version: Latest stable (2.4.x)
- PHP versions: 8.1 and 8.2 for compatibility
- Database: MariaDB 10.6
- Mail server: Exim with SpamAssassin
- FTP server: ProFTPd
Installation typically takes 30-60 minutes depending on your server specifications. Monitor the process for any error messages that might require manual intervention.
Configure DirectAdmin Security Settings
Once installation completes, secure your DirectAdmin installation immediately. Access the admin panel at https://your-server-ip:2222 using the credentials shown at installation completion.
Configure these essential security settings first:
Change the default admin password through the DirectAdmin interface. Navigate to Account Manager > Change Password and set a strong password with at least 12 characters.
Enable two-factor authentication if available in your DirectAdmin version. This adds an extra security layer for admin access.
Configure fail2ban protection for DirectAdmin login attempts:
dnf install epel-release -y
dnf install fail2ban -y
systemctl enable fail2ban
systemctl start fail2ban
Create a fail2ban configuration for DirectAdmin by editing /etc/fail2ban/jail.local:
[directadmin-iptables]
enabled = true
filter = directadmin
action = iptables[name=DirectAdmin, port=2222, protocol=tcp]
logpath = /var/log/directadmin/error.log
maxretry = 5
This configuration blocks IPs after 5 failed login attempts, protecting against brute force attacks.
Set Up Your First Hosting Account
Creating your first hosting account validates that DirectAdmin functions properly. From the admin panel, navigate to Account Manager > Create Account.
Configure the account with these settings:
- Username: Choose a descriptive name (avoid "admin" or "test")
- Domain: Use a real domain you control
- Package: Create a custom package or use the default
- Email: Set up the admin email address
Set resource limits appropriate for your server capacity. For a basic 4GB VPS, these limits work well:
- Disk quota: 2GB
- Bandwidth: 50GB monthly
- Email accounts: 50
- Databases: 10
- Subdomains: Unlimited
Test the account creation by logging into the user panel at https://your-server-ip:2222 with the new account credentials.
For agencies managing multiple client sites, consider Hostperl VPS hosting with pre-configured control panels to streamline your workflow.
Configure Email Services and DNS
DirectAdmin installs Exim as the default mail server, but it requires proper DNS configuration to work reliably. Set up these essential DNS records for email functionality:
Add an MX record pointing to your server:
yourdomain.com. IN MX 10 mail.yourdomain.com.
Create an A record for the mail subdomain:
mail.yourdomain.com. IN A your-server-ip
Configure SPF, DKIM, and DMARC records to improve email deliverability. DirectAdmin generates DKIM keys automatically, which you can find under Email Manager > DKIM Keys.
Test email functionality by sending a test message from the DirectAdmin webmail interface. Check spam folders and email headers to verify proper authentication.
For production email hosting, refer to our email server setup guide for advanced configuration options.
Optimize DirectAdmin Performance
DirectAdmin performance depends on proper resource allocation and caching configuration. Adjust these settings based on your server specifications.
Configure Apache for better performance by editing /etc/httpd/conf/httpd.conf:
ServerLimit 16
MaxRequestWorkers 400
ThreadsPerChild 25
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 100
Enable mod_deflate for compression:
LoadModule deflate_module modules/mod_deflate.so
<Location />
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \
\.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
</Location>
Configure MariaDB for optimal performance by editing /etc/my.cnf:
[mysqld]
innodb_buffer_pool_size = 512M
key_buffer_size = 128M
max_connections = 200
query_cache_size = 32M
query_cache_type = 1
Restart Apache and MariaDB to apply changes:
systemctl restart httpd
systemctl restart mariadb
Monitor and Maintain Your DirectAdmin Installation
Regular maintenance keeps DirectAdmin running smoothly and securely. Set up monitoring for key system metrics and automate routine tasks.
Monitor disk usage, as full disks cause DirectAdmin malfunctions:
df -h
du -sh /home/*/domains/*/public_html
Check DirectAdmin logs regularly for errors:
tail -f /var/log/directadmin/error.log
tail -f /var/log/directadmin/system.log
Set up automated backups through DirectAdmin's backup system. Navigate to Admin Tools > Admin Backup/Transfer and configure:
- Backup frequency: Daily
- Retention period: 7 days
- Include: User data, databases, email
- Storage location: Remote FTP or local directory
Update DirectAdmin regularly through the built-in updater:
cd /usr/local/directadmin
./directadmin i
For comprehensive server monitoring beyond DirectAdmin's built-in tools, check our VPS monitoring tutorial using Netdata.
Need professional DirectAdmin hosting without the setup complexity? Hostperl VPS hosting includes pre-configured control panels and expert support for your hosting business.
Frequently Asked Questions
Can I install DirectAdmin on an existing RHEL 9 server with other services?
DirectAdmin requires a clean server installation to avoid conflicts. Existing web servers, databases, or mail services can interfere with DirectAdmin's configuration. Use a fresh RHEL 9 installation for best results.
How do I troubleshoot DirectAdmin installation failures on RHEL 9?
Check the installation log at /root/directadmin_install.log for specific error messages. Common issues include insufficient disk space, network connectivity problems, or incorrect hostname configuration. Verify your license credentials and server specifications before retrying.
What's the difference between DirectAdmin and cPanel for RHEL hosting?
DirectAdmin uses fewer system resources and costs less than cPanel, making it suitable for smaller hosting operations. However, cPanel offers more features and better third-party integration. Consider your budget and feature requirements when choosing between control panels.
How do I migrate existing websites to DirectAdmin on RHEL 9?
Use DirectAdmin's migration tools under Admin Tools > Admin Backup/Transfer to import cPanel backups or manually transfer files via FTP. Create user accounts first, then upload website files and import databases through phpMyAdmin.
Can I run multiple PHP versions with DirectAdmin on RHEL 9?
Yes, DirectAdmin supports multiple PHP versions simultaneously. Configure different PHP versions per domain through the user panel under Domain Setup > PHP Version Selection. Install additional PHP versions through the DirectAdmin admin panel if needed.

