Docstoc

Moodle-Upgrade-SME-2009a

Document Sample
Moodle-Upgrade-SME-2009a Powered By Docstoc
					                                          Moodle Upgrade
               Steps to do an In-Place upgrade to a newer version of Moodle
     Special Note – if your site is Moodle 1.5 or earlier a database conversion is needed 1st.


Admission: - Many of the steps in this how-to are shamelessly lifted from the how-to by Mark Drone and the
documents shared by Mark Drone, Abe Loveless, and Bill Butts in the SME and Linux help posting and
documents. The steps below are tested and have reproduced successful results several times. With the current
versions of SME 7.4 and Moodle 1.94 as of April 14, 2009

http://docs.moodle.org/en/Upgrading
Moodle is designed to allow easy upgrades from one version to a newer version when it becomes available. By
dropping the new html (php/script) files into the /opt/moodle/html folder and accessing the site it will recognize
the newer version and try to handle all the upgrades automatically. If there is any user help needed the error
messages are usually fairly clear and include links to help sites.

These steps are all done from a command shell (there are gui options for too)

1.) STOP the webservice
       # service httpd-e-smith stop

2.) BACKUP
      See notes

       Backup all /opt/moodle
       This includes
               /opt/moodle/html
               /opt/moodle/moodledata
       Commands
       # mysqldump moodle > moodle-backup.sql
       # tar -cvzf moodle-backup.sql.tgz moodle-backup.sql
       # tar -cvzf moodle-html.tgz /opt/moodle/html
       # tar -cvzf moodle-data.tgz /opt/moodle/moodledata

       After those commands there will be THREE single tar gzip files containing the complete moodle site.

3) Move the old system HTML AND PHP files because there are sometimes conflicts by just adding the new
files to the old directory.
         # mv /opt/moodle/html /opt/moodle/html.backup

4) Create new html directory
       # mkdir -p /opt/moodle/html




Moodle Management                                                                                  Sullivan 2008
GRAB the new install package
5) Get the tarball from http://download.moodle.org/
               # cd ~
               # wget http://download.moodle.org/stable19/moodle-latest-19.tgz  will change with
versions
               OR download and use WinSCP to copy to the SME server.
        Unpack the tarball. It will create a "moodle" directory:
               # tar -xvzf moodle-latest-19.tgz                will unzip several hundred small files


5) Move the contents of the "moodle" directory created by untarring the file into the NEW prepared moodle
   ibay webspace.
              # cd moodle
              # mv * /opt/moodle/html/

6) copy over config file and ANY other custom files from old folder

               # cp /opt/moodle/html.backup/config.php       /opt/moodle/html

7) ReSTART webservice
      service httpd-e-smith start


8) Use a browser to get into moodle site and it should re-direct to setup admin page
       http://www.yoursite/moodle/admin

The admin php scripts will recognize the change, upgrade the database and convert the entire moodle site and
courses to the new version. It is very robust and fairly verbose in telling what is occurring.


FOR MYSQL Commands (this section is for reference only)

MYSQL reference site -- http://www.yolinux.com/TUTORIALS/LinuxTutorialMySQL.html

DELETE A DATABASE
       mysql> drop database bedrock;

LIST DATABASES

       mysql> show databases;

CREATE DATABASE
         #mysql
         mysql> CREATE DATABASE moodle;

         mysql> ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;




Moodle Management                                                                               Sullivan 2008
         mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,
     -> DROP,INDEX,ALTER ON moodle.* TO moodle@localhost IDENTIFIED BY 'moodlepass';

OR
        grant all privileges on moodle.* to moodle@localhost identified by 'moodlepass';




Moodle Management                                                              Sullivan 2008

				
DOCUMENT INFO
Shared By:
Categories:
Tags: April
Stats:
views:3
posted:2/15/2011
language:English
pages:3