DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

SBOMs are essential to circumventing software supply chain attacks, and they provide visibility into various software components.

Related

  • Establishing a Highly Available Kubernetes Cluster on AWS With Kops
  • How to Move System Databases to Different Locations in SQL Server on Linux
  • Using the PostgreSQL Pager With MariaDB Xpand
  • Building a 24-Core Docker Swarm Cluster on Banana Pi Zero

Trending

  • Fraud Detection in Mobility Services With Apache Kafka and Flink
  • Stop Building Monolithic AI Brains, Build a Specialist Team Instead
  • Optimizing Your IDP Using Centralized Configuration Management With IBM Cloud App Configuration: A Complete Guide
  • Beyond the Glass Slab: How AI Voice Assistants are Morphing Into Our Real-Life JARVIS
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. How to Install and Configure OrangeHRM on Ubuntu 16.04

How to Install and Configure OrangeHRM on Ubuntu 16.04

Get on HR's good side with this open source tool.

By 
Hitesh Jethva user avatar
Hitesh Jethva
·
Nov. 28, 18 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
8.1K Views

Join the DZone community and get the full member experience.

Join For Free

Introduction

OrangeHRM is a free, open source, and widely used Human Resource Management software application. OrangeHRM is specially intended for a small or 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 and time off management, recruiting and onboarding, performance and training, travel and expense tracker, time and 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 learn how to install OrangeHRM on Ubuntu 16.04 server.

Requirements

  • A fresh Alibaba Cloud Ubuntu 16.04 instance with minimum 2GB RAM.

  • A static IP address 192.168.0.103 is configured on the instance.

  • A Root password is setup on the server.

Launch Alibaba Cloud ECS Instance

First, login to your 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.

apt-get update -y


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:

apt-get install nginx mariadb-server -y


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

systemctl start nginx
systemctl start mysql
systemctl enable nginx
systemctl enable mysql


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:

apt-get install software-properties-common -y
add-apt-repository ppa:ondrej/php


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

apt-get update -y
apt-get install php7.1-fpm php7.1-common php7.1-mbstring php7.1-ldap php7.1-zip  php7.1-xmlrpc php7.1-soap php7.1-gd php7.1-xml php7.1-intl php7.1-mysql php7.1-cli php7.1-mcrypt php7.1-curl -y


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

nano /etc/php/7.1/fpm/php.ini


Make the following changes:

file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 150M
display_errors = Off
cgi.fix_pathinfo = 0
date.timezone = Asia/Kolkata

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:

mysql_secure_installation


Answer all the questions as shown below:

Change the password for root ? N
Remove anonymous users? Y
Disallow root login remotely? Y
Remove test database and access to it? Y
Reload privilege tables now? Y


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

mysql -u root -p


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

MariaDB [(none)]> CREATE DATABASE orangehrm_db;
MariaDB [(none)]> CREATE USER 'orangehrm'@'localhost' IDENTIFIED BY 'password';


Next, grant all privileges to the OrangeHRM database:

MariaDB [(none)]> GRANT ALL ON orangehrmdb.* TO 'orangehrm'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;


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

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit;

Install OrangeHRM

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

wget https://excellmedia.dl.sourceforge.net/project/orangehrm/stable/4.1/orangehrm-4.1.zip


Once the download is completed, extract the downloaded file:

unzip orangehrm-4.1.zip


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

cp -r orangehrm-4.1 /var/www/html/orangehrm
chown -R www-data:www-data /var/www/html/orangehrm/
chmod -R 755 /var/www/html/orangehrm/


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:

nano /etc/nginx/sites-available/orangehrm


Add the following lines:

server {
    listen 80;
    listen [::]:80;
    root /var/www/html/orangehrm;
    index  index.php index.html index.htm;
    server_name  example.com www.example.com;

     client_max_body_size 100M;

    location / {
        try_files $uri $uri/ /index.php?$uri&$args;        
    }

    location ~ \.php$ {
         include snippets/fastcgi-php.conf;
         fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
         include fastcgi_params;
    }
}


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

ln -s /etc/nginx/sites-available/orangehrm /etc/nginx/sites-enabled/


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

nginx -t


You should see the following output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful


Finally, restart NGINX to apply all the changes:

systemctl restart nginx


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:

Image title

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

Image title


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

Image title


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

Image title



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

Image title


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

Image title

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:

Image title

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

Image title

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

Image title

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

Image title


ubuntu operating system Command (computing) Alibaba Cloud MariaDB

Opinions expressed by DZone contributors are their own.

Related

  • Establishing a Highly Available Kubernetes Cluster on AWS With Kops
  • How to Move System Databases to Different Locations in SQL Server on Linux
  • Using the PostgreSQL Pager With MariaDB Xpand
  • Building a 24-Core Docker Swarm Cluster on Banana Pi Zero

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: