How To

Install Sentrifugo HRM on Ubuntu 18.04 with Let’s Encrypt SSL Certificate

In this guide, I’ll cover the installation ofΒ Sentrifugo HRM on Ubuntu 18.04 LTS and securing the installation with Let’s Encrypt. Sentrifugo is a powerful open source Human Resource Management (HRM)Β System written in PHP. It stores its data in a relational database such as MySQL/MariaDB.

Original content from computingforgeeks.com - post 4410

Sentrifugo is easy to configure and provides a number of rich features such as:

  • Tracking employee’sΒ vacation dates
  • Tracking of employee’s roles, performance, and privileges
  • Tracking Employee’s appraisals
  • For time and leave Management
  • Recruitment/Talent Acquisition
  • Interview Schedule
  • Employee self-service
  • Analytics: Define long & short term goals
  • Background Checks e.t.c

Our installation of Sentrifugo HRMΒ  will be powered by Nginx, MariaDB, and PHP 7.2.

Step 1: Install PHP

Install PHP on Ubuntu 18.04 by running the following commands:

sudo apt install php php-cli php-soap php-xmlrpc php-fpm php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath

Edit /etc/php/7.2/fpm/php.iniΒ and modify settings like below

file_uploads = On
allow_url_fopen = On
cgi.fix_pathinfo = 0
upload_max_filesize = 50M
date.timezone = Africa/Nairobi

Step 2: Install and configure the MariaDB database

The next step is to install MariaDB 10.x on your Ubuntu 18.04 system by following below guide:

Install MariaDB 10.3 on Ubuntu 18.04 and CentOS 7

After installation of MariaDB, login as root user and create a database and user forΒ Sentrifugo HRM.

$ mysql -u root -p

CREATE DATABASE sentrifugo;
GRANT ALL ON sentrifugo.* TO 'sentrifugo'@'localhost' IDENTIFIED BY 'StrongPassword';
FLUSH PRIVILEGES;
EXIT;

Replace StrongPasswordΒ with your strong database user password.

Step 3: Download and installΒ Sentrifugo

CloneΒ Sentrifugo from Github

cd /srv
git cloneΒ https://github.com/sapplica/sentrifugo.git

Install Nginx

sudo apt install nginx -y

Set directory proper permissions

sudo chown -R www-data:www-data /srv/sentrifugo/
sudo chmod -R 775 /srv/sentrifugo/

Configure Nginx – Without SSL

Create a Virtual Host file for Sentrifugo

sudo vimΒ /etc/nginx/conf.d/sentrifugo.conf

Set like below:

server {
    listen 80;
    listen [::]:80;
    root /srv/sentrifugo;
    index  index.php index.html index.htm;
    server_name  hrms.example.com www.hrms.example.com;
    client_max_body_size 50M;

    location / {
        try_files $uri $uri/ /index.php?$args;
       }

    location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass    unix:/var/run/php/php7.2-fpm.sock;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
     }
}

Configure Nginx – Without SSL

Request for Let’s Encrypt SSL certificates

wget https://dl.eff.org/certbot-auto -P /usr/local/bin
chmod a+x /usr/local/bin/certbot-auto
export DOMAIN="hrms.example.com"
export EMAIL="[email protected]"
certbot-auto certonly --standalone -d $DOMAIN --preferred-challenges http --agree-tos -n -m $EMAIL --keep-until-expiring

Modify your nginx configuration file to include SSL

server {
    listen 80;
    root /srv/sentrifugo;
    server_name  hrm.example.com www.hrm.example.com;
    location / {
        rewrite     ^ https://hrms.example.com$request_uri? permanent;
    }
}

server {
    listen 443 ssl http2;
    root /srv/sentrifugo;
    index  index.php index.html index.htm;
    server_name  hrm.example.com www.hrm.example.com;
    ssl_certificate /etc/letsencrypt/live/hrms.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/hrms.example.com/privkey.pem;
    client_max_body_size 50M;

    location / {
        try_files $uri $uri/ /index.php?$args;
       }

    location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass    unix:/var/run/php/php7.2-fpm.sock;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
     }
}

Check nginx configuration syntax

$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

If OK, restart nginx

sudo systemctl restart nginx

Open the URL http://hrms.example.comΒ on your Browser to finish the installation.

Check Pre-requisites and make sure all are passed:

sentrifugo hrms ubuntu 18.04 01 min

On Step 2, configure the database with access credentials added earlier

sentrifugo hrms ubuntu 18.04 setup db 02 min

On the screen, configure the application by giving it a name and providing admin email address.

sentrifugo hrms ubuntu 18.04 configure admin 03 min

Then configure mail settings, If you want to do local email delivery, check

How to install and configure Postfix as a Send-Only SMTP Server on Ubuntu 18.04

sentrifugo hrms ubuntu 18.04 mail settings 04 min

If the installation was successful, all install steps should look like below

sentrifugo hrms ubuntu 18.04 confirm all checks 05 min

Logins should be shown after clicking theΒ FinishΒ button:

sentrifugo hrms login credentials min

That’s all. Enjoy usingΒ Sentrifugo HRM system.

Keep reading

Upgrade Ubuntu 24.04 to Ubuntu 26.04 LTS (Step by Step) Ubuntu Upgrade Ubuntu 24.04 to Ubuntu 26.04 LTS (Step by Step) UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Security UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Backup and Restore Linux Systems with Timeshift Debian Backup and Restore Linux Systems with Timeshift Build a FHIR MCP Server for MedGemma 2 with Ollama AI Build a FHIR MCP Server for MedGemma 2 with Ollama Run MedGemma 2 Locally with Ollama and FHIR Tool Calling AI Run MedGemma 2 Locally with Ollama and FHIR Tool Calling Install sudo-rs: Memory-Safe sudo for Linux Debian Install sudo-rs: Memory-Safe sudo for Linux

Leave a Comment

Press ESC to close