How to Install and Configure OrangeHRM on Ubuntu 16.04

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

apt-get update -y

Install LEMP Server

apt-get install nginx mariadb-server -y
systemctl start nginx
systemctl start mysql
systemctl enable nginx
systemctl enable mysql
apt-get install software-properties-common -y
add-apt-repository ppa:ondrej/php
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
nano /etc/php/7.1/fpm/php.ini
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

Configure Database

mysql_secure_installation
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
mysql -u root -p
MariaDB [(none)]> CREATE DATABASE orangehrm_db;
MariaDB [(none)]> CREATE USER 'orangehrm'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> GRANT ALL ON orangehrmdb.* TO 'orangehrm'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit;

Install OrangeHRM

wget https://excellmedia.dl.sourceforge.net/project/orangehrm/stable/4.1/orangehrm-4.1.zip
unzip orangehrm-4.1.zip
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

nano /etc/nginx/sites-available/orangehrm
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;
}
}
ln -s /etc/nginx/sites-available/orangehrm /etc/nginx/sites-enabled/
nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
systemctl restart nginx

Access OrangeHRM Web Installation Wizard

Related Alibaba Cloud Products

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

JAVA is even lower level than C

A Small Victory — Acceleration of BITFIELD Commands for ApsaraDB for Redis

Configuring RestHighLevelClient for Elastic

Migrating a MySQL Server to Alibaba Cloud

Ship MySQL Logs to Elasticsearch Effortlessly with Filebeat

How to install cPanel on your Alibaba instance

How to Better Name Your Functions and Variables

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
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

How to Configure OpenVPN for Oracle Cloud Infrastructure

Installing TrueNAS SCALE on ESXi, & Connecting A MacBook Pro to an SMB Share

Successful Installation & TrueNAS Dashboard

Starting stopped docker container

High Level Architecture for IoT Platform in 2022