LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Wednesday, July 29, 2020

Install Moodle LMS on Debian/Ubuntu

0 comments
Moodle_Learning Management System
Moodle is a free and open-source learning management system (LMS) written in PHP and distributed under the GNU General Public License. Developed on pedagogical principles, Moodle is used for blended learning, distance education, flipped classroom, and other e-learning projects in schools, universities, workplaces, and other sectors. With customizable management features, it is used to create private websites with online courses for educators and trainers to achieve learning goals. Moodle (an acronym for modular object-oriented dynamic learning environment) allows for extending and tailoring learning environments using community sourced plugins.

Open Applications > System Tools > Terminal and execute commands one by one mentioned on this page.

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

Install LAMP Stack

https://libtechnophile.blogspot.com/2020/06/install-lamp-on-debianubuntu.html

Use this If you are using Ubuntu 20.04 LTS

https://libtechnophile.blogspot.com/2020/07/install-lamp-stack-on-ubuntu-2004-focal.html 

  • While installing LAMP stack you may have to  set MySQL root password) If you are installing moodle on the same server in which koha has  installed, you may not be asked for setting MySQL root password
  • Change opac port to 8001/8081 or else If your koha opac port is 80 and add  Listen 80 in ports.conf

sudo nano /etc/apache2/ports.conf

Listen 80

cd /var/www/html


Download Moodle from the official website to web root directory /var/www/html

sudo wget https://download.moodle.org/download.php/stable39/moodle-latest-39.zip

sudo unzip moodle-latest-39.zip

Rename moodle-latest-39 to moodle

sudo mv /var/www/html/moodle-latest-39 /var/www/html/moodle

OR

get moodle-3.7.tgz below link, extract, rename it into moodle and move from Download directory into /var/www/html

https://drive.google.com/open?id=19oFxvOsisHzSpm3jrSwbKCVkvriit75B

Change ownership and permission of the as Moodle follows

sudo chown -R www-data.www-data moodle

sudo chmod -R 775 moodle


Create a new virtual host configuration for accessing the Moodle

sudo nano /etc/apache2/sites-available/moodle.conf

add these lines

<VirtualHost *:80>
ServerName www.yourdomain.com
DocumentRoot /var/www/html/moodle/

<Directory /var/www/html/moodle/>
AllowOverride All
allow from all
</Directory>
</VirtualHost>


Enable site access

sudo a2ensite moodle.conf

Disable default access

sudo a2dissite 000-default.conf

Reload apache2 again

sudo systemctl reload apache2
Enable rewrite module

sudo a2enmod rewrite

Reload & restart the apache service to make the changes effect

sudo systemctl reload apache2 && sudo systemctl restart apache2

Now you can proceed the further installation and configuration from the browser by navigating to the following URL: http://youripaddress or domainname.com

Choose the installation paths

Create a new directory and set permission and ownership

sudo mkdir moodledata
sudo chown -R www-data.www-data moodledata
sudo chmod -R 775 moodledata


Restart the apache service to make the changes effect

sudo systemctl restart apache2

Choose the Database as shown in it

MySQL/MariaDB

Create database and username and assign a password

sudo mysql -uroot -p
(mysql root password)

create database moodle;
CREATE USER 'moodle'@'localhost' IDENTIFIED BY 'moodle123';
GRANT ALL PRIVILEGES ON *.* TO 'moodle'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit;


Now provide database connection details

Database connection          : localhost
Database name                   : moodle
Username                           : moodle
Password                            : moodle123

If PHP needs below extensions please install that too

php extension/intl

sudo apt-get install php-intl

php extension/xmlrpc

sudo apt-get install php-xmlrpc

php extension/soap

sudo apt-get install php-soap

Restart the apache & MySQL service to make the changes effect

sudo systemctl restart apche2 mariadb

That's it, now configures the Admin user setup and starts working on moodle

Reference:

https://docs.moodle.org/37/en/admin/environment/php_extension/intl
https://docs.moodle.org/37/en/admin/environment/php_extension/xmlrpc
https://docs.moodle.org/37/en/admin/environment/php_extension/soap

No comments:

Post a Comment