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

GraphQL vs REST

  GraphQL   GraphQL is an application layer server-side technology which is developed by Facebook for executing queries with existing data. GraphQL can optimize RESTful API calls. It gives a declarative way of fetching and updating your data. GraphQL helps you to load data from server to client. It enables programmers to choose the types of requests they want to make. REST REST is a software architectural style that defines a set of constraints for creating web services. It is designed specifically for working with media components, files, or hardware device. The full form of REST is Representational State Transfer. ========================================================= Here is the important difference between GraphQL and REST. GraphQL REST GraphQL is an application layer server-side technology which is developed by Facebook for executing queries with existing data. REST is a software architectural style that defines a set of constraints for creating Web services. It follow...

Competitor or Alternative of IDM (Internet Download Manager) 🤔

  Yes you heard right, a perfect competitor and alternative of IDM (Internet Download Manager) that helps you to get links from Torrent download, YouTube videos and many more. I was really fan of IDM (Internet Download Manager). I always use genuine products for my work and productivity but yes free applications as well 😉😄 mostly. But sometimes laziness and saving money a bit helps too. Problem started when I installed the crack version of IDM and it always prompted to buy/register the product. Although it was a valid reason from their side as well. 😄😄 I started to search and got a free, powerful, best alternative named   EagleGet for Windows  You can download it from Softinic  or Filehippo   I found it very useful in many ways, some of them are faster downloads it can track links and starts downloading as soon you copy  works like a charm, it doesn't integrate videos after downloading finishes (like you can notice in IDM) I think yo...

DBMS ACID Properties

 1. Atomicity states that database modifications must follow an all or nothing rule 2. Consistency states that only valid data will be written to the database. If, for some reason, a transaction is executed that violates the database's consistency rules, the entire transaction will be rolled back and the database will be restored to a state consistent with those rules.  3. Isolation requires that multiple transactions occurring at the same time not impact each other's execution. For example, if Joe issues a transaction against a database at the same time that Mary issues a different transaction, both transactions should operate on the database in an isolated manner. The database should either perform Joe's entire transaction before executing Mary's or vice-versa. 4.  Durability ensures that any transaction committed to the database will not be lost. Durability is ensured through the use of database backups and transaction logs that facilitate the restoration of committe...