How to Install and Configure OrangeHRM on Ubuntu 16.04

By Hitesh Jethva, Alibaba Cloud Tech Share Author. Tech Share is Alibaba Cloud’s incentive program to encourage the sharing of technical knowledge and best practices within the cloud community.

OrangeHRM is a free, open source and most widely used Human Resource Management software application. OrangeHRM is specially intended for Small and Medium Enterprise Company. OrangeHRM is open source, so you can redistribute or modify it under the terms of the GNU General Public License. OrangeHRM offers many different modules, including, leave & time off management, recruiting & on-boarding, performance & training, travel & expense tracker, time & attendance management, disciplinary tracking, orange app and other HR management tools. OrangeHRM also provide two additional edition of OrangeHRM, OrangeHRM Professional and OrangeHRM Enterprise edition for the company that needs support from OrangeHRM Inc.

In this tutorial, we will install and configure OrangeHRM on Ubuntu 16.04 with an Alibaba Cloud Elastic Compute Service (ECS) instance.

Prerequisites

  1. A fresh Alibaba cloud Ubuntu 16.04 instance with minimum 2GB RAM.
  2. A static IP address 192.168.0.103 is configured on the instance.
  3. A Root password is setup on the server.

Launch Alibaba Cloud ECS Instance

First, log in to your https://ecs.console.aliyun.com">Alibaba Cloud ECS Console. Create a new ECS instance, choosing Ubuntu 16.04 as the operating system with at least 2GB RAM. Connect to your ECS instance and log in as the root user.

Once you are logged into your Ubuntu 16.04 instance, run the following command to update your base system with the latest available packages.

Install LEMP Server

OrangeHRM runs on the web server, written in PHP and uses MariaDB for database. So you will need to install Nginx, MariaDB and PHP to your system.

First, install Nginx and MariaDB server by running the following command:

Once both are installed, start MariaDB and Nginx service and enable them to start on boot with the following command:

By default, the latest version of PHP is not available in Ubuntu 16.04 default repository. So you will need to add the repository for that. You can add it by running the following command:

Next, update the repository and install PHP with the following command:

Once all the packages are installed, you will need to modify php.ini file:

Make the following changes:

Save and close the file.

Configure Database

By default, MariaDB installation is not secured. So you will need to secure it first. You can secure it by running the following script:

Answer all the questions as shown below:

Once the MariaDB is secured, login to MariaDB shell using the following command:

Enter your root password, then create a database and user for OrangeHRM:

Next, grant all privileges to the OrangeHRM database:

Next, flush the privileges and exit from the MariaDB shell:

Install OrangeHRM

Next, you will need to download the latest version of OrangeHRM from their website. You can download it with the following command:

Once the download is completed, extract the downloaded file:

Next, copy extracted directory to the web root directory and give proper permissions:

Configure Nginx for OrangeHRM

Next, you will need to create an Nginx virtual host file for OrangeHRM. You can do this with the following command:

Add the following lines:

Save and close the file, then enable virtual host with the following command:

Next, check the Nginx for any configuration error with the following command:

You should see the following output:

Finally, restart Nginx to apply all the changes:

Access OrangeHRM Web Installation Wizard

OrangeHRM is now installed, it’s time to install it through a web browser.

Open your web browser and type the URL http://example.com, you will be redirected to the following page:

Click on the Next button, you should see the following page:

Next, accept the license agreement, you should see the following page:

Here, provide your database configuration details. Then click on the Next button. You should see the following page.

Once all the system check completed successfully, click on the Next button. You should see the following page:

Now, provide your admin username and password, then click on the Next button. You should see the following page:

Now, confirm all the details and click on the Install button to start the installation. Once the installation is completed, You should see the following page:

Now, click on the Next button. You should see the following page:

Next, click on the Finish button. You will be redirected to the OrangeHRM login page:

Provide your admin username and password, then click on the Login button. You should see the OrangeHRM dashboard in the following image:

Related Alibaba Cloud Products

Secure your site with Alibaba Cloud SSL Certificates Service. This product allows customers to directly apply, purchase and manage SSL certificates on Alibaba Cloud. You can also easily manage the lifecycle of certificates with Alibaba cloud SSL Service.

Reference:

https://www.alibabacloud.com/blog/how-to-install-and-configure-orangehrm-on-ubuntu-16-04_593974?spm=a2c4.11999633.0.0

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store