OrangeHRM is an open-source HR management software that offers a range of features, including personnel information management, employee self-service, leave management, time and attendance tracking, and more. In this tutorial, we'll be discussing the steps to install OrangeHRM on Arch Linux.
Before we dive into the installation process, let's make sure that we have all the necessary requirements:
Let's start installing OrangeHRM on Arch Linux:
Firstly, update your system with the latest packages and dependencies.
sudo pacman -Syu
Run the following command to install the Apache web server.
sudo pacman -S apache
After installation, start the Apache service and enable it to run on system boot:
sudo systemctl start httpd.service
sudo systemctl enable httpd.service
Next, we need to install PHP on our system.
sudo pacman -S php php-apache
OrangeHRM requires a database server to store its data. We'll be using MariaDB server for this tutorial.
Use the following command to install MariaDB server:
sudo pacman -S mariadb
After installation, start the MariaDB service and enable it to run on system boot:
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
Next, run the mysql_secure_installation
command to secure your MariaDB installation:
sudo mysql_secure_installation
Now that we have installed MariaDB, let's create a new database for OrangeHRM.
Log in to the MariaDB server as root:
sudo mysql -u root -p
Create a new database called orangehrm_database
:
CREATE DATABASE orangehrm_database;
Create a new user called orangehrm_user
and set a password:
CREATE USER 'orangehrm_user'@'localhost' IDENTIFIED BY 'password';
Grant all privileges to the orangehrm_user
for the orangehrm_database
:
GRANT ALL PRIVILEGES ON orangehrm_database.* TO 'orangehrm_user'@'localhost';
Flush the privileges:
FLUSH PRIVILEGES;
Exit the MariaDB server:
EXIT;
Download the latest version of OrangeHRM from their official website (https://www.orangehrm.com/download/).
Extract the downloaded file into the /var/www/html
directory:
sudo tar -xzf orangehrm-<version>.tar.gz -C /var/www/html/
Set the ownership for the extracted directory to the Apache user:
sudo chown -R http:http /var/www/html/orangehrm-<version>/
Create a new configuration file named config-db.php
inside the /var/www/html/orangehrm-<version>/lib/confs/
directory:
sudo nano /var/www/html/orangehrm-<version>/lib/confs/config-db.php
Copy the following code and replace the values with your own:
<?php
define('DB_HOST','localhost');
define('DB_NAME','orangehrm_database');
define('DB_USER','orangehrm_user');
define('DB_PASSWORD','password');
define('DB_TYPE','mysql');
?>
Save and exit the file.
Set the permissions for the sessions
directory:
sudo chmod 777 /var/www/html/orangehrm-<version>/symfony/cache/orangehrm/sessions/
Create a new virtual host file for OrangeHRM:
sudo nano /etc/httpd/conf/extra/orangehrm.conf
Copy the following code and replace the values with your own:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/orangehrm-<version>
ServerName your_domain.com
ErrorLog /var/log/httpd/orangehrm_error.log
CustomLog /var/log/httpd/orangehrm_access.log combined
</VirtualHost>
Save and exit the file.
Enable the rewrite
module:
sudo a2enmod rewrite
Restart the Apache service:
sudo systemctl restart httpd.service
Open a web browser and navigate to http://your_domain.com
. Follow the installation wizard to complete the installation.
In this tutorial, we have successfully installed and configured OrangeHRM on Arch Linux. With OrangeHRM, you can automate your HR management tasks and streamline your workflows efficiently.
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!