How to install LAMP and run OrangeHRM in Ubuntu 12.04 LTS

In the following article we are going to explain how you can install LAMP (Linux Apache MySQL and PHP) and run OrangeHRM in your Ubuntu 12.04 LTS Linux VPS.

What is OrangeHRM?

It is an Open Source Human Resource Management system written in PHP.

It has the following features:

  • Administration Module
  • Personal Information Management
  • Leave Module
  • Time Module
  • Employee Self Service Module
  • Recruitment/ Applicant Tracking Module
  • Performance Module

Before proceeding any further, make sure you are in a screen session and your Ubuntu VPS system is fully up-to-date:

## screen -U -s orangehrm-screen
## apt-get update
## apt-get upgrade

Install Apache2 webserver on your Ubuntu 12.04 system using

## apt-get install apache2

Next, proceed with installing the MySQL database server in your system using

## apt-get install mysql-server

once installed, run the post-installation script mysql_secure_installation and configure it like this

## mysql_secure_installation

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

finally, edit /etc/mysql/my.cnf, add event_scheduler = ON anywhere under [mysqld] block and restart mysql using service mysql restart for the change to take effect.

install PHP support on the system using the following command:

## apt-get install php5 php5-mysql

check it out using

## php -v
PHP 5.3.10-1ubuntu3.10 with Suhosin-Patch (cli) (built: Feb 28 2014 23:19:50)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

also, create test /var/www/info.php script containing the following

## vim /var/www/info.php


and try to access it at http://your_server_ip/info.php . If the PHP info page is rendered in your browser then everything looks good and you are ready to proceed further.

install zip support in case it’s not already installed on the system

## apt-get install unzip

Install OrangeHRM in /var/www/orangehrm

## ver=3.1.1
## wget -P /tmp${ver}/orangehrm-${ver}.zip
## unzip /tmp/orangehrm-${ver}.zip -d /var/www/
## mv /var/www/orangehrm-${ver} /var/www/orangehrm
## chown www-data: -R /var/www/orangehrm

configure to serve the OrangeHRM in /var/www/orangehrm by creating a new Virtual Host Directive in /etc/apache2/sites-available/

## vim /etc/apache2/sites-available/

<VirtualHost *:80>
    DocumentRoot /var/www/orangehrm

    <Directory "/var/www/orangehrm">
        Options -Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all

    LogLevel warn
    ErrorLog ${APACHE_LOG_DIR}/
    CustomLog ${APACHE_LOG_DIR}/ combined

make sure you replace with your actual domain name

enable the Virtual Host Directive using the following command:

## a2ensite

restart apache for the change to take effect using

## service apache2 reload

Access in order to complete the installation of OrangeHRM. In the first step just click ‘Next/I Accept’ and in ‘step 2’ when prompted to set-up your database use your MySQL ‘root’ password to create a new database for OrangeHRM. See the screenshot below:

In ‘step 3: System Check’, make sure all listed items are green and OK. You should see something like this:


In ‘step 4: Admin User Creation’, create your ‘Admin’ username and password and in ‘Step 5: Confirmation’ confirm your set-up and install OrangeHRM by clicking on the ‘Install’ button.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert linux admins to install this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.


How to Create a cPanel Account in WHM
Install and Configure PureFTPd with MySQL on an OpenSUSE Linux VPS
Install FluxBB on a CentOS 7 VPS with Nginx and PHP-FPM
There are currently no comments.