FedoraRHEL Based

How To Install OrangeHRM on Fedora 43

Install OrangeHRM on Fedora 43

OrangeHRM is a powerful open-source human resource management system that helps organizations streamline employee data, leave tracking, recruitment, performance reviews, and time management—all through a simple web interface. Built on PHP and MySQL, it runs beautifully on Linux servers using the classic LAMP stack (Linux, Apache, MySQL/MariaDB, PHP). Fedora 43, with its cutting-edge packages, robust SELinux security framework, and efficient DNF package manager, provides an ideal foundation for hosting your HR platform.

This comprehensive guide walks you through every step of deploying OrangeHRM on Fedora 43, from initial system preparation to post-installation hardening. Whether you’re setting up a VPS, cloud instance, or bare-metal server, you’ll have a production-ready HR system by the end of this tutorial. Let’s dive in.

Table of Contents

What Is OrangeHRM and Why Run It on Fedora 43?

Understanding OrangeHRM’s Core Capabilities

OrangeHRM delivers a complete suite of HR modules that rival expensive commercial platforms. The employee database centralizes personnel records, contact information, qualifications, and employment history. Leave management automates vacation requests, sick leave tracking, and approval workflows, reducing manual paperwork dramatically. The recruitment module helps you post job openings, screen candidates, schedule interviews, and manage the entire hiring pipeline from one dashboard.

Performance management features enable goal setting, review cycles, and competency tracking. Time and attendance tracking lets employees clock in and out while managers monitor project hours and generate reports. Because OrangeHRM is web-based, your team accesses everything through a browser—no special client software required.

The Advantages of Self-Hosting Your HR Platform

Running OrangeHRM on your own infrastructure gives you complete control over sensitive employee data, which is critical for compliance with privacy regulations. You can customize modules, integrate with existing authentication systems like LDAP or Active Directory, and extend functionality through plugins without vendor limitations. Cost savings add up quickly since you pay only for hosting and maintenance rather than per-user SaaS fees. Plus, you can scale hardware resources as your organization grows without renegotiating contracts.

Why Fedora 43 Stands Out as a Host OS

Fedora’s rapid release cycle ensures you get the latest stable versions of Apache, PHP 8.x, and MariaDB right from the official repositories. SELinux is enabled by default, providing mandatory access controls that protect your HR data from unauthorized access even if an application vulnerability exists. The DNF package manager simplifies installing dependencies and keeping your system patched. Fedora also serves as upstream for Red Hat Enterprise Linux, so techniques you learn here translate directly to enterprise environments.

Installation Methods and Scope of This Tutorial

Deployment Options for OrangeHRM on Linux

You can deploy OrangeHRM using several approaches. The traditional LAMP stack pairs Apache HTTP Server with PHP and MariaDB, offering proven stability and wide community support. Some administrators prefer an LEMP stack, swapping Apache for Nginx for slightly different performance characteristics. Containerized deployments with Docker or Podman provide portability and easier rollback but add complexity. OrangeHRM also offers automated middleware installers for certain RHEL-family distributions that bundle all components.

What This Fedora 43 Guide Covers

This tutorial focuses on a manual LAMP-style installation, giving you full understanding and control of every component. You’ll install Apache 2.4, PHP 8.x with required extensions, and MariaDB 10.x, then deploy OrangeHRM’s web-based installer. The instructions work equally well on physical servers, virtual machines, and cloud instances running Fedora 43. We’ll pay special attention to Fedora-specific elements like firewalld configuration and SELinux context management.

Pre-Installation Checklist and Requirements

Hardware and Performance Considerations

For small teams (under 50 users), a dual-core processor, 2 GB RAM, and 20 GB disk space will suffice. Medium organizations should consider 4 GB RAM and a quad-core CPU to handle concurrent logins during peak hours. Larger deployments benefit from 8 GB+ RAM and SSD storage for faster database queries. Remember that HR attachments (resumes, contracts, certificates) consume storage over time, so plan for growth.

Software Stack Requirements

OrangeHRM requires Apache or Nginx as the web server, PHP 7.2 or newer (PHP 8.x strongly recommended for security and performance), and MySQL 5.5+ or MariaDB 10.x. Essential PHP extensions include mysqli or PDO for database connectivity, gd for image processing, mbstring for multi-byte character handling, xml for parsing configuration files, and zip for handling archive uploads. The curl extension enables external API integrations if you plan to use them later.

