Difference between revisions of "Moodle VPL Server Setup"

From dftwiki3
Jump to: navigation, search
 
Line 9: Line 9:
 
|}
 
|}
 
<br />
 
<br />
 +
----
 
<center>[[Tutorials#Moodle_Virtual-Programming-Lab_.28VPL.29|Moodle VPL Tutorials]]</center>
 
<center>[[Tutorials#Moodle_Virtual-Programming-Lab_.28VPL.29|Moodle VPL Tutorials]]</center>
 +
----
 
<br />
 
<br />
 
<br />
 
<br />

Latest revision as of 19:43, 12 June 2014

--D. Thiebaut (talk) 16:15, 10 June 2014 (EDT)



MoodleVPLLogo.png



Moodle VPL Tutorials



These are rough notes detailing the installation of two virtual Ubuntu servers on a Hardware Ubuntu 14.04 server. The notes are intended to provide general guidelines, and not precise step-by-step instructions. The main Ubuntu server runs two virtual servers, one a LAMP server that hosts Moodle, the other a regular Ubuntu server used for the jail-system required by the Virtual Programming Lab module of Moodle (VPL).


Versions

  • Ubuntu 14.04
  • Moodle Version 2.7 + (Build: 20140529)
  • Virtual Programming Lab (VPL) Version 3.0.1. VPL is a Moodle module that can be found on this page.


Hardware Server Setup


Motherboard/Processor/Video


  • ASUS M5A97 R2.0 AM3+ AMD 970 SATA 6Gb/s USB 3.0 ATX AMD Motherboard ($84.99)
  • Corsair Vengeance 16GB (2x8GB) DDR3 1600 MHz (PC3 12800) Desktop Memory (CMZ16GX3M2A1600C10) ($120.22)
  • AMD FX-8150 8-Core Black Edition Processor Socket AM3+ FD8150FRGUBOX ($175)


Main-Server Setup

  • setup Server hadoop0 (Legacy name, call yours with your favorite name) as Ubuntu 14.04 server with LAMP + OpenSSH services.
  • Install as root some required packages
apt-get install gparted xorg gnome-core gnome-system-tools gnome-app-install
apt-get install ddclient (optional, but will allow you to ssh to your server using a domain name rather than an Ip address)
apt-get install emacs24
apt-get install git
apt-get install phpmyadmin

 wget http://releases.ubuntu.com/trusty/ubuntu-14.04-server-amd64.iso
 wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
 sudo apt-get update && sudo apt-get install virtualbox-4.3 -y
 sudo apt-get selfupdate
 sudo apt-get update
 wget http://download.virtualbox.org/virtualbox/4.3.12/virtualbox-4.3_4.3.12-93733~Ubuntu~raring_amd64.deb
 wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
 sudo apt-get update && sudo apt-get install virtualbox-4.3 -y
 wget http://download.virtualbox.org/virtualbox/4.3.10/Oracle_VM_VirtualBox_Extension_Pack-4.3.10-93012.vbox-extpack
 adduser yourLoginName vboxusers
  
  • copy Oracle_VM_VirtualBox_Extension_Pack-4.3.10-93012.vbox-extpack to you home directory and double-click on it to install it.
 mv Oracle_VM_VirtualBox_Extension_Pack-4.3.10-93012.vbox-extpack  /tmp

  • Put Ubuntu Server iso in dvd
  • Start virtualbox on your server


Moodle Server Setup


  • create a new VM as a Ubuntu 14.04 server
  • name it moodleServer (or whatever name you want to name it)
  • 4 GB Ram
  • 20 GB Hard disk
  • Bridged NAT network
  • user yourUserName/yourPassword
  • set the root password for mysql
  • request LAMP and Open-SSH services
  • apt-get some applications when first-time in the system:
    • ddclient (same comment as before. Useful if your Ips change from time to time)
    • phpmyadmin
    • emacs24
    • git
    • php5-xmlrpc
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
  • get and install moodle
sudo -i
git clone -b MOODLE_27_STABLE git://git.moodle.org/moodle.git 
cd /var/www/html
mv /root/moodle .
chown -R root moodle
chmod -R 0755 moodle/
find moodle -type f -exec chmod 0644 {} \;

  • setup moodledata directory:
 sudo -i
 mkdir /usr/local/moodledata
 chmod 777 /usr/local/moodledata
  • Mysql
Database on moodleServer: moodle, collation utf8_general_ci
user: mooduser, localhost, password typeYourPasswordHere
admin account: admin
admin password: typeYourPasswordHere
type value, press Enter to use default value (en)
: 
-------------------------------------------------------------------------------
== Data directories permission ==
type value, press Enter to use default value (2777)
: 
-------------------------------------------------------------------------------
== Web address ==
type value
: http://moodleServer.your.Domain.Name/moodle
------------------------------------------------------------------------------- 
== Data directory ==
type value, press Enter to use default value (/var/www/moodledata)
: /usr/local/moodledata
-------------------------------------------------------------------------------
== Choose database driver ==
mysqli 
mariadb 
type value, press Enter to use default value (mysqli)
: 
-------------------------------------------------------------------------------
== Database host ==
type value, press Enter to use default value (localhost)
: 
-------------------------------------------------------------------------------
== Database name ==
type value, press Enter to use default value (moodle)
: 
-------------------------------------------------------------------------------
== Tables prefix ==
type value, press Enter to use default value (mdl_)
: 
-------------------------------------------------------------------------------
== Database port ==
type value, press Enter to use default value ()
: 
-------------------------------------------------------------------------------
== Unix socket ==
type value, press Enter to use default value ()
: 
-------------------------------------------------------------------------------
== Database user ==
type value, press Enter to use default value (root)
: mooduser
-------------------------------------------------------------------------------
== Database password ==
type value
: typeYourPasswordHere
-------------------------------------------------------------------------------
== Full site name ==
type value
: CompSci Moodle
-------------------------------------------------------------------------------
== Short name for site (eg single word) ==
type value
: CSMoodle
-------------------------------------------------------------------------------
== Admin account username ==
type value, press Enter to use default value (admin)
: admin
-------------------------------------------------------------------------------
== New admin user password ==
type value
: typePasswordHere
-------------------------------------------------------------------------------
== Copyright notice ==
Moodle  - Modular Object-Oriented Dynamic Learning Environment
Copyright (C) 1999 onwards Martin Dougiamas (http://moodle.com)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the Moodle License information page for full details:
http://docs.moodle.org/dev/License

Have you read these conditions and understood them?
type y (means yes) or n (means no)
: y


Install/Setup VPL Module



Install VPL Jail System


  • On main server create a second VM as Ubuntu Server 14.04
  • Name it vplServer
  • Only install OpenSSH services on it.
  • select bridged network for network
  • apt-get several packages
apt-get install emacs24
apt-get install ntp
apt-get install php5-xmlrpc

  • install VPL jail server
 wget http://vpl.dis.ulpgc.es/releases/vpl_jail_system-2.0.1.tar.gz

  • select no for wildcard certificates
  • install ddclient (current IP=131.229.102.20)
  • setup vplserver.your.domain.name as name of machine
  • reboot
  sudo reboot

  • then restart vpl-jail system
sudo service vpl-jail-system start

  • Test. Plug these URL in browser and get OK message in blank page:
http://vplserver.your.domain.name/OK
https://vplserver.your.domain.name/OK

Make Moodle Server Aware of VPL Server

  • Switch to moodleServer where Moodle is installed
  • login as admin and go to http://moodleServer.your.domain.name/moodle/admin/search.php?query=vpl
  • Set Execution Server List to http://vplserver.your.domain.name


This concludes the Moodle/VPL server setup.