Upgrade Moodle 2.2 to 2.7 on Mac Server

Upgrade Moodle 2.2 to 2.7 on Mac Server

by James Kennedy -
Number of replies: 6

Hello

I'm trying to figure out a way to upgrade my current Moodle server 2.2 that sits on a MAC server.  When I run an environment check, it states "version 5.1.33 is required and you are running 5.0.92".  This is caused of course because my built-in mysql is running 5.0 and Apple makes no way to upgrade mysql.  I'm assuming I need to download the updated mysql from their website and run it on my MAC at the same time shutting down the one that is preinstalled on the MAC.  This is where it becomes confusing.  I'm no means a database person.  How do install and run the latest mysql on a MAC server, dump or move the Moodle database from one mysql instance to another and get Moodle to run happily ever after....  Is there a step by step procedure that is out there that I can follow?  I did though find an article about "faking" the environment check so it sees that 5.1 is installed but not really installed.  The upgrade worked great but I'm a bit nervous since 2.7 may use something in mysql 5.1 that 5.0 doesn't have.  I thought about using MAMP installation of Moodle and it installed great.  I was actually able to backup a moodle course on my 2.2 Moodle and restore on my MAMP install of 2.7.  Rumor has it that MAMP is not secure and should only be run on test environments.  I truly enjoyed MAMP as it has that friendly one-button upgrade in which I wouldn't have to worry about this goat rodeo ever again.  Anyone out there willing to take the time to help me.  I have this server using Carbon Copy Cloner which allows me to hook a backup of moodle to another server and run the upgrade to see if works.  no worries about loosing data as the production environment is never touched.

Thank you!

Average of ratings: -
In reply to James Kennedy

Re: Upgrade Moodle 2.2 to 2.7 on Mac Server

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Upgrade your OSX server to one of the newer versions that did not have MySQL bundled (Lion or newer I think) and then download MySQL from the MySQL web site. 

In reply to Howard Miller

Re: Upgrade Moodle 2.2 to 2.7 on Mac Server

by James Kennedy -

I'm assuming you want me to do this on the current Moodle server or create a new server?  Thanx!

In reply to James Kennedy

Re: Upgrade Moodle 2.2 to 2.7 on Mac Server

by Ken Task -
Picture of Particularly helpful Moodlers

There is only one constant ... change.

"Apple has been exiting the Enterprise market for years now. The only foothold they have in an enterprise environment is that people want to use the appliances so they need to be able to be integrated into a real word business situation by IT.

 

The writing has been on the wall for awhile. Don't be left out in the cold... start looking at alternatives now. Unless you only want to sit around and watch videos and listen to music... Apple will be awesome for that."

https://discussions.apple.com/message/15663982

Have you considered going with the flow of Apple and using Postgres?

Have you considered another alternative - that of Linux?

IMHO, you'll be facing similar issues in the future.   It's MySQL now ... later will it be PHP, other?

Just my 2 cents ...

'spriit of sharing', Ken

In reply to James Kennedy

Re: Upgrade Moodle 2.2 to 2.7 on Mac Server

by Ed Snowdon (no, not THAT one) -
Two ways to approach this: A - Upgrade & Pray 1) Create an external clone of your current drive using Carbon Copy Cloner or SuperDuper. 2) Boot from the external clone drive. 3) Go to the Apple App Store and download/install Mavericks. 4) Check to see what version of MySQL is now installed on the drive. 5) If MySQL isn't the version you need, now go to the MySQL distribution site and get the correct version & install it. 6) Make sure all file/directory protections are correctly set. 7) See if Moodle runs. B - Upgrade from 1st Principles 1) Backup your current production Moodle install/themes, etc.. and export all data from the Moodle database 2) Create an external clone of your current drive using Carbon Copy Cloner or SuperDuper. 3) Boot from the external clone drive. 3) Go to the Apple App Store and download/install Mavericks. 4) Check to see what version of MySQL is now installed on the drive. 5) If MySQL isn't the version you need, now go to the MySQL distribution site and get the correct version & install it. 6) Copy the backup you made in step B1 into the new environment, and then import all your data into the new MySQL. 7) Make sure all file/directory protections are correctly set. 8) See if Moodle runs
In reply to James Kennedy

Re: Upgrade Moodle 2.2 to 2.7 on Mac Server

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I know this is unhelpful, but that doesn't stop it being good advice... never back yourself into a corner were you are unable (for any reason) to upgrade any part of your system. You should try to get to the position where it's routine. Like Ken says, sooner or later everybody finds themselves in this sort of position. 

Hopefully you have full Moodle backups, so even trashing the box and rebuilding it from scratch shouldn't be too daunting. 

In reply to Howard Miller

Re: Upgrade Moodle 2.2 to 2.7 on Mac Server

by James Kennedy -

Thank you for everyone's response...  I've taken the advise of doing this procedure the correct way.  I am now in the process of moving Moodle over to it's appropriate home (Linux).  Placing it on true Linux box will ease the pain for future upgrades.  Guess I'll be brushing up on my CLI.

Thank you!