How To Install Moodle with Linux / Ubuntu


                                 
                                          How To Install Moodle with Linux Servers


1.Install Ubuntu 16.04 LTS



Reason to prefer ubuntu  server over Ubuntu desktop
  • Nowadays in IT, industry Command-line Interface (CLI) is getting used as it is safe and less prone to hack.
  • If we are using Moodle lms server for local and for experimental purpose then there is need of installing the desktop version of Ubuntu.

Once we install CLI and downstream we anguish, then we can add a graphical desktop: Though it is not recommended by the expert, graphical user interface(desktop) can be added by using a command    sudotasksel’(Space bar) to install  ‘Ubuntu Desktop’

Reasonwe prefer (or don't prefer) Ubuntu 18.04 over Ubuntu 16.04 over Ubuntu 14.04
  • All three Ubuntu packages are LTS(Long Term Service) releases.
  • There is difference in Ubuntu release 18.04 and 16.04 than 14.04LTS
  • Moodle 3.01 onword is required PHP 7.0
  • If we are using external authentication or enrollment plug-ins, note that in Moodle 3.0.1 release MSSQL and SQLSRV are not available in PHP 7.0. Also depending upon a configuration some of the extension might be missing or working in progress for our contribution. We need to check exact availability of OS.

*Ø   Procedure

  • Amd64 server is preferred




  1. ·        Ubuntu Server 18.04LTS amd64 has all packages which are required
  2. ·        Ubuntu 18.04LTs has slight difference from 14.04LTS mainly in php7.0

  • ·        There are two editors VI(lightware editor) and VIM(heavyweight edito) we can use either one of them using below;-

sudo apt-get install vim
  • ·        Commonds mainly used in VI or VIM

Ø  For editing file press “Insert” key
Ø  For finishing edit file press “ESC” key
Ø  For write in the file press “.w”
Ø  To exit editor press “.q”
Last two option be done together i.e write and quite using “.wq”

  • In Ubuntu ,standard user which we create while during installation do not have rights to install/write with respect to many directories Because of this we use ‘sudo’(super user do) term while using every command.


Step 2: Install Apache/MySQL/PHP

Open the terminal for adding phpppa:

sudo add-apt-repository ppa:ondrej/php

sudo apt-get update

sudo apt-get install apache2 mysql-client mysql-server php7.0 libapache2-mod-php7.0

After this it will give us password for mysql kindly please store that because in letter steps we need to use that password.
  
Step 3: Install Additional Software

sudo apt-get install graphvizaspellghostscriptclamav 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

To locate  amodule correctly kindly restart the Apache

sudo service apache2 restart

To store Moodle core application Git will be used

sudo apt-get install git-core


Step 4: Download Moodle

In other terms, Git is known as ‘Version Control System’. By using Git it will ultimately update the Moodle lms core application. Next step will  illustrate reason of putting Moodle core application code in /opt directory.

cd /opt

To download Moodle  lms code & index

sudogit clone git://git.moodle.org/moodle.git

Changing directory where Moodle folder is downloaded

cdmoodle

To retrieve all available branches

sudogit branch -a

For track or use of git branch

sudogit branch --track MOODLE_33_STABLE origin/MOODLE_33_STABLE

Most important to check Moodle version

sudogit checkout MOODLE_33_STABLE

Step 5: Copy local repository to /var/www/html/

sudocp -R /opt/moodle /var/www/html/

sudomkdir /var/moodledata

sudochown -R www-data /var/moodledata

sudochmod -R 777 /var/moodledata

sudochmod -R 0755 /var/www/html/moodle

The idea behind creating repository is to formulate and lap our upgrades in the more decisive way.

Step 6: Setup MySQL Server

Before MySQL setup we first need to change storage engine to innodb and file format to Barrcuda. This is new in Ubuntu 18.04LTS version not available in previous. Also need to set up innodb_file_per_tableso that Barrcuda will work properly.

v No need to make innodb as default storage engine because latest Moodle lms version automatically does the same. It is a best practice to make it default anyway. Whoever we neeed to set default file format!

v If we have choosen vim instaead please reserve vi for vim

sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf

Scroll dowon to [mysqld] and go to basic setting to add below mentioned line in last statement. As preiuoslytols press “insert” key on a keyboard for the same.

default_storage_engine = innodb

innodb_file_per_table = 1

innodb_file_format = Barracuda

To save my.cnf file using editor kindly press Esc key, also type below sequence

:w

:q

To know change made are affecting restart MySQL

sudo service mysql restart

We have to create Moodle database and Moodle MySQL user with correct permissions, here we need to use password which we created in above step

mysql -u root –p

mysql>CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE 

utf8_unicode_ci;

In place of “moodlecloud” and “passwordformoodlecloude” we can enter username and password of our choice

mysql>create user 'moodledude'@'localhost' IDENTIFIED BY 'passwordformoodledude';


mysql>GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO moodledude@localhost IDENTIFIED BY 'passwordformoodledude';

mysql>quit;


Note: While using MySql 5.6+ if we get an error about the password for creating a user, at that time we have to adjust the value of the hash. We can get this by flowed steps;-

mysql>SELECT password('passwordformoodledude');

Result of above comond will come as “*AD51BAFB2GD003D3480BCED0DH81AB0BG1712535WE WILL USE THIS AS IDENTIFIED BY’part

Step 7: Complete Setup
Note: If anyone is not comfortable to create config.php by terminal while going through installation, then there is a need for creating webroot writable by following 

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

After we ran the installer, we have Moodle  lms set up, there is a need to revert permission so that file will no longer writable by using below command;-

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

Open the browser and type the moodle site address and follow below prompts

Change the path for moodledata
/var/moodledata
Database Type
Choose: mysqli
  
Database Settings

Host server: localhost

Database: moodle

User: moodledude (the user you created when setting up the database)

Password: passwordformoodledude (the password for the user you created)

Tables Prefix: mdl_

Environment Checks

Environment check will illustrate requirement of additional element for Moodle installation

This will indicate if any elements required to run moodle haven't been installed.

Next next next...
follow prompts and confirm installation

Create a Site Administrator Account
Here create user which will be having all rights of site administrator.
For password Moodle  lms has certain security requirement make sure we follow that.

Installation Complete
Congrats! You can now start using Moodle!


Don't Forget
If webroot is writable don’t forget following;-

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

System Paths After Install
After installation completed we should set system path which will help to improve Moodle LMS performance. So that each and every enrty of Moodle will have own explanation.

Navigate,on Moodle lms webpage,  Site Administration > Server > System Paths
Input the following;

Path to Du: /usr/bin/du

Path to Apsell: /usr/bin/aspell

Path to dot: /usr/bin/dot

Save Changes.


How To Install Moodle LMS with Windows Server


Moodle Installation with Windows Server


  • Moodle Installation complete Process


Install Moodle lms on your server or localhost to download Moodle package from https://download.moodle.org/releases/latest/ and you will get moodle package(code)with all software requirements and version details for running Moodle on your server, It requires Apache, MySQL and PHP environment on your server or localhost on your system.
There are 3 basic components to this installation. Download and unzip the moodle package.
Start your web server for installation on localhost for your other hosting server this will not require.Start to install Moodle lms using the web browser.

  • Start Moodle installation

Start your browser and type localhost or http://localhost within the address bar. you may either begin your initial time Moodle lms installation or if it's already put in you may enter the Moodle site's Front Page or Login screen.




  • Select the Language of Moodle you install

Type the  http://localhost/moodle and hit the enter button you will displayed Moodle install page




Select the language (I select the English for this example) and click on “Next” button.

  • Moodle data directory Path

You have to give a path for the moodledata directory in Data directory section. If the directory does not currently exist then installation process will create it on your PHP environment this moodle data directory is created out of www folder. A directory has to read and write permission on the server.



Click the “Next” button to continue.

  • Select your Database

Moodle LMS support different types of a database select the database which you will be used with Moodle.If you don’t know the type of database then please go through your server technical support to know the type of database.



Select and click on “Next” button to continue.

  • Configure your Database settings

This page displayed with some already populated filled. You need to fill Database name, Database username and database password, do not fill the Table prefix and Database port fields.



Click on “Next” button to continue

  • Moodle copyright / license notices are displayed

Installation page will displayed as following, click to continue



  • Server Configuration Status

We can see our server meet the all requirement specification or not, If not then we get the warning notification in the footer of the page following server check page will be displayed




Click on continue for installation.

Moodle Installation now start we can see the Moodle lms installs different modules




Moodle installation is finished click on “Continue” to proceed.

  • Administrator profile settings

Moodle lms site administrator user provides you all access throughout the site, fill carefully the required fields and remember the username and password of site administrator because all time you have to log in using this detail.



Click on update profile button to proceed.


  • Moodle Front page settings

On front page setting page you have to provide site Full name and short name of Moodle lms site also moodle lms ask you to set your location and manage authentication setting where you enabled the user self-registration setting, Click on save changes button.



  • Outgoing E-mail Configuration

This setting asks you to edit the email for which email ID used for outgoing email, The email ID you add here it will use for “FROM” address those cases when recipients should not be able to reply directly to the user. Click on save changes



  • Admin Dashboard

Now you land on admin user dashboard page where you can see the Course Overview box and left-hand side there is navigation block where you can get to side administration setting or site Home / front page, right-hand side you can see the Calendar,Online users block also you can update your admin setting click on right side Admin user



How to add questions in Moodle LMS

e learning moodlelms aicc is one of the most important terms come across in the world of online e learning.

Adding Question in Moodle

This  document will help us to add questions in moodle. Quiz in moodle is set of question for learner or student. The quiz can be created by a faculty or teacher. Question bank can be created in any perticular course or categery. We can also create perticular quiz and add questions in that quiz.
We can install moodle on localhost. For that we use Wamp Server to install moodle.  Here we can do various stuff. In Moodle we can add questions like Multiple choice, Matching, Short answer etc.  Here For e.g. we add Multiplue choice question.
Following are the steps to add multiple choice question in Moodle.

Note: - While adding question make sure Editing is ON. (Click Turn Editing On  for that).
Step 1:-Login to the moodle portal





Step 2:- When we logged to the moodle  there we can see dashboard. On dashboard we can have Navigation block, from which we  select course for which we want to add questions to. Navigation block contains the list of courses with their category allotted to the user. For e.g we have created Probability Course in Math’s category. To go in the particular course first click on category then select the ecourse.





Step 3 :-After entering into the course we can see the contents of course. It has navigation and Site Administrator or Administration Block.  To add question level wise go to setting tab,select Question bank drop down, it contains four options Question, Categories, Import and export.

Question: We can questions directly.

Categories: We can create more than one levels, so that we can add questions level wise.

Import: We can import data from other resources.

Export: we can move data from moodle to outside.






Step 4:- Click on Categories in Question bank drop down.  Here we can make Category or levels for adding questions. Because we can have multiple levels for same topic. In Add category we have to select Parent category for creating level. Then we enter the name of category/level to create.


Step 5:- Now click on Question of Question Bank, to add question.

Step 6:- After creating the levels. Come out of the Add category Page. 

 


Now click on Question of Question Bank, to add question. Here first select the Category for adding questions. We can have one or more levels. So we select level in which we add questions.



Kategori

Kategori