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.
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:
On Step 2, configure the database with access credentials added earlier
On the screen, configure the application by giving it a name and providing admin email address.
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
If the installation was successful, all install steps should look like below
Logins should be shown after clicking the Finish button:
That’s all. Enjoy using Sentrifugo HRM system.

