How to install the Sentrifugo HRM Solution on Ubuntu Server 18.04

Jack Wallen shows you how to install the Sentrifugo HRM solution, which will empower your human resources department with all the tools required for business.

sentrifugohero.jpg
Image: Sentrifugo

If your business is looking for a human resource management (HRM) solution, you'll find plenty of open source options. One such tool is Sentrifugo. This particular solution features tools for:

Sentrifugo offers everything you need in an HRM solution, all within your own data center. I will walk you through how to install this tool on Ubuntu Server 18.04.

SEE: IT jobs 2018: Hiring priorities, growth areas, and strategies to fill open roles (Tech Pro Research)

We'll start from scratch, assuming the only thing you have up and running is the server platform. And with that said, let's install.

Dependencies

First, make sure your server operating system is up to date. On the off-chance your kernel is upgraded, you'll want to do this when the server can reboot. Open a terminal window, and issue the following two commands:

sudo apt-get update
sudo apt-get upgrade

Allow both to complete. If the kernel is upgraded, reboot the server, otherwise continue on.

Our first dependency is Apache. To install the Apache web server, issue the following command:

sudo apt-get install apache2

Once the installation completes, start and enable Apache with these commands:

sudo systemctl start apache2
sudo systemctl enable apache2

Next we need to install our database. We'll use MariaDB for this. To install the database, issue the command:

sudo apt-get install mariadb-server mariadb-client

To start and enable MariaDB, issue the following two commands:

sudo systemctl start mariadb
sudo systemctl enable mariadb

With MariaDB installed, we need to set an admin password for the database root user. For this, issue the command:

sudo mysql_secure_installation

Since you haven't created a password yet, hit Enter when prompted for the current password. Type "y" when asked if you want to set a root password, and then type/verify the new admin user password. Answer "y" for the remaining questions.

With the admin user password set, restart the database server with the command:

sudo systemctl restart mysql

Now we have to install PHP and its related modules. This can be done with the following four commands:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install 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

Now that pHP and its required modules are installed, we need to make some changes to the php.ini file. Issue the command:

sudo nano /etc/php/7.2/apache2/php.ini

In that file, you'll need to make the following changes:

memory_limit = 256M
upload_max_filesize = 100M
date.timezone = YOUR_TIMEZONE

Make sure that YOUR_TIMEZONE is the time zone, which you are located.

Creating the database

Now we can create a database for Sentrifugo. Issue the command:

sudo mysql -u root -p

After successful authentication (use the password you just created for the database admin user), create the new database with the command:

CREATE DATABASE sentrifugo;

Next we can create a new user with the command:

CREATE USER 'sentrifugouser'@'localhost' IDENTIFIED BY 'PASSWORD';

Make sure your PASSWORD is a unique and strong password. Grant the Sentrifugo user the proper permissions with the command:

GRANT ALL ON sentrifugo.* TO 'sentrifugouser'@'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;

Make sure PASSWORD is the password you created for the Sentrifugo database user.

Flush the database privileges and exit with the commands:

FLUSH PRIVILEGES;
exit;

Download and extract Sentrifugo

Download, extract, and move the latest release of Sentrifugo with the commands:

cd /tmp && wget http://www.sentrifugo.com/home/downloadfile?file_name=Sentrifugo.zip -O Sentrifugo.zip
unzip Sentrifugo.zip
sudo mv Sentrifugo_3.2 /var/www/html/sentrifugo

Give the new directory the proper permissions with the commands:

sudo chown -R www-data:www-data /var/www/html/sentrifugo/
sudo chmod -R 755 /var/www/html/sentrifugo/

Configure Apache

Now we need to create a new configuration file for Apache. Create the new file with the command:

sudo nano /etc/apache2/sites-available/sentrifugo.conf

In that file, copy the following contents:

<VirtualHost *:80>
     ServerAdmin admin@example.com
     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>

Replace admin@example.com with an email address associated with the server administrator. Also, replace the ServerName and ServerAlias as appropriate.

Finally, enable the Sentrifugo site (as well as the rewrite module) with the commands:

sudo a2ensite sentrifugo.conf
sudo a2enmod rewrite

Restart Apache with the command:

sudo systemctl restart apache2

Make one correction

If you attempt to point your browser to http://SERVER_IP/sentrifugo (where SERVER_IP is the IP address of the server), you'll receive an install warning, due to a deprecated php function. Before you can install, do the following:

  1. Open the file with with the command sudo nano /var/www/html/sentrifugo/install/PHPMailer/PHPMailerAutoload.php
  2. Change function __autoload($classname) to function __spl_autoload_register($classname)

Note: The __ is a double underscore.

Save and close the file.

Now point your browser to http://SERVER_IP/sentrifugo (where SERVER_IP is the IP address of your server), and you should see no errors (Figure A).

Figure A

Figure A

The Sentrifugo web installer.


Click Next, and then you'll be required to take care of:

  • Database settings
  • Applications settings
  • Mail server settings
  • Final check

Note: Sentrifugo does not have a built-in mail server, so you need to have a remote mail server (or have one, such as postfix, installed on the local server itself) to use. Once you've taken care of the above, you are ready to customize Sentrifugo to perfectly suit your business needs.

On the final installation page, you'll be given a username and password to log into your system. Keep that information secure, you'll need it.

Your data center has now empowered human resources with all of the tools it needs to create a powerful and flexible workflow.

Also see