How to Install OrangeHRM on Debian Latest

OrangeHRM is an open-source human resource management software. It provides a comprehensive HR management platform with features such as employee self-service, time and attendance tracking, performance evaluation, and much more. In this tutorial, we will show you how to install OrangeHRM on Debian latest version.

Prerequisites

Before starting, you will need:

Step 1: Update System Packages

The first step is to update the system packages. We can do that using the following command:

sudo apt update && sudo apt upgrade

Step 2: Install LAMP Stack

OrangeHRM requires a LAMP stack installed. LAMP stands for Linux, Apache, MySQL, and PHP.

Install Apache

To install Apache, run the following command:

sudo apt install apache2

After the installation completes, start the Apache service with the following command:

sudo systemctl start apache2

Install MySQL

To install MySQL Server, run the following command:

sudo apt install mysql-server

During the installation, you will be asked to set a password for the MySQL root user.

Install PHP

To install PHP, run the following command:

sudo apt install php php-mysql php-curl php-gd php-intl php-pear php-xml php-xmlrpc php-mbstring

After the installation completes, restart Apache with the following command:

sudo systemctl restart apache2

Step 3: Download OrangeHRM

Download the latest version of OrangeHRM using the following command:

wget https://freefr.dl.sourceforge.net/project/orangehrm/stable/4.3.3/orangehrm-4.3.3.zip

The above command will download the OrangeHRM installation file as a zip archive.

Step 4: Extract OrangeHRM

Extract the downloaded zip archive using the following command:

unzip orangehrm-4.3.3.zip

This command will extract the OrangeHRM files to a directory named orangehrm-4.3.3.

Step 5: Move OrangeHRM Files

Move the extracted OrangeHRM files to the Apache root directory using the following command:

sudo mv orangehrm-4.3.3 /var/www/html/orangehrm

Step 6: Configure MySQL

Create a new MySQL database and user for OrangeHRM using the following commands:

sudo mysql -u root -p

When prompted, enter the MySQL root user password.

Once you are in the MySQL console, run the following commands to create a new database, user, and grant privileges:

CREATE DATABASE orangehrm;
CREATE USER 'ohrm_user'@'localhost' IDENTIFIED BY 'ohrm_password';
GRANT ALL PRIVILEGES ON orangehrm.* TO 'ohrm_user'@'localhost';
FLUSH PRIVILEGES;

Replace ohrm_user and ohrm_password with your desired database username and password.

Exit the MySQL console using the following command:

exit

Step 7: Configure OrangeHRM

Rename the config-sample.php file located in OrangeHRM root directory to config.php:

cd /var/www/html/orangehrm/symfony/config
sudo cp config-sample.php config.php

Then, edit the config.php file:

sudo nano config.php

Find the following configuration settings in the file:

$configuration['symfony_i18n_compile'] = 'true';
$configuration['cache'] = 'true';
$configuration['ssl'] = 'false'; 
$configuration['ssl.cert'] = '';

Edit them so they look like this:

$configuration['symfony_i18n_compile'] = 'false';
$configuration['cache'] = '500';
$configuration['ssl'] = 'false';
$configuration['ssl.cert'] = '';

Find the following SQL connection settings in the file:

$configuration['default_database'] = 'mysql://root:@localhost/orangehrm';

Change it to the following:

$configuration['default_database'] = 'mysql://ohrm_user:ohrm_password@localhost/orangehrm';

Replace ohrm_user and ohrm_password with your MySQL database username and password.

Save and close the file using Ctrl + X, then press Y and Enter.

Step 8: Configure Apache

Create a new Apache virtual host configuration file using the following command:

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

Add the following lines to the file:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/orangehrm

<Directory /var/www/html/orangehrm>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Save and close the file using Ctrl + X, then press Y and Enter.

After that, enable the new virtual host configuration by running the following command:

sudo a2ensite orangehrm.conf

Reload Apache to apply the changes:

sudo systemctl reload apache2

Step 9: Access OrangeHRM Web Interface

Finally, access OrangeHRM by opening a web browser and typing the following URL:

http://localhost/orangehrm

You will be redirected to the OrangeHRM installer page.

Accept the Terms and Conditions, and click the Install button to start the installation process.

After the installation completes, you will be prompted to create a new administrator account. Fill in the required information and click the Continue button.

That's it. You have successfully installed OrangeHRM on Debian latest version.

Conclusion

In this tutorial, we have shown you how to install OrangeHRM on Debian latest version. With OrangeHRM, you can efficiently manage all of your HR related tasks, from employee data to time and attendance tracking. Enjoy using OrangeHRM!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!