I was trying to get the latest Moodle 1.9 running with a solid PHP with enough extension bits to import an IMS Common Cartridge (IMS-CC) that requires PHP5, DOM, XSL and LIBXML (2.6.30 or newer) extensions to be installed in the server. I had lots of hosted PHP instances from various sources that simply did not have enough of the plugins installed. So I needed to make a new one from scratch and since I have recently become an Amazon EC2 geek, I figured I would try it there.
I figured there would be a nice AMI (image) which had exactly what I wanted. There was a cool image from BitNami but it was for a 2.0.1 Moodle, not a Moodle 1.9.10.
But I figured I would be best off if I started with this image and did some hacking rather than starting from a naked image and adding stuff. I am sure there is a better way and I really wish BitNami would just give me a nice 1.9.10 image as good as their 2.0.1 image. But until then, it is hacker-time.
So here is my list of hack steps:
Start with a Moodle 2.0 Image from BitNami http://bitnami.org/stack/moodle Pick the EBS version - I choose ami-68c23301 ssh -i funkeys.pem bitnami@ec2-55-55-55-55.compute-1.amazonaws.com sudo bash cd /opt/bitnami/apps/moodle/ mkdir tmp cd tmp curl -O http://download.moodle.org/stable19/moodle-1.9.10.zip apt-get install unzip unzip moodle-1.9.10.zip cd /opt/bitnami/apps/moodle/ mv htdocs htsave mv tmp/moodle htdocs http://ec2-55-55-55-55.compute-1.amazonaws.com/moodle/install.php Choose a language: Next Checking your PHP settings: Next Please confirm the locations of this Moodle installation: chmod 777 /opt/bitnami/apps/moodle/moodledata Press Next At the Database Setup Screen: grep "'password'" /opt/bitnami/apps/phpmyadmin/htdocs/config.inc.php Look for a line that looks like: $cfg['Servers'][$i]['password'] = 'zippy'; Database Name: moodle19 User: root Password: zippy (replace this with what you see above) Press Next Checking your environment: Next Download language pack: Next Configuration completed: Copy PHP code from the browser. Edit /opt/bitnami/apps/moodle/htdocs/config.php Paste in the PHP code from the browser and save the file Back in the browser Press "Continue" You should be at the license screen - from there proceed normally Once things are completely done and if you want to install Basic LTI :) /opt/bitnami/apps/moodle/tmp curl -O http://basiclti4moodle.googlecode.com/files/basiclti4moodle-Jan-13-2011.zip unzip basiclti4moodle-Jan-13-2011.zip mv /opt/bitnami/apps/moodle/tmp/basiclti4moodle/IMS*/*1.9*/mod/basiclti /opt/bitnami/apps/moodle/htdocs/mod/ Back in Moodle, Press "Notifications" as the Admin to create the Basic LTI tables. And you are done.