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

how to solve: nginx Permission denied problem

  *71 connect() to unix:/run/php/php7.4-fpm.sock failed (13: Permission denied) while connecting to upstream, client: <ip here>, server:  <ip here>, request: "GET /iomad/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "<ip here>" just give permission  to  php7.4-fpm.sock i solved it by giving sudo chmod -R 0777     php7.4-fpm.sock Also i tried to open the file but there was again permission denied issue  i visited my website and it was working

Indian HAL Tejas | Touch The Sky With Glory | ShotOnNikonD3500

Indian HAL Tejas | Touch The Sky With Glory | ShotOnNikonD3500

installing Laravel v8.0.1 in Windows 10 Pro x64bit

 Using WAMP for  php - 7.4.10 maraiadb - 10 apache - 2.4 php -i | grep -i ssl  to check registration stream socket transports grep -R "search your word" use this cmd to search in linux directory composer diagnose to see the status of composer check with this link also:  https://github.com/composer/composer/issues/4388 Failed to download tijsverkoyen/css-to-inline-styles from dist: The "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/b43b05cf43c1b6d849478965062b6ef73e223bb5" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: No such host is known.     failed to open stream: php_network_getaddresses: getaddrinfo  failed: No such host is known.  Now trying to download from source https://github.com/tijsverkoyen/CssToInlineStyles   install the  composer require tijsverkoyen/css-to-inline-styles ======================================================================= These are final steps: ...