Moodle Installation on Linux

Share this post on:

this is installation of Moodle Learning Management System on Linux

The Ubuntu root password user name: jesse Password : dhammu
  • The MySQL username and password that Moodle will use
    • root
    • moodle
  • database name : moodle

    database user : moodle

    Database pass: Moodle@127

    Connection:                   Localhost via UNIX socket

    socket : /var/run/mysqld/mysqld.sock

    • The Moodle main admin username and password
    • An additional admin Moodle username and password

    sudo add-apt-repository ppa:ondrej/php

    Add Moodle Repository in Linux

    sudo apt-get update && sudo apt-get upgrade

    Linux package Updates


    sudo apt-get install apache2

    Install Apache on Ubuntu Linux

    sudo apt-get install php7.3

    Install PHP 7 on Ubuntu Linux

    sudo apt-get install libapache2-mod-php7.3

    Install Apache Mods for PHP 7

    install additional softwares

    sudo apt-get install graphviz aspell ghostscript clamav php7.0-pspell php7.0-curl php7.0-gd php7.0-intl php7.0-mysql php7.0-xml php7.0-xmlrpc php7.0-ldap php7.0-zip php7.0-soap php7.0-mbstring

    sudo apt-get install graphviz aspell ghostscript clamav php7.0-pspell php7.0-curl php7.0-gd php7.0-intl php7.0-mysql php7.0-xml php7.0-xmlrpc php7.0-ldap php7.0-zip php7.0-soap php7.0-mbstring

    check php version with

    Check PHP version info on Ubuntu Linux

    php -v

    install mysql server

    Install MySQL on Ubuntu Linux

    sudo apt install mysql-server

    mysql_secure_installation to set the password and give appropriate permissions

    Mysql secure Installation

    in case your myswl server password is not set you can use the folloing command to do so

    mysqladmin -u root password

    now install phpmyadmin utility

    Install PHPmyadmin for Ubuntu Linux
    Installation of PHPMYADMIN on ubuntu linux

    sudo apt install phpmyadmin php-mbstring php-gettext

    of if you want a dedicated program on your server you can also install

    mysql workbench utility by

    sudo apt-get install mysql-workbench

    sudo service apache2 restart

    now lets create a file to check the php version and all other settings in one play

    PHP Info file

    we create phpinfo.php file in the web root with folloing code in it.

    <?php

    // Show all information, defaults to INFO_ALL

    phpinfo();

    ?>

    Phpinfo file in linux server

    phpinfo page

    phpinfo page

    now download the moodle code in www directory

    and extract it there

    Download Moodle

    and also create moodledata folder the set appropriate permission as follows

    sudo mkdir /var/moodledata

    sudo chown -R www-data /var/moodledata

    sudo chmod -R 777 /var/moodledata

    sudo chmod -R 0755 /var/www/html/moodle

    after doing this go to the browser and open the following url

    http://localhost/moodle/install.php
    Moodle Web Installation screen 1
    Moodle web installer and directory structure
    Moodle Webinstaller Database Connection

    open my sql command prompt and execute folling command to create the database

    Create Database for moodle in linux
    Create Moodle Database
    Set Permission for Moodle Database
    Moodle Webinstaller checklist
    Moodle Webinstaller system Checks
    Moodle webinstaller Cheks
    Moodle Webinstaller System Settings
    Moodle site descriptions
    Moodle Mail Configuration
    Moodle Dashboard

    CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

    Moodle Course
    Moodle Course Catagories

    Moodle Course Topics
    Moodle Course Topics
    Moodle Courses
    Moodle Courses
    Moodle Homepage
    Moodle Homepage

    Discover more from Rupinder Singh

    Subscribe to get the latest posts sent to your email.

    Share this post on:

    Author: Rupinder Singh

    I am a tireless intelligence seeker, coincidentally I am a computer guy too, who is passionate about Information Tools and Open-Source software. I Read Books, play Computer Games, Climb Mountains, when I am not changing the code.

    View all posts by Rupinder Singh >

    Discover more from Rupinder Singh

    Subscribe now to keep reading and get access to the full archive.

    Continue reading