Installing OrangeHRM on Alpine Linux Latest

OrangeHRM is an open-source HR management software that simplifies the management of employee data, performance evaluations, recruitment, and more. In this tutorial, we will walk through the steps to install OrangeHRM on Alpine Linux.

Prerequisites

Before proceeding with the installation, you will need to ensure that the following prerequisites are met:

Step 1: Update your system

The first step is to update your system to the latest packages. You can do this by running the following command:

apk update && apk upgrade

Step 2: Install PHP, MariaDB and Apache

Apache, PHP, and MariaDB are required to run OrangeHRM. Run the following command to install them:

apk add apache2 php7 php7-apache2 mariadb mariadb-client

Step 3: Configure MariaDB

After installing the database, you need to configure it. Here are the steps:

  1. Start the MariaDB server:
rc-service mariadb start
  1. Secure your MariaDB installation:
mysql_secure_installation
  1. Create a database for OrangeHRM:
mysql -uroot -p

> CREATE DATABASE orangehrm_db;
> GRANT ALL PRIVILEGES ON orangehrm_db.* TO 'orangehrm_user'@'localhost' IDENTIFIED BY 'password_here';
> FLUSH PRIVILEGES;
> EXIT;

Step 4: Download and Install OrangeHRM

To download OrangeHRM, navigate to the official website [https://www.orangehrm.com/] and click the "Download" button. Then follow these steps to install:

  1. Unzip the downloaded file:
unzip orangehrm-4.5.11.zip
  1. Move the extracted folder to the webserver directory:
mv orangehrm-4.5.11 /var/www/localhost/htdocs/orangehrm

Step 5: Configure Apache

To configure Apache, you need to create a new virtual host file for OrangeHRM. Run the following command to create the file:

nano /etc/apache2/conf.d/orangehrm.conf

Add the following lines to the file:

<VirtualHost *:80>
        ServerAdmin admin@orangehrm.com
        DocumentRoot /var/www/localhost/htdocs/orangehrm/
        ServerName orangehrm.yourdomain.com
        ServerAlias www.orangehrm.yourdomain.com
        <Directory /var/www/localhost/htdocs/orangehrm/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog /var/log/apache2/orangehrm-error_log
        CustomLog /var/log/apache2/orangehrm-access_log combined
</VirtualHost>

Save the file and exit.

Step 6: Start Apache and MariaDB

The final step is to start Apache and MariaDB. Run the following command to start them:

rc-service apache2 start
rc-service mariadb start

Conclusion

Congratulations! You have successfully installed OrangeHRM on Alpine Linux. You can now access the HR management software in your web browser by using the URL [http://orangehrm.yourdomain.com].

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!