How to Install Sentrifugo HRM on CentOS 8
You’ll learn the exact sequence of commands that will get the open‑source HR platform up and running on CentOS 8, including the PHP version tweak that trips most people up.
1. Prep the Server: Update, EPEL, and Essentials
sudo dnf update -y && sudo dnf install epel-release -y sudo dnf groupinstall "Development Tools" -y
Why it matters: The build tools are needed to compile some PHP extensions that Sentrifugo relies on. Skipping them will leave you with “undefined function” errors later.
2. Install Apache, MariaDB, and PHP‑7.4 Stack
sudo dnf install httpd mariadb-server php php-mysqlnd php-fpm \
php-xml php-json php-gd php-mbstring -y
Why it matters: Sentrifugo expects a LAMP stack. CentOS 8 ships with PHP 7.2 by default, but the HRM was tested against 7.4; using an older version will break the date picker and file upload modules.
3. Enable Services and Disable SELinux Temporarily
sudo systemctl enable httpd mariadb && sudo systemctl start httpd mariadb sudo setenforce 0
Why it matters: The HRM’s database migrations need unimpeded write access to the /var/www folder. SELinux on enforcing mode throws a wrench into that process.
4. Create MySQL Database and User for Sentrifugo
mysql -u root <<EOF CREATE DATABASE sentrifugo CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT ALL PRIVILEGES ON sentrifugo.* TO 'senti'@'localhost' IDENTIFIED BY 'StrongPass123'; FLUSH PRIVILEGES; EXIT; EOF
Why it matters: The HRM ships with an SQL dump that expects a database named sentrifugo. A mismatch here will cause the install wizard to choke on “database not found”.
5. Download and Extract Sentrifugo
cd /var/www/html
sudo curl -L https://github.com/sentrifugo/sentrifugo/releases/latest/download/Sentrifugo-1.3.0.zip \
-o sentrifugo.zip && sudo unzip sentrifugo.zip
Why it matters: Pulling the latest release guarantees you have the bug fixes for PHP 7.4 support.
6. Set Ownership and Permissions
sudo chown -R apache:apache sentrifugo
sudo find /var/www/html/sentrifugo -type d -exec chmod 755 {} \;
sudo find /var/www/html/sentrifugo -type f -exec chmod 644 {} \;
Why it matters: Apache runs as apache, and if the files aren’t world‑readable, the front‑end will return a 403 error. A common pitfall for newbies who forget this step.
7. Configure Virtual Host
sudo tee /etc/httpd/conf.d/sentrifugo.conf <<'EOF'
<VirtualHost *:80>
DocumentRoot "/var/www/html/sentrifugo/public"
ServerName hr.example.com
<Directory "/var/www/html/sentrifugo/public">
AllowOverride All
Require all granted
</Directory>
ErrorLog logs/sentrifugo_error.log
CustomLog logs/sentrifugo_access.log combined
</VirtualHost>
EOF
Why it matters: The public folder is the actual web root. Pointing Apache elsewhere will show a blank page or a “not found” error.
8. Adjust PHP Settings for File Uploads
sudo tee /etc/php-fpm.d/www.conf <<'EOF' [www] listen = /run/php-fpm/www.sock user = apache group = apache php_admin_value[memory_limit] = 256M php_admin_value[max_execution_time] = 300 php_admin_value[max_input_time] = 600 php_admin_value[upload_max_filesize] = 10M php_admin_value[post_max_size] = 20M EOF
Why it matters: HR systems deal with resumes and documents; the defaults on a fresh CentOS install are way too low.
9. Restart Services and Verify
sudo systemctl restart httpd php-fpm systemctl status httpd php-fpm
Open http://hr.example.com in your browser. You should see Sentrifugo’s welcome page.
10. Run the Installer Wizard
Navigate to the URL, enter the database credentials you created earlier (senti/StrongPass123) and follow the prompts. When it asks for the base URL, use http://hr.example.com.
Real‑world note: I once had a server that crashed after pulling in PHP 7.4 via the default CentOS repo; the HRM’s composer autoload threw “class not found” errors until I switched to the Remi repository and installed PHP 7.4 from there.
11. Harden the Setup (Optional but Recommended)
sudo setenforce 1 sudo firewall-cmd --add-service=http --permanent && sudo firewall-cmd --reload
Why it matters: Re‑enable SELinux to keep your server safe, and open HTTP traffic so users can actually reach the HRM.
That’s all there is to it. The HRM runs, you can log in as admin (admin@example.com/123456) and start creating employees, leave requests, etc.