Network, DNS, and Security Prerequisites

Assign your server a static IP address or configure a DNS hostname so users can reliably reach the HR portal. Open TCP ports 80 (HTTP) and 443 (HTTPS) in your firewall. Plan to obtain an SSL/TLS certificate from Let’s Encrypt or your organization’s certificate authority to encrypt HR data in transit. Since Fedora enforces SELinux and uses firewalld by default, you’ll need to accommodate both when configuring Apache access and file permissions.

Step 1 – Prepare Your Fedora 43 Server

Update System Packages

Start by refreshing the package cache and upgrading all installed software to eliminate known vulnerabilities:

sudo dnf upgrade --refresh -y

Confirm you’re running Fedora 43:

cat /etc/fedora-release

Set your server’s hostname for easier identification:

sudo hostnamectl set-hostname hrm.example.com

Check that your time zone is correct and NTP synchronization is active to avoid log timestamp confusion:

timedatectl status

If needed, set your time zone:

sudo timedatectl set-timezone Asia/Jakarta

Create a Non-Root Administrative User

Working as root increases the risk of accidental system damage. Create a dedicated user with sudo privileges:

sudo useradd -m -s /bin/bash hradmin
sudo passwd hradmin
sudo usermod -aG wheel hradmin

Log out and reconnect as hradmin for the remainder of this tutorial. This approach follows Linux best practices and limits the impact of mistakes.

Step 2 – Install and Configure Apache on Fedora 43

Install Apache HTTP Server

Fedora packages Apache as httpd. Install it along with useful utilities:

sudo dnf install httpd httpd-tools -y

Enable the service so it starts automatically on boot:

sudo systemctl enable httpd

Start Apache immediately:

sudo systemctl start httpd

Verify the service is running:

sudo systemctl status httpd

Basic Apache Configuration

Open the main configuration file to set your server name:

sudo nano /etc/httpd/conf/httpd.conf

Find the #ServerName line and uncomment it, replacing with your actual hostname or IP:

ServerName hrm.example.com:80

Save and exit. Test the configuration for syntax errors:

sudo apachectl configtest

You should see “Syntax OK.” Restart Apache to apply changes:

sudo systemctl restart httpd

Create a Virtual Host for OrangeHRM

Rather than mixing OrangeHRM files in the default document root, create a dedicated virtual host. Make a configuration file:

sudo nano /etc/httpd/conf.d/orangehrm.conf

Add this virtual host block:

<VirtualHost *:80>
    ServerName hrm.example.com
    DocumentRoot /var/www/html/orangehrm
    
    <Directory /var/www/html/orangehrm>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    
    ErrorLog /var/log/httpd/orangehrm_error.log
    CustomLog /var/log/httpd/orangehrm_access.log combined
</VirtualHost>

Save the file. This configuration enables .htaccess overrides and logs OrangeHRM requests separately.

Step 3 – Install PHP 8.x and Required Extensions

Install PHP and Modules

Fedora 43 includes PHP 8.x in its repositories. Install PHP along with the modules OrangeHRM needs:

sudo dnf install php php-cli php-mysqlnd php-gd php-xml php-mbstring php-zip php-curl php-intl php-json php-soap -y

The php-mysqlnd package provides the MySQL native driver for database connectivity. The gd extension handles image uploads for employee photos. mbstring supports international character sets in names and addresses. xml and json parse configuration and API data. zip enables bulk imports.

Tune PHP Settings for HR Workflows

Open the PHP configuration file:

sudo nano /etc/php.ini

Adjust these values to accommodate file uploads and long-running imports:

memory_limit = 256M
upload_max_filesize = 20M
post_max_size = 24M
max_execution_time = 300
max_input_time = 300
date.timezone = Asia/Jakarta

The larger memory limit prevents crashes when processing bulk employee data. Higher upload sizes let HR staff attach resumes and contracts. Extended execution times avoid timeouts during database migrations.

Restart Apache to load the new PHP configuration:

sudo systemctl restart httpd

Step 4 – Install and Secure MariaDB, Then Create the OrangeHRM Database

Install MariaDB Server

Install MariaDB, Fedora’s default MySQL-compatible database:

sudo dnf install mariadb-server mariadb -y

Enable and start the database service:

sudo systemctl enable mariadb
sudo systemctl start mariadb

Check that MariaDB is running:

sudo systemctl status mariadb

Run Initial Security Hardening

