How to Install Sentrifugo HRM on Ubuntu 18.04 LTS
Sentrifugo is a powerful Human Resource Management System (HRM) written in PHP that uses MySQL/MariaDB to store its database. It is a feature-rich and easily configurable application software that can be used to track the employee’s performance, vacation dates, roles, privileges and much more. Sentrifugo comes with lots of modules like Appraisal, Time Management, Leave Management, Employee Management, Analytics, Hiring/Recruitment, Background Check and Service Desk that makes your organization’s HR process easier. Sentrifugo exists in a free OpenSource version and in a paid edition. In this tutorial, we will install the OpenSource version.
In this tutorial, we will be going to explain how to install Sentrifugo on Ubuntu 18.04 LTS server.
Requirements
- A server running Ubuntu 18.04.
- A non-root user with sudo privileges.
Install Apache, PHP, and MariaDB
Let’s start with installing Apache and MariaDB server to your system by running the following command:
sudo apt-get install apache2 mariadb-server -y
Install PHP along with required libraries by running the following command:
sudo apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2 php7.2-ldap php7.2-zip php7.2-curl unzip wget -y
Once all the packages are installed, start Apache and MariaDB service and enable them to start on boot time with the following command:
sudo systemctl start apache2
sudo systemctl start mariadb
sudo systemctl enable apache2
sudo systemctl enable mariadb
Configure MariaDB
Next, you will need to secure MariaDB installation. You can secure it by running the mysql_secure_installation script:
sudo mysql_secure_installation
Answer all the questions as below:
Enter current password for root (enter for none): ENTER Set root password? [Y/n]: N Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y
Once the MariaDB is secured, log in to MariaDB shell:
mysql -u root -p
Enter your root password when prompt, then create a database for Sentrifugo:
MariaDB [(none)]> CREATE DATABASE sentrifugodb;
Next, create a user for Sentrifugo and grant privileges:
MariaDB [(none)]> CREATE USER ‘sentrifugo’@’localhost’ IDENTIFIED BY ‘howtoforge’;
MariaDB [(none)]> GRANT ALL ON sentrifugodb.* TO ‘sentrifugo’@’localhost’ IDENTIFIED BY ‘howtoforge’ WITH GRANT OPTION;
Next, flush the privileges with the following command:
MariaDB [(none)]> FLUSH PRIVILEGES;
Finally, exit from the MariaDB shell:
MariaDB [(none)]> exit;
Download and Install Sentrifugo
You can download the latest version of Sentrifugo from their official website with the following command:
cd /tmp
wget http://www.sentrifugo.com/home/downloadfile?file_name=Sentrifugo.zip -O Sentrifugo.zip
Next, unzip the downloaded file with the following command:
unzip Sentrifugo.zip
Next, copy the extracted directory to the Apache web root directory and provide proper permissions:
sudo cp -r Sentrifugo_3.2 /var/www/html/sentrifugo
sudo chown -R www-data:www-data /var/www/html/sentrifugo/
sudo chmod -R 755 /var/www/html/sentrifugo/
Edit the Sentrifugo application.ini file:
nano /var/www/html/sentrifugo/application/configs/application.ini
and change the line:
phpSettings.error_reporting = E_All
to:
phpSettings.error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
In line 4 of the file.
Next, create an Apache virtual host file for Sentrifugo with the following command:
sudo nano /etc/apache2/sites-available/sentrifugo.conf
Add the following lines:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/sentrifugo ServerName example.com ServerAlias www.example.com <Directory /var/www/html/sentrifugo/> Options +FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Save and close the file. Then, enable virtual host file with the following command:
sudo a2ensite sentrifugo
Next, enable Apache rewrite module and reload Apache service with the following command:
sudo a2enmod rewrite
sudo systemctl restart apache2
Access Sentrifugo
Now, open your web browser and type the URL http://example.com. You will be redirected to the following page:
Once all the requirements are satisfied. Then, click on the Next button. You should see the following page:
Here, provide your database details and click on the Next button. You should see the following page:
Next, provide your Application name and email address. Then, click on the Next button. You should see the following page:
Next, provide your SMTP server details and click on the Confirm button. You should see the following page:
Now, click on the Finish button to Finish button. You should see the following page:
Note: If you can’t login with the username displayed there, use the email address that you entered during setup instead of the username.
Now, click on the Follow this link to open the application. You should see the following page:
Here, provide your login details and click on the LOG IN button. You should see the Sentrifugo default dashboard in the following page:
Virtual machine image download of this tutorial
This tutorial is available as ready to use virtual machine image in ovf/ova format that is compatible with VMWare and Virtualbox. The virtual machine image uses the following login details:
SSH / Shell Login
Username: administrator
Password: howtoforge
This user has sudo rights.
Sentrifugo Login
Username: [email protected]
Password: 5bcf25a528bf9
MySQL Login
Username: root
Password: howtoforge
The IP of the VM is 192.168.0.100, it can be changed in the file /etc/netplan/01-netcfg.yaml. Please change all the above passwords to secure the virtual machine.