Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client.

Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client

From MoodleDocs
Revision as of 03:29, 14 March 2006 by Don Hinkelman (talk | contribs)

These instructions are for installing PHP 5.1.2, MySQL 5.0.18 and Moodle with Mac OS 10.4.5 on a standard client Mac (not server version) to be used as a production server. Note that this procedure is more secure than the one-step Moodle4OSX package which is intended for a quick personal install--not for public production use. This procedure uses the standard Apache 1.3 which comes on every Mac with OS X. (Note: these instructions are not finished. I am taking notes in process as I am doing the install while writing this--Don Hinkelman, 2006.3.11). To complete all of these steps, it will take the following amount of time.
- 2 hours >> experienced setup person
- 4 hours >> normal novice
- over 6 hours >> a typical "guy" who is afraid to ask for help--should have gone earlier to the moodle.org Installation forums.


Step 1: Prepare your Server

a. Get a global IP address and a domain name assigned to your server. If you don't want to make a public production server, use the one-step Moodle4OSX download and forget these instructions.  :-)
b. Turn on Apache (go to System Preferences >> Sharing, and then click on "Personal Web Sharing")
c. Download Tinkertool to turn on hidden files. Mac OS X normally hides many files in the system from ordinary users. This includes Apache and other files we install in later steps. In order to verify where a file or folder is, you may want to use Tinkertool to "show hidden files". d. Upgrade your Mac OSX to the most recent version and include the most current Security Releases. After you make this server, you may not want to do any more version updates, as OSX updates often patch Apache and this whole installation will be broken, and you may need to start over.


Step 2: Install PHP

a. Go to Marc Liyanage's site and download the PHP 5.1.2 for Apache 1.3 there. http://www.entropy.ch/software/macosx/php/

b. Click the installer and follow instructions. Do the test.php to see if your PHP and Apache are running. Unfortunately, this Entropy.ch package does not include a PHP accelerator that Moodle4OSX has.


Step 3: Install MySQL

Go to the main MySQL Download site and download MySQL standard version 5.0.18 for the Mac OS X (either PowerPC or x86) version that fits your machine. http://dev.mysql.com/downloads/mysql/5.0.html Click the install package and follow instructions. Click the MySQLStartupItem package and follow instructions. Make a new folder in /Library called "PreferencePanes" (unless already there). Drag the MySQL.prefPane file into that folder. Restart your computer. Click on the System Preferences of OS X. You now see a preference pane active at the bottom of the System Preferences. When you open it, you should see that MySQL is "running". You should make sure the checkbox for automatic MySQL startup is checked.


Step 4: Make a Secure Database for Moodle

Go to Terminal and make a password for the MySQL root user. This is an important security point.

 /usr/local/mysql/bin/mysqladmin -u root password new_password_here

Go to Terminal and make a database for moodle, you might call, "moodle", and a mysql user you might call, "moodleuser". First, type the following in Terminal to enter the MySQL monitor.

 /usr/local/mysql/bin/mysql -u root -p

Inside MySQL, you first make a database with the next line, then make a new user and password for using that database, then "flush" and "quit". These are important for making a secure setup.

 mysql> CREATE DATABASE moodle;
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER ON moodle.* TO moodleuser@localhost IDENTIFIED BY 'anotherpassword';
mysql> flush privileges;
mysql> quit


Step 5: Install Moodle

Go to the Moodle Downloads page and download the version you want. Follow the Moodle installation directions.


Step 6: Make a Cron Job


Step 7: Turn on the Mac Postfix Mail Server


Step 8: Adjust Apache and PHP and Moodle

Get a text editor such as the free TextWrangler, and open the following files to make typical adjustments.


Step 9: Clean Up

Wash coffee cups, toss chewed up pencils, and wipe your desk off. Congratulate yourself on some excellent webmastering. And bask in the glory of having a real Mac server that you know how to easily control and configure.  :-)