How to install JoraniLMS V.0.6.5 on Linuxmint-18.03

To install JoraniLMS V.0.6.5 on Linuxmint-18.03
Jorani is a Leave Management System developed in PHP/MySQL. Jorani is designed to provide simple leave and overtime request workflows for small organizations.

Pre-requirements
Install LAMP (Apache, php7.1, mariadb-server)
In MariaDB (create database, user and give privileges to the user)

PHP INSTALLATION

add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php7.1
apt install php7.1 libapache2-mod-php7.1 php7.1-common php7.1-mbstring 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-ldap php7.1-zip php7.1-curl

Download the jorani package using wget command

linuxhelp ~ # wget https://github.com/bbalet/jorani/archive/v0.6.5.zip
--2018-05-06 02:39:35--  https://github.com/bbalet/jorani/archive/v0.6.5.zip
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/bbalet/jorani/zip/v0.6.5 [following]
--2018-05-06 02:39:36--  https://codeload.github.com/bbalet/jorani/zip/v0.6.5
Resolving codeload.github.com (codeload.github.com)... 192.30.253.120, 192.30.253.121
Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘ v0.6.5.zip’ 

v0.6.5.zip                   [                < =>                ]  16.50M  1.08MB/s    in 17s     

2018-05-06 02:39:54 (1016 KB/s) - ‘ v0.6.5.zip’  saved [17297880]

After downloading extract the downloaded Package

linuxhelp ~ # unzip v0.6.5.zip
Archive:  v0.6.5.zip
6cdae4f48c69dd0f8800d9dc05df45441a260fa1
   creating: jorani-0.6.5/
  inflating: jorani-0.6.5/.gitattributes  
   creating: jorani-0.6.5/.github/
  inflating: jorani-0.6.5/.github/CONTRIBUTING.md  
  inflating: jorani-0.6.5/.github/ISSUE_TEMPLATE.md  
  inflating: jorani-0.6.5/.gitignore  
  inflating: jorani-0.6.5/.htaccess  
  inflating: jorani-0.6.5/CODE_OF_CONDUCT.md  
  inflating: jorani-0.6.5/LICENSE    
  inflating: jorani-0.6.5/README.md  
  inflating: jorani-0.6.5/TODO.md    
   creating: jorani-0.6.5/application/
 extracting: jorani-0.6.5/application/.htaccess  
   creating: jorani-0.6.5/application/cache/
 extracting: jorani-0.6.5/application/cache/.htaccess  
  inflating: jorani-0.6.5/application/cache/index.html  
.
.
.
  inflating: jorani-0.6.5/tests/load/README.md  
  inflating: jorani-0.6.5/tests/load/benchmark.jmx  
  inflating: jorani-0.6.5/tests/load/lms.jmx  
   creating: jorani-0.6.5/tests/rest/
  inflating: jorani-0.6.5/tests/rest/JoraniAPI.php  
  inflating: jorani-0.6.5/tests/rest/api.php  
  inflating: jorani-0.6.5/tests/rest/api2.php  
  inflating: jorani-0.6.5/tests/rest/api3.php  
  inflating: jorani-0.6.5/tests/rest/increment_entitleddays.php  
  inflating: jorani-0.6.5/tests/rest/seniority_leave.php  
  inflating: jorani-0.6.5/testssl.php  


Rename the downloaded directory

linuxhelp ~ # ls
jorani-0.6.5  v0.6.5.zip
linuxhelp ~ # mv jorani-0.6.5/ jorani


Move the jorani directory into the /var/www/html directory

linuxhelp ~ # mv jorani/ /var/www/html/

Go to /var/www/html directory

linuxhelp ~ # cd /var/www/html/
linuxhelp html # ls
index.html  jorani


Change the ownership and permission for the jorani directory

linuxhelp html # chown -R www-data:www-data jorani/ & &  chmod -R 775 jorani/


Configure the database setup as follows

linuxhelp html # mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with   or g.
Your MySQL connection id is 3
Server version: 5.7.21-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its&hellip 
We have to use LMS database, then adapt the following command:
mysql>  use lms 
Database changed
mysql>  source /var/www/html/jorani/sql/lms.sql 
Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 1 row affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)
.
.
.
Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

mysql>  exit
Bye


Restart the MySQL database

linuxhelp html # systemctl restart mysql.service


Open the database.php file and enter your database username and password

linuxhelp html #cd  jorani/
linuxhelp jorani # vim application/config/database.php
[&hellip ]
‘ username’   =>   ‘ joraniuser’ ,
‘ password’  =>   ‘ 123’ ,
[&hellip ]

Install composer

linuxhelp jorani # composer install
Loading composer repositories with package info   rmation
Installing dependencies (including require-dev) from lock file
  - Installing bshaffer/oauth2-server-php (v1.10.0)
    Downloading: 100%         

  - Installing psr/http-message (dev-master f6561bf)
    Cloning f6561bf28d520154e4b0ec72be95418abe6d9363

  - Installing guzzlehttp/psr7 (dev-master d2537c8)
    Cloning d2537c86fa8b004c29e9b9f5e10028f0a29df101

  - Installing guzzlehttp/promises (dev-master e9cdab6)
    Cloning e9cdab6ff93ff789b5b599326c727f51d10893a6
.
.
.
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
sabre/vobject suggests installing hoa/bench (If you would like to run the benchmark scripts)
Generating autoload files


Configure the virtual host for jorani lms. Create an empty file named jorani.conf

linuxhelp jorani # cd /etc/apache2/sites-available/
linuxhelp sites-available # vim jorani.conf
 [&hellip ]
< virtualhost *:80> 
servername  www.linuxhelp1.com
Documentroot  /var/www/html/jorani
< Directory /var/www/html/jorani> 
AllowOverride
order allow,deny
allow from all
< /Directory> 
< /virtualhost> 
 [&hellip ]        


Enable the jorani.conf file

linuxhelp sites-available # a2ensite jorani.conf
Enabling site jorani.
To activate the new configuration, you need to run:
  service apache2 reload


Enable the rewrite modules

linuxhelp sites-available # a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  service apache2 restart


After that, make an entry in the hosts name as follows

< give your ip>         < give your domain name> 


Restart the Apache web server

linuxhelp sites-available # systemctl restart apache2.service

Now you can proceed the further installation and configuration from the browser by navigating to the following URL: http://< ipaddress or domain name

login using the following credentials

Default username: bbalet

Default password: bbalet

You will see the admin page of Jorani CMS as shown below

With this, the method to install JoraniLMS V.0.6.5 on Linuxmint-18.03 comes to an end

Tag : Linux Mint
FAQ
Q
How to Change the keys in jorani LMS?
A
Run the following steps,
cd /var/www/html/jorani/assets/keys/
openssl genrsa -out private.pem 1024
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
Q
How to check jorani lms site?
A
There is a special page where you can check that Jorani is installed and that helps you find problems. Open your browser at (change the server address with your server address): http://localhost/jorani/requirements.php
Q
What are the default user and password in ?
A
After this installation, you'll get a nearly empty database with the user:

Login: bbalet
Password: bbalet
Q
How to enable the rewrite modules?
A
Activation of the rewrite module is very easy (Apache must be restarted for the configuration to be taken into account):

# a2enmod rewrite
Q
How to use git in jorani lms?
A
run the following commad,
# git clone https://github.com/bbalet/jorani.git