huanix

chown -R huanix /

huanix header image 2

Learning to set up a Moodle Server with Ubuntu and CVS

October 13th, 2007 · 1 Comment · K12 Open Minds, Moodle

NOTE: DO *NOT* USE THIS METHOD TO INSTALL A MOODLE SERVER ON UBUNTU. THIS IS AN EXAMPLE OF TRIAL AND ERROR, AND THE METHOD IS NOT USEFUL FOR LONG TERM INSTALLATIONS. INSTALL MOODLE FROM THE UBUNTU REPOSITORY (“sudo apt-get install moodle”) OR FROM THE CVS REPOSITORY, BUT DO NOT MIX THE METHODS! (sorry for yelling ;)

  1. Install stock Ubuntu Server (7.04)
  2. Check the option for a LAMP server (if it shows)
  3. edit /etc/apt/sources.list and comment out the cd (sudo nano +4 /etc/apt/sources.list)
  4. set /etc/network/interfaces to static
    iface eth0 inet static
    address 192.168.1.42
    netmask 255.255.255.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
  5. add openssh-server (sudo apt-get install openssh-server)
  6. stop and start the interface to bring up the new ip (sudo ifdown eth0; sudo ifup eth0)
  7. switch to ssh managment (ssh user@192.168.1.42)
  8. edit /etc/apache2/ports.conf to listen on a good port (this is only necessary because i run a different server on port 80. If this were set up for SSL, you would change ports.conf to listen on 443.
  9. sudo apt-get update; sudo apt-get upgrade; sudo apt-get dist-upgrade (look at using unattended upgrade package)
  10. sudo /etc/init.d/mysql reset-password (set the root password for mysql)
  11. add a database and user to mysql for moodle
    mysql -u root -p
    create user moodle identified by ‘PASSWORD’;
    create database moodle;
    grant all on moodle.* to moodle;
    exit
  12. sudo apt-get install moodle (enter the following information)
    Apache2
    MySQL
    localhost
    root
    PASSWORD
    moodle
    PASSWORD
  13. sudo nano +16 /etc/moodle/config.php (change this to the static ip to allow access from your ssh computer)
  14. sudo nano +12 /etc/moodle/apache.conf (remove the # on line 12 to allow access from outside localhost)
  15. restart apache, sudo apache2 -k restart
  16. go through the web browser setup (this writes the tables!)
  17. click continue through a few pages…
    change the country name
    probably should run clam on startup… must have it installed first!
    set the smtp (if needed)
    max editing time..i like 60 – i hate to lose my work!
    enable stats

  18. Log into the adming for the site and convert all the data in your database to Unicode using our migration script. Click here to run the migration script now!
  19. DELETE /var/www/apache-default
  20. apt-get remove moodle, it leaves the /etc/moodle files and the database entries.
  21. cd /var/www
  22. sudo apt-get install cvs
  23. login to the CVS repository
    cvs -d:pserver:anonymous@eu.cvs.moodle.org:/cvsroot/moodle login
    No password for anonymous, so just hit the Enter button.
  24. sudo cvs -z3 -d:pserver:anonymous@eu.cvs.moodle.org:/cvsroot/moodle co -r MOODLE_19_STABLE moodle
  25. when you go back to the web browser, it will start a new migration script. teh only thing i had to change was the data location from /var/moodledata to /var/lib/moodle
  26. this created a directory called moodle in the www files. do “sudo nano index.php” to create a redirector
  27. meta http-equiv=”refresh” content=”0;url=/moodle”

  28. open up /etc/moodle/apache.conf, comment out the alias, and change the directory match to /var/www/
  29. log back in to the web page and run updates
  30. sudo a2enmod ssl
  31. sudo apt-get install ssl-cert
  32. sudo mkdir /etc/apache2/ssl
  33. sudo /usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
  34. edit cp the default site enabled to your new name and edit for *.443, also add (in the ## area in the middle)
    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/apache.pem
    SSLProtocol all
    SSLCipherSuite HIGH:MEDIUM
  35. sudo a2ensite [sitename]
  36. change /etc/apache2/ports.conf to 443
  • http://docs.moodle.org/en/Upgrading
  • To update, just go into the Moodle root directory and update to the new files: cvs update -dP
  • To update to a new version type in the following and change 18 to whatever newest version upgrade number is cvs -Q update -dP -r MOODLE_18_STABLE

Incoming search terms:

  • remove moodle from ubuntu
  • uninstall moodle ubuntu
  • setting up moodle on ubuntu
  • install moodle ubuntu
  • moodle unicode ubuntu
  • ubuntu moodle ssl
  • how to uninstall moodle from ubuntu
  • remover moodle do ubuntu
  • setting up a moodle server
  • ubuntu server moodle install

Tags:

One Comment so far ↓

Leave a Comment