Installing OrangeHRM on Clear Linux

OrangeHRM is a free, open-source HR management software which provides an excellent platform that organizes every process of HR management, such as Employee Information Management, Recruitment, Training, Benefits, Payroll and Performance Management, etc. In this tutorial, you will learn how to install OrangeHRM on Clear Linux.

Prerequisites

Before we get started with the installation of OrangeHRM, please ensure that your system meets the following requirements:

Installing OrangeHRM

Follow the below-given steps to install OrangeHRM on Clear Linux:

Step 1: Install Required Dependencies

To begin, you need to install LAMP (Linux, Apache, MySQL, and PHP) stack packages required for OrangeHRM to work correctly. Run the following command:

sudo swupd bundle-add lamp-server

Step 2: Install PHP Extensions

You also need to install some PHP extensions, which are needed for the proper functioning of OrangeHRM. Install the following PHP modules using the below command:

sudo swupd bundle-add php74-php-cli php74-php-gd php74-php-mysqli php74-php-mysqlnd php74-php-pdo php74-php-pear php74-php-pecl-apcu php74-php-pecl-xdebug php74-php-pecl-yaml php74-php-xml php74-php-xmlrpc php74-php-opcache

Step 3: Create a Database

To create a database for OrangeHRM, you need to use the MySQL command-line interface. Login to MySQL server using the following command:

sudo mysql -u root -p

After that, type the MySQL root password when prompted. Once logged in, run the following commands to create a database and a user with necessary privileges.

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

Note: Make sure you replace password123 with a strong password.

Step 4: Download OrangeHRM

Next, you need to download and extract the OrangeHRM archive. Go to the official website of OrangeHRM and get the latest release download link. Alternatively, you can download it directly using the command below:

sudo wget https://sourceforge.net/projects/orangehrm/files/latest/download/orangehrm-4.7.1.zip

After the download is complete, extract the archive with the following command:

sudo unzip orangehrm-4.7.1.zip -d /var/www/html/

Step 5: Configure OrangeHRM

Navigate to the folder orangehrm-4.7.1 in the extracted directory by using the following command:

cd /var/www/html/orangehrm-4.7.1

Next, rename the Configurations/OrangeHRM_Configurations.php.template file to OrangeHRM_Configurations.php as shown below:

sudo mv Configurations/OrangeHRM_Configurations.php.template Configurations/OrangeHRM_Configurations.php

Edit the OrangeHRM_Configurations.php file with your preferred text editor and update the database settings as follows:

// Database Settings
define('DB_USER', 'orangehrm');
define('DB_PASS', 'password123');
define('DB_NAME', 'orangehrm');
define('DB_HOST', 'localhost');
define('DB_PORT', '3306');
define('DB_TYPE', 'mysqli');

Save the file and close it.

Step 6: Set the Permissions

You need to set the proper permissions on the OrangeHRM files for the webserver to access it. Run the following commands to set the necessary permissions:

sudo chown -R apache:apache /var/www/html/orangehrm-4.7.1/
sudo chmod -R 755 /var/www/html/orangehrm-4.7.1/

Step 7: Configure SELinux

If you have SELinux enabled on your Clear Linux installation, you need to allow Apache to access the OrangeHRM files using the following commands:

sudo chcon -t httpd_sys_rw_content_t /var/www/html/orangehrm-4.7.1/
sudo setsebool -P httpd_can_network_connect_db 1

Step 8: Start the Apache Service

All the steps are completed. Restart the Apache service to apply the changes using the following command:

sudo systemctl restart httpd

Step 9: Access the OrangeHRM Web Interface

Finally, open your web browser and visit the URL http://your-server-ip/orangehrm-4.7.1/. Now, you should see the OrangeHRM login page. Use the following credentials to login:

You can now access the OrangeHRM dashboard and start using it to manage HR-related activities.

Conclusion

Congratulations! You have successfully installed OrangeHRM on Clear Linux. We hope this tutorial has been helpful for you. If you have any query, please leave a comment below.

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!