Moodle Installation on Microsoft Azure - Linux Platform
Create a Linux Virtual Machine to use as a Template to autoscale moodle for peak loads and optimize azure spending
2. Deploying Moodle With High Availability - Linux
Outline
Objectives
Introduction
Moodle Installation on Azure Linux Platform
Create a Linux Virtual Machine to Use as a
Template for auto scale Moodle
Summary
OUTLINE
3. Objectives
Moodle Installation on Azure Linux Platform
Create a Linux Virtual Machine to Use as a Template for
auto scale Moodle
By the end of this session, you will be able to learn about:
TOPIC
01/05
Back to outline page
Deploying Moodle With High Availability - Linux
4. Introduction
TOPIC
02/05
Moodle is an open source learning management system and an e-learning platform
to serve learners across the globe.
It is written in PHP and distributed under general public license.
Back to outline page
Deploying Moodle With High Availability - Linux
5. Moodle Installation on Azure Linux Platform
1. Create a Linux Virtual Machine
2. Install Apache/MySQL/PHP
3. Install Additional Software
4. Complete Setup
5. Install Moodle
TOPIC
03/05
Back to outline page
Moodle installation on Azure Linux platform requires a few
steps to follow. They are:
Deploying Moodle With High Availability - Linux
6. Moodle Installation Procedure on Azure Linux Virtual Machine
TOPIC
03/05
1. Create a new page on windows server 2012 R2 virtual machine.
Open http://azure.microsoft.com/
Back to outline page
Deploying Moodle With High Availability - Linux
7. Moodle Installation Procedure on Azure Linux Virtual Machine
TOPIC
03/05
1.2 Click on the portal (https://manage.windowsazure.com/) to login
Back to outline page
Deploying Moodle With High Availability - Linux
15. Install Apache/MySQL/PHP
1. Open up Terminal and install the following;
2. Open the SSH Session with the Ubuntu server
sudo apt-get install apache2
sudo apt-get install mysql-client mysql-server
sudo apt-get install php5
TOPIC
03/05
Deploying Moodle With High Availability - Linux
Back to outline page
16. Install Additional Software
sudo apt-get install graphviz aspell php5-pspell php5-curl php5-gd php5-intl php5-
mysql php5-xmlrpc php5-ldap clamav
1. Setup MySQL Server, add the following line under the last statement in
/etc/mysql/my.cnf
default_storage_engine = innodb
innodb_file_per_table = 1
2. Create Database for moodle with the following commands
mysql -u root -p
CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE
utf8_unicode_ci;
create user 'moodledude'@'localhost' IDENTIFIED BY 'passwordformoodledude'
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY
TABLES,DROP,INDEX,ALTER ON moodle.* TO moodledude@localhost IDENTIFIED
BY 'passwordformoodledude';
TOPIC
03/05
Deploying Moodle With High Availability - Linux
Back to outline page
17. Installing Moodle
1. Open the https://download.moodle.org/releases/latest/ to
Download latest moodle
2. Extract and copy the downloaded Moodle to
C:wampwww
3. In your browser, type localhost/moodle
4. The Moodle set up screen will appear.
5. Entre the paths
6. Entre the database Details
TOPIC
03/05
Deploying Moodle With High Availability - Linux
Back to outline page
18. 7. Moodle needs to ensure our wampserver has all the
features ("extensions") enabled to run it successfully.
8. Anything in green is fine. Anything in yellow is OK (but
would be better in green). Anything in red will stop us
installing Moodle.
9. Once your server checks page shows all green or all green
with some yellow, you can click "Continue"
10. Moodle will install - this will take some time. Be patient.
When you see "workshop" you know you are nearly done
11. Complete details for your admin username and password
(and remember them!)
12. Complete details for your front page (name of your
Moodle, etc)
TOPIC
03/05
Installing Moodle
Deploying Moodle With High Availability - Linux
Back to outline page
19. Capture a Linux Virtual Machine to Use as a Template for auto scale Moodle
Connect to the virtual machine using an SSH client of your choice
In the SSH window, type the following command.
sudo waagent -deprovision
This command will attempt to clean the system and make it suitable
for re-provisioning. This operation performs the following tasks:
Removes SSH host keys (if Provisioning.RegenerateSshHostKeyPair is
'y' in the configuration file)
Clears nameserver configuration in /etc/resolv.conf
Removes the root user's password from /etc/shadow (if
Provisioning.DeleteRootPassword is 'y' in the configuration file)
Removes cached DHCP client leases
Resets host name to localhost.localdomain
Deletes the last provisioned user account (obtained from
/var/lib/waagent) and associated data.
TOPIC
04/05
Deploying Moodle With High Availability - Linux
Back to outline page
20. 1. Type y to continue. You can add the -force parameter to avoid
this confirmation step.
2. Type Exit to close the SSH client.
3. Open Azure Management Portal to your azure Subscription
4. Shut down the virtual machine which is already deprovisioned in
the steps above with
5. When the virtual machine is stopped, capture the image with
6. The new image is now available in the list of images that can be
used to configure any new virtual machines, for autoscalling
7. Click on the cloud Service on the Azure Portal
TOPIC
04/05
Capture a Linux Virtual Machine to Use as a Template for auto scale Moodle
Deploying Moodle With High Availability - Linux
Back to outline page
24. Summary
TOPIC
05/05
Moodle installation on azure Linux virtual machine
In this session, you have learnt:
Back to outline page
Deploying Moodle With High Availability - Linux