Installing Moodle is Easy

3,706 views

Published on

Installing Moodle is easy on Ubuntu 12.04

Published in: Technology
3 Comments
2 Likes
Statistics
Notes
  • This method still requires user to have some experience in sys admin. I'd recommend to use managed platforms that allow 1-click installation. Here is an example of how easy it is to install Moodle on AWS using Cloudways paltform. http://www.cloudways.com/blog/moodle-on-amazon-cloud-aws/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • For Moodle cron job, a tutoriall at https://www.easycron.com/cron-job-tutorials/how-to-set-up-cron-job-for-moodle, may help .
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Well. It is not that easy for an unexperienced user. I would recommend to use the autometed deployment services for that. For example Deploy4Me installs Moodle on AWS. It os just a few clicks work.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
3,706
On SlideShare
0
From Embeds
0
Number of Embeds
1,030
Actions
Shares
0
Downloads
41
Comments
3
Likes
2
Embeds 0
No embeds

No notes for slide

Installing Moodle is Easy

  1. 1. Your systemadministrator is lying too you Installing Moodle (On Ubuntu Linux) is easy
  2. 2. Go here http://www.slideshare.net/simonsCatalyst
  3. 3. SSH Key• Windows users: – Install http://tinyurl.com/moodle-putty • SSH Client – Unzip http://tinyurl.com/moodle-ppk • Contains .ppk file• Linux / MacOSX users – Download http://tinyurl.com/moodle-rsa • RSA SSH key
  4. 4. Who the hell am I?• A Linux sysadmin, can you tell by the facial hair, surly holier-than-thou attitude• Politics, not IT educated• Worked for Catalyst for 3 years• Worked for a Port Company 3 years• Travelled• Sold soul to despicable currency traders• Back at Catalyst to atone for sins
  5. 5. Who the hell are you?• Tell me about yourselves
  6. 6. Why this workshop?• Maybe you are curious• I see people struggling on the Moodle forums• People think Linux is hard, its not, its just different.• Dont install on Windows – It costs money• Dont install on MacOSX – Dependency hell
  7. 7. About this workshop• I dont expect you to learn a hell of a lot, a lot of monkey-see, monkey-do.• I want to demonstrate that a basic Moodle installation is not difficult• We will use Amazon EC2 virtual machines
  8. 8. Outline• SSH setup• Login• Install dependencies• Create the dataroot• Create our database• Unpack moodle• Install Moodle• EXTRAS: APC, Cronjob
  9. 9. SSH login – Ask me for hostname• Windows: Open Putty – Expand SSH • Click on Auth – Browse for that .ppk file you unzipped – Scroll up to session • Click Open, username is ubuntu• Linux / MacOS X command prompt – ssh ­i installing­ moodle­is­easy­private  ubuntu@<hostname>
  10. 10. Logged in – Run the following• sudo apt­get update http://tinyurl.com/moodle-get- – Updates the VMs list of software availible from Ubuntu it• sudo apt­get install postgresql apache2­mpm­ prefork libapache2­mod­php5 php5­gd php5­curl  php5­xmlrpc php5­pgsql php5­intl php5­suhosin – Installs the requisite software for Moodle to function• sudo /etc/init.d/apache2 restart – Restart the webserver to pick up its new configuration
  11. 11. Make filesystem changes formoodle• sudo mkdir /var/www/moodle – There is where the code goes• sudo chown ubuntu:ubuntu /var/www/ – Lets you unpack the code• sudo mkdir /var/moodledata – This is where Moodle will store files• sudo chown www­data:www­data /var/moodledata – Let the webserver process write to this place
  12. 12. Create the database• sudo su – postgres – Switch user to the postgres Unix user• createuser ­P moodle – Create a user in the database user called moodle • -P means prompt for a password – Make the password moodle – Answer n to all questions• createdb ­Omoodle ­Ttemplate0 ­Eutf8 moodle – Creates a database called moodle • -O owned by the moodle database user you just created • -T that is completely blank • -E has the utf8 encoding• All done? No errors? Run exit (Just once)
  13. 13. Get and install the code• cd – Just that, puts you back in your home directory• wget "http://tinyurl.com/moodle­get­it" – Downloads the code• cd /var/www• sudo chown ubuntu:ubuntu /var/www/moodle• tar xvzf /home/ubuntu/moodle-get-it – Unpacks the code• sudo chown www-data:www-data /var/www/moodle/ – Temporary permissions change to allow the writing of the configuration file
  14. 14. Run the moodle installer• Back on your laptop, point your web browser at your Amazon EC2 machine – Something like – http://ec2-79-125-48-199.eu-west- 1.compute.amazonaws.com/moodle
  15. 15. Set moodle install options• Choose your language• Defaults on confirm paths are fine• Database driver should have already selected postgresql• Database settings – host: localhost – name: moodle – user: moodle – password: moodle
  16. 16. Copyright notice?!• Congratulations! – Everything has gone just great – sudo chown ubuntu:ubuntu  /var/www/moodle • Fixes insecure permissions – Read the copyright notice • Say Thanks Martin! and click continue • You must say thanks – Very important – Click on the next continue button, just once! • Be patient!
  17. 17. The cronjob• Moodle cron needs the Unix cron to work• Unix cron speaks an odd language – Minute, Hour, Day of month, Month, Day• 0,15,30,45 * * * * means?• In /etc/cron.d/ you also specify a username• Normally you dont redirect to /dev/null !• 0,15,30,45 * * * * www­data /usr/bin/php /var/www/moodle/admin/cli/cron.php  &> /dev/null
  18. 18. APC – What?• APC keeps a cached compiled copy of the Moodle code in memory – Improvement in performance• Very easy to install on Ubuntu• In Moodle enable the performance info
  19. 19. APC - Install• sudo apt­get install php­apc• sudo nano /etc/php5/conf.d/apc.ini conf.d/apc.ini• Add the following – apc.shm_size=128m – apc.num_files_hint=15000• ctrl­x , y, <enter>• sudo /etc/init.d/apache2 restart
  20. 20. Okay, your questions?

×