Execute the security script to set a root password and remove test databases:

sudo mysql_secure_installation

Press Enter when asked for the current root password (none exists yet). Type Y to set a new root password and choose a strong one. Answer Y to remove anonymous users, disallow remote root login, remove the test database, and reload privileges.

Create Database and User for OrangeHRM

Log into MariaDB as root:

sudo mysql -u root -p

Create a dedicated database:

CREATE DATABASE orangehrm_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Create a user with a strong password:

CREATE USER 'orangehrm_user'@'localhost' IDENTIFIED BY 'StrongPassword123!';

Grant privileges only on the OrangeHRM database:

GRANT ALL PRIVILEGES ON orangehrm_db.* TO 'orangehrm_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

This principle of least privilege limits damage if the OrangeHRM application is compromised.

Step 5 – Download OrangeHRM and Prepare the Web Directory

Obtain the Latest OrangeHRM Release

Visit the OrangeHRM official site or SourceForge to download the latest stable community edition. Use wget from your server:

cd /tmp
wget https://sourceforge.net/projects/orangehrm/files/stable/5.7/orangehrm-5.7.zip

Replace the version number with the current release.

Extract Files into Apache’s Document Root

Unzip the archive:

sudo dnf install unzip -y
sudo unzip orangehrm-5.7.zip -d /var/www/html/

Rename the extracted directory for cleaner URLs:

sudo mv /var/www/html/orangehrm-5.7 /var/www/html/orangehrm

Set Ownership, Permissions, and SELinux Contexts

Change ownership to the Apache user:

sudo chown -R apache:apache /var/www/html/orangehrm

Set appropriate permissions:

sudo find /var/www/html/orangehrm -type d -exec chmod 755 {} \;
sudo find /var/www/html/orangehrm -type f -exec chmod 644 {} \;

Now handle SELinux contexts so Apache can read and write files:

sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/orangehrm(/.*)?"
sudo restorecon -Rv /var/www/html/orangehrm

If semanage is missing, install policycoreutils-python-utils:

sudo dnf install policycoreutils-python-utils -y

These SELinux commands prevent cryptic permission denied errors that puzzle many first-time Fedora users.

Step 6 – Open Firewall Ports and Verify Apache/PHP

Configure Firewalld to Allow HTTP and HTTPS

Fedora’s firewalld blocks incoming traffic by default. Open web ports:

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload

Confirm the rules are active:

sudo firewall-cmd --list-services

You should see http and https in the output.

Test Apache and PHP

Create a PHP info page:

echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/orangehrm/info.php

Open a browser and navigate to http://your-server-ip/orangehrm/info.php. You should see a detailed PHP configuration page showing version 8.x and all installed modules. Verify that mysqli, gd, mbstring, xml, and zip appear in the list. Delete the info page afterward for security:

sudo rm /var/www/html/orangehrm/info.php

Step 7 – Run the OrangeHRM Web Installer on Fedora 43

Start the Web Installer

Point your browser to http://your-server-ip/orangehrm or http://hrm.example.com. The OrangeHRM installer launches automatically, welcoming you with a license agreement screen.

Validate Environment Prerequisites

Click Next to reach the system check page. The installer verifies PHP version, required extensions, directory permissions, and database connectivity. Green checkmarks indicate everything is ready. Red X marks signal problems—common issues include missing PHP modules or incorrect SELinux contexts. If you see errors, revisit Step 3 (PHP extensions) or Step 5 (permissions and SELinux).

Configure Database Connection

On the database configuration screen, enter:

  • Database Host: localhost
  • Database Port: 3306
  • Database Name: orangehrm_db
  • Database Username: orangehrm_user
  • Database Password: StrongPassword123! (or whatever you set earlier)

Check “Use the same Database User for OrangeHRM” and click Next. The installer creates the necessary schema and tables.

Create Administrator Account

The next screen asks for organization details and the first admin user. Fill in:

  • Organization Name: Your company name
  • Admin Username: Choose a secure username (not “admin”)
  • Admin Password: Use a strong, unique password
  • Contact Email: A valid email for notifications

Click Next. The installer populates the database and generates configuration files.

Complete Installation

When you see the success message, click “Finish.” The installer redirects you to the login page. Use your new admin credentials to sign in and explore the dashboard.

Step 8 – Post-Installation Configuration and Hardening

Remove Installer Files

Delete the installer directory to prevent unauthorized re-runs:

