Usage/Deployment Instructions
Step 1: Access Moodle in Azure Marketplace and click on get it now button.

Click on get it now,

Click on continue and then click on create,

Step 2: Now to create a virtual machine, enter or select appropriate values for zone, machine type, resource group and so on as per your choice.






Click on Review + create;

After your deployment is complete go to resource group.
Step 3: Use the browser to access the application at http://<instance ip address> replace <instance ip address> with the actual ip address of the running instance.

Click on Next step,

You need to ssh into your vm and run the following command,
$chmod –R 007 /var/www/
$service apache3 restart


Click on next,

Step 4: For setting up MySQL database user do the following steps:
Do SSH into your instance.
Type the following commands:
Command: sudo su
Command: mysql –u root –p
Type in the password as: miri
Type the following commands to make a new database and user as per your choice:
Command: Create database <database name as you like>;
Command: CREATE USER '<username as you like>'@'localhost' IDENTIFIED BY '<password as you like>';
Command: GRANT ALL ON <database name>.* TO '<username>'@'localhost';
Command: FLUSH PRIVILEGES;
Command: exit;
NOTE: Please don’t forget to set the <database name as you like>, <username as you like> and <password as you like> in the above mentioned commands to run the product smoothly.
Step 5:You need to remove lock file,
$sudo lsof /var/lib/dpkg/lock
$sudo lsof /var/lib/apt/lists/lock
$sudo lsof /var/cache/apt/archives/lock

$sudo kill -9 <process_id> , here replace process id with the actual one
$sudo rm /var/lib/apt/lists/lock
$sudo rm /var/cache/apt/archives/lock
$sudo rm /var/lib/dpkg/lock

$sudo dpkg --configure -a
Step 6: Few extension you need to add,
$ apt install php5.6-mysqlnd php5.6-pdo php5.6-xml php5.6-curl php5.6-ldap php5.6-common php5.6-imap php5.6-intl php5.6-gd php5.6-mbstring php5.6-soap php5.6-mysql php5.6-xmlrpc php5.6-xml php5.6-zip

After this restart apache server with,
$service apache restart
Now redirect to ip address of vm, and do following steps.

Then click on continue,
Step 7: Now run server check,

Click on start installation

Click on continue,

Your admin and Website url will be generated.

Step 7: your admin portal will appear,
