Difference between revisions of "Moodle VPL Server Setup"
(→Install VPL Jail System) |
(→Moodle Server Setup) |
||
Line 72: | Line 72: | ||
** emacs24 | ** emacs24 | ||
** git | ** git | ||
+ | ** php5-xmlrpc | ||
+ | |||
* For installation, follow reference: http://docs.moodle.org/23/en/Installing_Moodle | * For installation, follow reference: http://docs.moodle.org/23/en/Installing_Moodle | ||
* setup php curl: | * setup php curl: |
Revision as of 16:40, 10 June 2014
--D. Thiebaut (talk) 16:15, 10 June 2014 (EDT)
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
- Install virtualbox: follow directions from http://www.n00bsonubuntu.net/content/install-virtualbox-ubuntu-14-04/:
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
- For installation, follow reference: http://docs.moodle.org/23/en/Installing_Moodle
- setup php curl:
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
- Setup Moodle (follow directions from http://docs.moodle.org/23/en/Installing_Moodle
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
- Download from http://vpl.dis.ulpgc.es/index.php/en/download
- sudo unzip module in /var/www/moodle/mod
- Go to notification in Admin Menu of moodle, and click on update database. ==> Success!
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
=Last Minute
PHP needs XMLRPC
To test if Moodle sees the VPL server, go to a VPL activity created in a course, and select it. Open it There should be a VPL Administration menu in Moodle opening up. Pick Advanced Settings and Check execution servers to see what happens. I first got PHP needs CMLRPC error, even for the default VPL server set in Spain. Solution: install php5-xmlrpc on moodleServer and vplserver sudo apt-get install php5-xmlrpc
Then repeat the test and see the result of Check execution servers in Moodle:
MoodleVPLServerChecked.png
[edit]June 5, 2014
[edit]Backup
create a backup of the /home/dominique with deja-dup. Just start the "Backup" black vault app in the favorites. output folder is /media/1_5TB/Backups/deja-dup/ Backup performed every day Used Clonezilla to make a duplicate of 1TB boot disk. Now second 1TB contains exact copy and can be booted from. Disks labeled inside the case (Boot/Backup). The backup disk is off line and off power for now. The boot disk has ID WD-WCAU4C220157 The backup disk has ID WD-WCAU4C208949 Used the GUI, but can run this command from Clonezilla shell to go faster:
/usr/sbin/ocs-onthefly -g auto -e1 auto -e2 -j2 -r -f sdb -t sdc
[edit]