Step by Step Installation on a OS X Mountain Lion Server
Note: You are currently viewing documentation for Moodle 3.0. Up-to-date documentation for the latest stable version of Moodle may be available here: Step by Step Installation on a OS X Mountain Lion Server.
This guide shows all steps for installing Moodle on Mountain Lion running OS X Server. This server is a commercial product. OS X Server can be used as an inhouse server as well as an internet server. You will find all documentations about the web server on the Apple support pages.
This guide DOES NOT show you how to setup Moodle on MAMP or XAMPP. If you do not have a web server currently running on your computer, please see Installation Package for OS X that can be downloaded from http://download.moodle.org/macosx/
Internet-accessible or "live" servers should use a more robust and secure implementation than provided by MAMP or XAMPP for OS X.
Please feel free to add comments to this page about any edits you believe should be made.
From Apple's Server Requirements Webpage:
+ Mac Computer + 2GB of memory. + 10GB of available disk space; some features require additional disk space.
+ Hard Disk: 500 MB free + OS X Mountain Lion (10.8+, I'm using 10.8.2 Build 12C3012) + OS X Server (2+, I am using 2.2.1 Build 12T162)
All instructions will be written with following assumptions:
- The administrator is comfortable using Finder, Safari, and standard text editors in OS X.
- The administrator has already performed the initial configuration of OS X Mountain Lion and OS X Server.
- The administrator has not performed anything more than the initial configurations.*
- The administrator is comfortable using the following commands in terminal: cd, ls, vim, sudo.
*Performing these steps for the first time on a production server is NOT recommended. Always test software on a development server.
Before we begin
These instructions have been written based on my experience setting up Moodle in a highly customized server. I will test all instructions in a clean environment once I have more time availability. Anyone who would like to test these instructions and report back any errors, please leave a comment with the section and error. Please do not test these instructions on a production machine.
Copying Moodle to the Proper Directory
- Download the latest version of Moodle from http://moodle.org/downloads (it should unzip automatically into your downloads folder)
- Copy/Move the "moodle" directory to /Library/Server/Web/Data/Sites/ (make sure you put the folder, not the contents)
Creating the Moodle Data Directory
The standard location for all shared data is the "Shared Items" folder at the root of OS X, so we are going to place the Moodle Data directory in "Shared Items"
- In finder, go to /Shared Items (You can use the Go->Go To Folder command)
- Create a new folder called MoodleData
Setting the proper permissions
Open Terminal.app To setup the Moodle folder run the following commands:
cd /Library/Server/Web/Data/Sites/ sudo chown -R _www moodle/
To setup the MoodleData folder fun the following commands:
cd /Shared\ Items/ sudo chmod -R a=rwx MoodleData/
Configuring the Websites Service in OS X Server
- Open Server.app
- In the sidebar, click Websites.
- Enable the checkbox next to "Enable PHP web applications"
- Create a new website by clicking the plus (+) in the bottom left:
- Fill in the domain name.
- Choose an IP Address if you want it to be different than Any.
- If you want the connection to be secured* (using SSL) choose an SSL Certificate that matches your domain name from above.
- Select your sites directory:
- In "Store Site Files In" choose "Other"
- Navigate to /Library/Server/Web/Data/Sites/
- Click "moodle"
- Press the "Choose" button.
- Edit Advanced Settings:
- Scroll down, and choose "Edit Advanced Settings..."
- Check the box next to "Enable Server Side Includes"
- Press the "OK" button
- Press the "Done" button
- Enable the Websites service by changing the toggle switch from OFF to ON
*All production servers should be secured and have a trusted SSL certificate. If you are storing real student data and you do not use SSL, your users will be passing their username and password in clear text.