sudo rm -rf /var/www/html/orangehrm/installer

This step is critical—leaving the installer accessible is a common security mistake.

Tighten File Permissions

Most directories should be read-only for Apache. Identify writable locations (uploads, cache) from OrangeHRM documentation and restrict write access there only:

sudo chmod -R 755 /var/www/html/orangehrm
sudo chmod -R 775 /var/www/html/orangehrm/symfony/cache
sudo chmod -R 775 /var/www/html/orangehrm/lib/logs

Configure HTTPS with Let’s Encrypt

Install Certbot to obtain a free SSL certificate:

sudo dnf install certbot python3-certbot-apache -y

Request a certificate:

sudo certbot --apache -d hrm.example.com

Follow the prompts. Certbot automatically updates your Apache virtual host to redirect HTTP to HTTPS. Test renewal:

sudo certbot renew --dry-run

Enable automatic renewal:

sudo systemctl enable certbot-renew.timer

Set Up Cron Jobs and Email

OrangeHRM may require scheduled tasks for reminders and data cleanup. Create a cron job:

sudo crontab -e -u apache

Add a line like:

0 2 * * * /usr/bin/php /var/www/html/orangehrm/symfony/scripts/cron.php

Configure outbound SMTP in OrangeHRM’s Email Configuration under Admin > Configuration to enable password resets and leave notifications.

Step 9 – Verifying Your OrangeHRM Instance and Basic Usage

First Login and Dashboard Exploration

Log in with your admin credentials. The dashboard displays key metrics: headcount, leave calendar, and quick links to modules. Click through PIM (Personnel Information Management), Leave, Time, and Recruitment to familiarize yourself with the interface.

Sanity Checks with Sample Data

Add a test employee under PIM > Add Employee. Upload a profile photo to verify file uploads work. Navigate to Leave > Apply and submit a sample leave request. Check that the request appears in your inbox if you’re also a supervisor. Create a job vacancy under Recruitment to test the hiring workflow. These quick tests confirm database operations, file handling, and workflows function correctly.

Step 10 – Common Issues on Fedora 43 and How to Fix Them

SELinux Permission Denied Errors

If pages load blank or logs show “permission denied,” SELinux contexts are likely incorrect. Check the audit log:

sudo ausearch -m avc -ts recent

Apply contexts again:

sudo restorecon -Rv /var/www/html/orangehrm

Allow Apache to connect to the database if needed:

sudo setsebool -P httpd_can_network_connect_db on

Never disable SELinux entirely—it’s your strongest defense against exploits.

PHP Module or Timeout Issues

Missing extensions cause cryptic errors. Verify installed modules:

php -m | grep -E 'mysqli|gd|mbstring|xml|zip'

If any are absent, install them with dnf and restart Apache. For timeout errors during large imports, increase max_execution_time in php.ini beyond 300 seconds.

Database Connection Failures

Double-check credentials in /var/www/html/orangehrm/lib/confs/Conf.php. Log into MariaDB manually to confirm the user and database exist:

mysql -u orangehrm_user -p orangehrm_db

If you see “Access denied,” recreate the user with correct privileges.

Step 11 – Performance Tuning and Best Practices for Production

Web Server Optimizations

Enable Apache’s MPM event for better concurrency:

sudo nano /etc/httpd/conf.modules.d/00-mpm.conf

Comment out mpm_prefork and uncomment mpm_event. Consider switching to PHP-FPM for reduced memory usage:

sudo dnf install php-fpm -y
sudo systemctl enable php-fpm
sudo systemctl start php-fpm

Update your virtual host to use ProxyPassMatch for PHP files.

Database and System Hardening

Schedule nightly backups with mysqldump:

sudo crontab -e

Add:

0 3 * * * /usr/bin/mysqldump -u root -p'YourRootPassword' orangehrm_db | gzip > /backup/orangehrm_$(date +\%F).sql.gz

Keep your system patched:

sudo dnf upgrade -y

Monitor logs regularly:

sudo journalctl -u httpd -f

Implement fail2ban to block brute-force login attempts:

sudo dnf install fail2ban -y
sudo systemctl enable fail2ban
sudo systemctl start fail2ban

Congratulations! You have successfully installed OrangeHRM. Thanks for using this tutorial for installing the OrangeHRM human resource management system on Fedora 43 Linux system. For additional help or useful information, we recommend you check the official OrangeHRM website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button