Skip to main content

install IOMAD (Multi Tenant LMS) with nginx, MySQL, mariadb, php, phpmyadmin

 1. Install update for your Linux Ubuntu

            sudo apt update

2.  install ngnix

          sudo apt install nginx

3.  cmds to start, stop and restart nginx

        sudo systemctl stop nginx.service

        sudo systemctl start nginx.service

        sudo systemctl enable nginx.service

        sudo systemctl restart nginx.service

4. install mysql or mariadb 

        sudo apt-get install mariadb-server mariadb-client

                            or

        sudo apt-get install mysql-server mysql-client  

5.   cmds to start, stop and restart mariadb/mysql server

         sudo systemctl stop mariadb.service

        sudo systemctl start mariadb.service

        sudo systemctl enable mariadb.service

        sudo systemctl restart mariadb.service

6. secure your mariadb/mysql server by creating a root password and disallowing remote root access.

        sudo mysql_secure_installation

put the password if set or leave it


7. Now test the mariadb/mysql server installed or not 

        mysql -u root -p

        (type the password and hit enter)

8. create database for iomad and set the permission and privileges

        create database iomad DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

        GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, CREATE TEMPORARY TABLES, DROP, INDEX, ALTER ON iomad.* TO root@localhost;

        FLUSH PRIVILEGES;

        exit;

9.  go to the directory cd /var/www/html/ 

        make a folder and give permission

                sudo mkdir iomad

                sudo chmod -R 0777 iomad

10. go to the directory cd /var/www/

        make a folder and give permission

                sudo mkdir moodledata-iomad

                sudo chmod -R 0777 moodledata-iomad         

11. now we need to install iomad from Git or you can use sudo wget cmd to directly download the file and unzip it

        visit: https://github.com/iomad/iomad

        copy the file link: https://codeload.github.com/iomad/iomad/zip/IOMAD_38_STABLE

        sudo wget https://codeload.github.com/iomad/iomad/zip/IOMAD_38_STABLE

                    and file will be downloaded, unzip and rename it.

                    unzip IOMAD_38_STABLE   

                    sudo mv IOMAD_38_STABLE iomad

        you can keep or delete the zip file.

12. set the path and nginx sever config 

           cd /etc/nginx/sites-available/

        set this in the default file 

        location /iomad/ {                                                                                                                                              alias /var/www/html/iomad/;   

        

13. set your own server ip for nginx running

        sudo vi iomad

server {                                                                                                                                                            listen 8069 ;                                                                                                                                                   server_name 127.0.0.1/iomad; 

    root /home/superuser/development_hosting/demoserver/iomad/;                                                                                                     index index.html index.htm index.php index.nginx-debian.html;                                                                                                                                                                                                                                                                                                                                                                      location / {                                                                                                                                                         try_files $uri $uri/ /index.php?$args;                                                                                                                     }                                                                                                                                                                                                                                                                                                                           location ~ [^/]\.php(/|$ {                                                                                                                                          fastcgi_split_path_info  ^(.+\.php)(/.+)$;                                                                                                      fastcgi_index  index.php;                                                                                                                              fastcgi_pass  unix:/var/run/php/php7.4-fpm.sock; #Ubuntu 17.04                                                              include  fastcgi_params;                                                                                                                               fastcgi_param   PATH_INFO       $fastcgi_path_info;                                                                                   fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;                                  }                                                                                                                                                                   } 

     press :wq!

    save and exit.

14. install php and fpm for nginx to function proper

            sudo apt update

            sudo apt install php7.4-fpm php7.4-common php7.4-mbstring php7.4-xmlrpc php7.4-soap php7.4-gd php7.4-xml php7.4-intl php7.4-mysql php7.4-cli php7.4-zip php7.4-curl

            php -v  (check the version you installed)

            sudo vi /etc/php/7.4/fpm/php.ini      (php7.4 path)

15. install phpmyadmin 

        sudo apt install phpmyadmin

        Web server to reconfigure automatically: (leave it here, not our case, coz we using nginx)

        Configure database for phpmyadmin with dbconfig-common?   (put password)

        ==========(need to set the path for nginx and config)===========

        ==========(I'm using adminer inside iomad as plugin)==========

        save and restart the server and enable the website

            sudo ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/

            sudo systemctl restart nginx.service

            sudo systemctl restart php7.2-fpm.service

16. visit the ip:port you are using and install iomad.

            had some issue in the default file inside /etc/nginx/sites-available

            careful with the braces and php settings 

        css and js were broken, folders, files error like babel-polyfill, mdn-polyfills, javascript.php, javascript-static.js, etc

        

Comments

Popular posts from this blog

Software Versions You Must Have..!

Google Chrome       Version 29 and Version 37 of Google Chrome works much better than any other version.I updated my Google Chrome but it was lagging,not responding, crashed,contents were loaded very slow and few more.So,finally I found Google Chrome 37 working better,bugs fixed and you can download this to fix the previous problems. 2. KM Player Really awesome player to watch HD Videos,movies.Compatible with all extensions of videos you want to watch whether it is mkv,3gp,flv,HD,4K etc.KM Player has very good 3D mode.You can watch multiple videos at a time.I found version 3.6 & 3.9 useful,but in between versions were very Ads providing, lagging every time when you open the Player. 3. iTunes & Quick Time Player  Hats off to the creator 'Apple Inc.'. iTunes- name is enough.I use default audio player as iTunes.You can feel the sound clarity when you are changing it to other mode like Pop,Rock,Acoustic,Bass etc. iT...

HOW-TO:- Solve Moodle 2.7 on MySql 5.7.x Installation

The reason of doing this is I configured my apache for local virtual hosting rather than localhost (available in the next post). I found the error as mentioned below, and I tried different solution to solve it. I did few of the things to solve, they are as follows: Removed and installed MySQL server. Installed mysql 5.7v Installed Moodle 2.7+ stable version  configured and deleted Moodle config.php few times. created and deleted database naming moodle(default created when initialized) and few other names. Gave permission to php5.6 instead of php7.0.2 in Ubuntu 16.04 Here's the Solution, find below lines(183 - 191) or search for " SELECT @@storage_engine " and then replace it from "SELECT @@default_storage_engine" . =======Code Snippets(183 - 191):  =======         // get the default database engine         $sql = " SELECT @@default_storage_engine";         $...

Lamborghini Showroom Bangalore India..!

#Lamborghini Lovers Automobili Lamborghini has opened their third dealership in India at Bangalore/Bangaluru. The dealership has an area of around 4350 sq ft.   President and CEO Mr. Stephan Winkelmann  Automobili Lamborghini  has chosen  Bangalore  for the company’s third sales centre, after Mumbai and Delhi. New  Lamborghin i  Bengaluru dealership was opened with the entire lineup of Raging Bull cars under the roof, which includes the  #Lamborghini Aventador   Coupé LP 700-4 and Aventador Roadster LP 700-4   line-up along with the newly launched  #Lamborghini Huracan  LP 610-4 .  Via RushLane & Lamborghini facebook.