Installing OrangeHRM on Ubuntu Server:

OrangeHRM is an open-source HR management software that can be easily installed on Ubuntu Server.

Prerequisites:

Before starting the installation process, ensure that you have the following prerequisites:

Step 1: Update the package manager

Use the following command to update the package manager:

sudo apt update
sudo apt upgrade

Step 2: Install Apache

Use the following command to install the Apache web server:

sudo apt install apache2

Verify that the Apache web server is running by navigating to the server's IP address in your browser. You should see the default Apache page.

Step 3: Install PHP

Use the following command to install PHP 7.2 and its required extensions:

sudo apt install php7.2 libapache2-mod-php7.2 php7.2-mysql php7.2-curl php7.2-json php7.2-cgi php7.2-gd php7.2-sqlite3 php7.2-mbstring php7.2-xml

Step 4: Install MySQL or MariaDB

Use the following command to install MariaDB (a fork of MySQL):

sudo apt install mariadb-server mariadb-client

During the installation process, you will be prompted to set a password for the root MySQL/MariaDB user. Remember this password.

Step 5: Create a new MySQL/MariaDB user and database

Use the following command to log in to the MySQL/MariaDB server as the root user:

sudo mysql -u root -p

Enter the password you set in Step 4.

Create a new database named 'orangehrm':

CREATE DATABASE orangehrm;

Create a new user that has full access to the 'orangehrm' database:

GRANT ALL PRIVILEGES ON orangehrm.* TO 'orangehrmuser'@'localhost' IDENTIFIED BY 'password';

Replace 'orangehrmuser' and 'password' with a username and password of your choice. Make sure to remember these credentials.

Flush the privileges:

FLUSH PRIVILEGES;

Exit the MySQL/MariaDB server:

exit

Step 6: Download and install OrangeHRM

Use the following command to download OrangeHRM:

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

Extract the downloaded ZIP file:

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

Rename the extracted directory:

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

Set the ownership of the OrangeHRM directory to the Apache2 user:

sudo chown -R www-data:www-data /var/www/html/orangehrm

Step 7: Configure Apache

Create a new virtual host configuration file for Apache:

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

Paste the following content into the file:

<VirtualHost *:80>
  ServerAdmin admin@yourdomain.com
  DocumentRoot /var/www/html/orangehrm
  ServerName yourdomain.com
  ServerAlias www.yourdomain.com

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

  <Directory /var/www/html/orangehrm>
    Options FollowSymLinks
    AllowOverride All
    Require all granted
  </Directory>

</VirtualHost>

Replace 'admin@yourdomain.com' and 'yourdomain.com' with your email address and domain name.

Enable the new virtual host configuration:

sudo a2ensite orangehrm.conf

Reload the Apache2 service:

sudo systemctl reload apache2

Step 8: Complete the installation process

Open your web browser and navigate to your server's domain name. You should see the OrangeHRM installation page.

Follow the on-screen instructions to complete the installation process. You will be prompted to enter the MySQL/MariaDB database details that you created in Step 5.

Once the installation is complete, the OrangeHRM login page will appear. Login using the default username 'admin' and password 'admin'.

Congratulations! You have successfully installed OrangeHRM on Ubuntu Server.

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!