<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/21/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Krause</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/21/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Krause"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/Special:Contributions/Krause"/>
	<updated>2026-10-11T20:29:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=85795</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=85795"/>
		<updated>2011-07-08T13:15:14Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Look Inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G4, G5)&lt;br /&gt;
  + RAM: 1 GB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4, 10.5, or 10.6&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&#039;dbpersit&#039; =&amp;amp;gt; 0, );&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;passwordsaltmain = &#039;some_very_long_secret!#A12345678901234567890!&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// There is no php closing tag in this file,&lt;br /&gt;
// it is intentional because it prevents trailing whitespace problems!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20110708 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle21/&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r MOODLE_21_STABLE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 2.1&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_20_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_21_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=85794</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=85794"/>
		<updated>2011-07-08T13:14:26Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Look Inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G4, G5)&lt;br /&gt;
  + RAM: 1 GB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4, 10.5, or 10.6&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&#039;dbpersit&#039; =&amp;amp;gt; 0, );&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;passwordsaltmain = &#039;some_very_long_secret!#A12345678901234567890!&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// There is no php closing tag in this file,&lt;br /&gt;
// it is intentional because it prevents trailing whitespace problems!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20110708 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle21/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r MOODLE_21_STABLE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 2.1&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_20_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_21_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=85793</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=85793"/>
		<updated>2011-07-08T13:14:03Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Look Inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G4, G5)&lt;br /&gt;
  + RAM: 1 GB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4, 10.5, or 10.6&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&#039;dbpersit&#039; =&amp;amp;gt; 0, );&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;passwordsaltmain = &#039;some_very_long_secret!#A12345678901234567890!&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// There is no php closing tag in this file,&lt;br /&gt;
// it is intentional because it prevents trailing whitespace problems!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20110708 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle20/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r MOODLE_21_STABLE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 2.1&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_20_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_21_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=85792</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=85792"/>
		<updated>2011-07-08T13:10:52Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Look Inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G4, G5)&lt;br /&gt;
  + RAM: 1 GB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4, 10.5, or 10.6&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&#039;dbpersit&#039; =&amp;amp;gt; 0, );&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;passwordsaltmain = &#039;some_very_long_secret!#A12345678901234567890!&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// There is no php closing tag in this file,&lt;br /&gt;
// it is intentional because it prevents trailing whitespace problems!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20101201 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle20/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r MOODLE_20_STABLE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_20_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_21_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=84769</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=84769"/>
		<updated>2011-06-09T21:21:31Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Look Inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G4, G5)&lt;br /&gt;
  + RAM: 1 GB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4, 10.5, or 10.6&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&#039;dbpersit&#039; =&amp;amp;gt; 0, );&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;passwordsaltmain = &#039;some_very_long_secret!#A12345678901234567890!&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// There is no php closing tag in this file,&lt;br /&gt;
// it is intentional because it prevents trailing whitespace problems!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20101201 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle20/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r MOODLE_20_STABLE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_20_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=84325</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=84325"/>
		<updated>2011-06-03T16:48:51Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Use the CVS update script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, Intel Core i3/i5/i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.5 Server (SnowLeopard) comes with PHP 5.3.3 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to switch on the PHP module and to control if the file &#039;&#039;/etc/php.ini&#039;&#039; sets the right values for Moodle. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin-106.png]]&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The next thing is to configure the file &#039;&#039;php.ini&#039;&#039;. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file &#039;&#039;php.ini&#039;&#039; and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.x and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
===Use InnoDB with Moodle 2.0===&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 you should setup the support for InnoDB in your MySQL database.&lt;br /&gt;
&lt;br /&gt;
Open the file /etc/my.cnf an delete every # in all lines beginning with innodb. This uncomments the InnoDB settings. Please save the file and restart your MySQL database.&lt;br /&gt;
&lt;br /&gt;
 # Uncomment the following if you are using InnoDB tables&lt;br /&gt;
 innodb_data_home_dir = /var/mysql/&lt;br /&gt;
 innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend&lt;br /&gt;
 innodb_log_group_home_dir = /var/mysql/&lt;br /&gt;
 innodb_log_arch_dir = /var/mysql/ &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 % &lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size = 384M&lt;br /&gt;
 innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size = 100M&lt;br /&gt;
 innodb_log_buffer_size = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit = 1&lt;br /&gt;
 innodb_lock_wait_timeout = 50&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_STABLE&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_20_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If CVS does not work on your server please check that the connection port is open.&amp;lt;br /&amp;gt;&lt;br /&gt;
If you see something like this, make sure that there is no firewall blocking the port (it&#039;s port 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Dropbox_repository&amp;diff=83114</id>
		<title>Dropbox repository</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Dropbox_repository&amp;diff=83114"/>
		<updated>2011-04-29T11:32:40Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
A Dropbox repository can be enabled by an administrator in &#039;&#039;Site administration &amp;gt; Modules &amp;gt; Repositories &amp;gt; Manage repositories&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sign up app keys at dropbox==&lt;br /&gt;
&lt;br /&gt;
# Go to https://www.dropbox.com/developers/apps&lt;br /&gt;
# Create an app, you must change app status to Production&lt;br /&gt;
# Copy the app keys&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Once enabled by the administrator a Dropbox API Key and Secret will need to be added to the Dropbox settings in order for it to work.  This will be &#039;&#039;the&#039;&#039; Dropbox available to all users throughout the site (and each will need the correct Dropbox login credentials to access it from their courses).  To gather the Dropbox API Key and Secret click the &amp;quot;Dropbox Developers&amp;quot; link on the Dropbox repository settings page.  On the next page you&#039;ll be prompted to login with your Dropbox username and password and to create a Dropbox app.  &lt;br /&gt;
&lt;br /&gt;
Once the App has been created at Dropbox.com you&#039;ll have the API Secret and Key available at the bottom of the App page.  Entering those on the Dropbox settings page (and clicking Save) back in Moodle will finish the configuration.  Dropbox is now available to the entire site.  &lt;br /&gt;
&lt;br /&gt;
To access it editing teachers need only &amp;quot;Add...&amp;quot; a new file while editing or creating a resource to see Dropbox as a new option.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=V221JLCywWs Import files from Dropbox into Moodle 2.0 video]&lt;br /&gt;
* MDL-19168&lt;br /&gt;
* MDL-26949 - Can&#039;t change the Dropbox API key and secret to production status&lt;br /&gt;
&lt;br /&gt;
[[Category:Repositories]]&lt;br /&gt;
[[de:Dropbox]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Dropbox_repository&amp;diff=83113</id>
		<title>Dropbox repository</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Dropbox_repository&amp;diff=83113"/>
		<updated>2011-04-29T11:31:00Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
A Dropbox repository can be enabled by an administrator in &#039;&#039;Site administration &amp;gt; Modules &amp;gt; Repositories &amp;gt; Manage repositories&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sign up app keys at dropbox==&lt;br /&gt;
&lt;br /&gt;
# Go to https://www.dropbox.com/developers/apps&lt;br /&gt;
# Create an app, you must change app status to Production&lt;br /&gt;
# Copy the app keys&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Once enabled by the administrator a Dropbox API Key and Secret will need to be added to the Dropbox settings in order for it to work.  This will be &#039;&#039;the&#039;&#039; Dropbox available to all users throughout the site (and each will need the correct Dropbox login credentials to access it from their courses).  To gather the Dropbox API Key and Secret click the &amp;quot;Dropbox Developers&amp;quot; link on the Dropbox repository settings page.  On the next page you&#039;ll be prompted to login with your Dropbox username and password and to create a Dropbox app.  &lt;br /&gt;
&lt;br /&gt;
Once the App has been created at Dropbox.com you&#039;ll have the API Secret and Key available at the bottom of the App page.  Entering those on the Dropbox settings page (and clicking Save) back in Moodle will finish the configuration.  Dropbox is now available to the entire site.  &lt;br /&gt;
&lt;br /&gt;
To access it editing teachers need only &amp;quot;Add...&amp;quot; a new file while editing or creating a resource to see Dropbox as a new option.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=V221JLCywWs Import files from Dropbox into Moodle 2.0 video]&lt;br /&gt;
* MDL-19168&lt;br /&gt;
* MDL-26949 - Can&#039;t get the Dropbox API key and secret for productive status&lt;br /&gt;
&lt;br /&gt;
[[Category:Repositories]]&lt;br /&gt;
[[de:Dropbox]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:Filters_2.0&amp;diff=79766</id>
		<title>Development:Filters 2.0</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:Filters_2.0&amp;diff=79766"/>
		<updated>2010-12-25T11:10:47Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Please note:&#039;&#039;&#039; This page contains information for developers. You may prefer to read the [[Filters 2.0| information about filters for teachers and administrators]]. Once Moodle 2.0 is released, [[Development:Filters]] will be renamed to &#039;Development:Filters 1.9 and before&#039; and this page will be renamed to &#039;Development:Filters&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Filters&#039;&#039;&#039; are a way to automatically transform content before it is output. For example&lt;br /&gt;
* render embedded equations to images (the TeX filter)&lt;br /&gt;
* Links to media files can be automatically converted to an embedded applet for playing the media.&lt;br /&gt;
* Mentions of glossary terms can be automatically converted to links.&lt;br /&gt;
The possibilities are endless. There are a number of standard filters included with Moodle, or you can create your own. Filters are one of the easiest types of plugin to create. This page explains how.&lt;br /&gt;
&lt;br /&gt;
==Two types of filter==&lt;br /&gt;
&lt;br /&gt;
Moodle supports two types of filter:&lt;br /&gt;
* Stand-alone filters. These live in a folder inside the &#039;filter&#039; folder. For example, in &#039;filter/myfilter&#039;. &#039;filter/tex&#039; is an example of a core filter of this type.&lt;br /&gt;
* Filters that are part of an activity module. In this case, the filter code lives inside the &#039;mod/mymod&#039; folder. &#039;mod/glossary&#039; is an example of a core module with a filter.&lt;br /&gt;
The two types of filter work in exactly the same way, and to create one, you put your code in files with the same name, just in different places in the code base.&lt;br /&gt;
&lt;br /&gt;
==Creating a basic filter==&lt;br /&gt;
&lt;br /&gt;
During this tutorial, we will build a simple example filter. We will make one that adds the word &#039;hello&#039; before every occurrence of the word &#039;world&#039;.&lt;br /&gt;
&lt;br /&gt;
1. Since our filter is not part of a module, we should put it inside the &#039;filter&#039; folder. Therefore, we create a directory called &#039;filter/helloworld&#039;.&lt;br /&gt;
&lt;br /&gt;
2. Inside that folder, we create a file called &#039;filter.php&#039;.&lt;br /&gt;
&lt;br /&gt;
3. Inside that PHP file, we define a class called helloworld_filter, that extends the moodle_text_filter class.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
class helloworld_filter extends moodle_text_filter {&lt;br /&gt;
    // ...&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Inside that class, we have to define one method, called &#039;filter&#039;. This takes the HTML to be filtered as an argument. The method should then transform that, and return the processed text. Replace the &#039;// ...&#039; above with&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
class helloworld_filter extends moodle_text_filter {&lt;br /&gt;
    public function filter($text) {&lt;br /&gt;
        return str_replace(&#039;world&#039;, &#039;hello world!&#039;, $text);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is basically all there is to it!&lt;br /&gt;
&lt;br /&gt;
==Giving your filter a name==&lt;br /&gt;
&lt;br /&gt;
To try the new filter, you first have to log in as Administrator and enable it by going to the page Administration ► Plugins ► Filters ► Manage filters.&lt;br /&gt;
&lt;br /&gt;
When you do, you will find that your plugin does not have a name. We missed a step:&lt;br /&gt;
&lt;br /&gt;
5. Inside the &#039;filter/helloworld&#039; folder, create a folder called &#039;lang&#039;, and in there, create a folder called &#039;en&#039;.&lt;br /&gt;
&lt;br /&gt;
6. Inside there, create a file called &#039;filter_helloworld.php&#039;. That is, you have just created the file &#039;filter/helloworld/lang/en/filter_helloworld.php&#039;.&lt;br /&gt;
&lt;br /&gt;
7. In that file, put&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php // $Id$&lt;br /&gt;
// Language string for filter/helloworld.&lt;br /&gt;
&lt;br /&gt;
$string[&#039;filtername&#039;] = &#039;Hello world!&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That may seem a little involved, just to give your filter a name, but it is just [[Development:Places_to_search_for_lang_strings|the standard way Moodle stores language strings for plugins]].&lt;br /&gt;
&lt;br /&gt;
==Trying out your filter==&lt;br /&gt;
&lt;br /&gt;
We had just got to the [[Filters|filters administration screen]]. If you reload that page now, it should now show your filter with its proper name. Turn your filter on now.&lt;br /&gt;
&lt;br /&gt;
Filters are applied to all text that is printed with the [[Development:Output functions|output functions]] format_text(), and, if you have turned on that option, format_string(). So, to see your filter in action, add some content containing the work &#039;world&#039; somewhere, for example, create a test course, and use the work in the course description. When you look at that course in the course listing, you should see that your filter has transformed it.&lt;br /&gt;
&lt;br /&gt;
==Adding a global settings screen==&lt;br /&gt;
&lt;br /&gt;
Some filters can benefit from some settings to let the administrator control how they work. Suppose we want to greet something other than &#039;world&#039;. To add global settings to the filter you need to:&lt;br /&gt;
&lt;br /&gt;
8. Create a file called &#039;filtersettings.php&#039; inside the &#039;filter/helloworld&#039; folder.&lt;br /&gt;
&lt;br /&gt;
9. In the &#039;filtersettings.php&#039; file, put something like:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$settings-&amp;gt;add(new admin_setting_configtext(&#039;filter_helloworld_word&#039;,&lt;br /&gt;
        get_string(&#039;word&#039;, &#039;filter_helloworld&#039;),&lt;br /&gt;
        get_string(&#039;configword&#039;, &#039;filter_helloworld&#039;), &#039;world&#039;, PARAM_NOTAG));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
10. In the language file &#039;filter/helloworld/lang/en/filter_helloworld.php&#039; add the necessary strings:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$string[&#039;word&#039;] = &#039;The thing to greet&#039;;&lt;br /&gt;
$string[&#039;configword&#039;] = &#039;The hello world filter will add the word \&#039;hello\&#039; in front of every occurrence of this word in any content.&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
11. Change the filter to use the new setting:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
class helloworld_filter extends moodle_text_filter {&lt;br /&gt;
    public function filter($text) {&lt;br /&gt;
        global $CFG;&lt;br /&gt;
        return str_replace($CFG-&amp;gt;filter_helloworld_word,&lt;br /&gt;
                &amp;quot;hello $CFG-&amp;gt;filter_helloworld_word!&amp;quot;, $text);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In standard Moodle, the censor, mediaplugin and tex filters all provide good examples of of how filters use global configuration like this.&lt;br /&gt;
&lt;br /&gt;
==A note about performance==&lt;br /&gt;
&lt;br /&gt;
One important thing to remember when creating a filter is that the filter will be called to transform every bit of text output using format_text(), and possibly also format_string(). That means that you have to be careful, or you could cause big performance problems. If you have to get data out of the database, try to cache it so that you only do a fixed number of database queries per page load. The Glossary filter is an example of this. (I am not sure how good an example ;-))&lt;br /&gt;
&lt;br /&gt;
==Local configuration==&lt;br /&gt;
&lt;br /&gt;
In addition, in Moodle 2.0, filters can also have different configuration in each context. For example, the glossary could be changes so that in Forum A, you can choose to only link words from a particular glossary, sat Glossary A, while in Forum B you choose to link words from Glossary B.&lt;br /&gt;
&lt;br /&gt;
To do that sort of thing, you need to add a file called filterlocalsettings.php. In it, you must define a [[Development:lib/formslib.php|Moodle form]] that is a subclass of filter_local_settings_form. In addition to the standard formslib methods, you also need to define a save_changes method. There is not a good example of this in the standard Moodle install yet. To continue our example:&lt;br /&gt;
&lt;br /&gt;
12. Create a file called &#039;filterlocalsettings.php&#039; inside the &#039;filter/helloworld&#039; folder.&lt;br /&gt;
&lt;br /&gt;
13. In the &#039;filterlocalsettings.php&#039; file, put:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
class helloworld_filter_local_settings_form extends filter_local_settings_form {&lt;br /&gt;
    protected function definition_inner($mform) {&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;text&#039;, &#039;word&#039;, get_string(&#039;word&#039;, &#039;filter_helloworld&#039;), array(&#039;size&#039; =&amp;gt; 20));&lt;br /&gt;
        $mform-&amp;gt;setType(&#039;word&#039;, PARAM_NOTAGS);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
14. Extend the filter to use the new setting, if it is present. The filter must be able to work if the setting is not set, for example by falling back to the global or default setting in this case&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
class helloworld_filter extends moodle_text_filter {&lt;br /&gt;
    public function filter($text) {&lt;br /&gt;
        global $CFG;&lt;br /&gt;
        if (isset($this-&amp;gt;localconfig[&#039;word&#039;])) {&lt;br /&gt;
            $word = $this-&amp;gt;localconfig[&#039;word&#039;];&lt;br /&gt;
        } else {&lt;br /&gt;
            $word = $CFG-&amp;gt;filter_helloworld_word;&lt;br /&gt;
        }&lt;br /&gt;
        return str_replace($word, &amp;quot;hello $word!&amp;quot;, $text);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* The example filter built here is in contrib CVS at http://cvs.moodle.org/contrib/plugins/filter/helloworld/&lt;br /&gt;
* [[Development:Filters]] how to write filters for Moodle 1.9 and before. Note that a Moodle 1.9 filter will still work in Moodle 2.0, but you should still update your code when you get the chance.&lt;br /&gt;
* [[Filters schema]] - a page containing some ideas and thoughts about modifications to the filters system&lt;br /&gt;
* [[Filters 2.0]] - user documentation about filters.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|Filters]]&lt;br /&gt;
[[Category:Filter]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:Filters_2.0&amp;diff=79765</id>
		<title>Development:Filters 2.0</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:Filters_2.0&amp;diff=79765"/>
		<updated>2010-12-25T11:09:17Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Please note:&#039;&#039;&#039; This page contains information for developers. You may prefer to read the [[Filters 2.0| information about filters for teachers and administrators]]. Once Moodle 2.0 is released, [[Development:Filters]] will be renamed to &#039;Development:Filters 1.9 and before&#039; and this page will be renamed to &#039;Development:Filters&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Filters&#039;&#039;&#039; are a way to automatically transform content before it is output. For example&lt;br /&gt;
* render embedded equations to images (the TeX filter)&lt;br /&gt;
* Links to media files can be automatically converted to an embedded applet for playing the media.&lt;br /&gt;
* Mentions of glossary terms can be automatically converted to links.&lt;br /&gt;
The possibilities are endless. There are a number of standard filters included with Moodle, or you can create your own. Filters are one of the easiest types of plugin to create. This page explains how.&lt;br /&gt;
&lt;br /&gt;
==Two types of filter==&lt;br /&gt;
&lt;br /&gt;
Moodle supports two types of filter:&lt;br /&gt;
* Stand-alone filters. These live in a folder inside the &#039;filter&#039; folder. For example, in &#039;filter/myfilter&#039;. &#039;filter/tex&#039; is an example of a core filter of this type.&lt;br /&gt;
* Filters that are part of an activity module. In this case, the filter code lives inside the &#039;mod/mymod&#039; folder. &#039;mod/glossary&#039; is an example of a core module with a filter.&lt;br /&gt;
The two types of filter work in exactly the same way, and to create one, you put your code in files with the same name, just in different places in the code base.&lt;br /&gt;
&lt;br /&gt;
==Creating a basic filter==&lt;br /&gt;
&lt;br /&gt;
During this tutorial, we will build a simple example filter. We will make one that adds the word &#039;hello&#039; before every occurrence of the word &#039;world&#039;.&lt;br /&gt;
&lt;br /&gt;
1. Since our filter is not part of a module, we should put it inside the &#039;filter&#039; folder. Therefore, we create a directory called &#039;filter/helloworld&#039;.&lt;br /&gt;
&lt;br /&gt;
2. Inside that folder, we create a file called &#039;filter.php&#039;.&lt;br /&gt;
&lt;br /&gt;
3. Inside that PHP file, we define a class called helloworld_filter, that extends the moodle_text_filter class.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
class helloworld_filter extends moodle_text_filter {&lt;br /&gt;
    // ...&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Inside that class, we have to define one method, called &#039;filter&#039;. This takes the HTML to be filtered as an argument. The method should then transform that, and return the processed text. Replace the &#039;// ...&#039; above with&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
class helloworld_filter extends moodle_text_filter {&lt;br /&gt;
    public function filter($text) {&lt;br /&gt;
        return str_replace(&#039;world&#039;, &#039;hello world!&#039;, $text);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is basically all there is to it!&lt;br /&gt;
&lt;br /&gt;
==Giving your filter a name==&lt;br /&gt;
&lt;br /&gt;
To try the new filter, you first have to log in as Administrator and enable it by going to the page Administration ► Plugins ► Filters ► Manage filters.&lt;br /&gt;
&lt;br /&gt;
When you do, you will find that your plugin does not have a name. We missed a step:&lt;br /&gt;
&lt;br /&gt;
5. Inside the &#039;filter/helloworld&#039; folder, create a folder called &#039;lang&#039;, and in there, create a folder called &#039;en&#039;.&lt;br /&gt;
&lt;br /&gt;
6. Inside there, create a file called &#039;filter_helloworld.php&#039;. That is, you have just created the file &#039;filter/helloworld/lang/en/filter_helloworld.php&#039;.&lt;br /&gt;
&lt;br /&gt;
7. In that file, put&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php // $Id$&lt;br /&gt;
// Language string for filter/helloworld.&lt;br /&gt;
&lt;br /&gt;
$string[&#039;filtername&#039;] = &#039;Hello world!&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That may seem a little involved, just to give your filter a name, but it is just [[Development:Places_to_search_for_lang_strings|the standard way Moodle stores language strings for plugins]].&lt;br /&gt;
&lt;br /&gt;
==Trying out your filter==&lt;br /&gt;
&lt;br /&gt;
We had just got to the [[Filters|filters administration screen]]. If you reload that page now, it should now show your filter with its proper name. Turn your filter on now.&lt;br /&gt;
&lt;br /&gt;
Filters are applied to all text that is printed with the [[Development:Output functions|output functions]] format_text(), and, if you have turned on that option, format_string(). So, to see your filter in action, add some content containing the work &#039;world&#039; somewhere, for example, create a test course, and use the work in the course description. When you look at that course in the course listing, you should see that your filter has transformed it.&lt;br /&gt;
&lt;br /&gt;
==Adding a global settings screen==&lt;br /&gt;
&lt;br /&gt;
Some filters can benefit from some settings to let the administrator control how they work. Suppose we want to greet something other than &#039;world&#039;. To add global settings to the filter you need to:&lt;br /&gt;
&lt;br /&gt;
8. Create a file called &#039;filtersettings.php&#039; inside the &#039;filter/helloworld&#039; folder.&lt;br /&gt;
&lt;br /&gt;
9. In the &#039;filtersettings.php&#039; file, put something like:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$settings-&amp;gt;add(new admin_setting_configtext(&#039;filter_helloworld_word&#039;,&lt;br /&gt;
        get_string(&#039;word&#039;, &#039;filter_helloworld&#039;),&lt;br /&gt;
        get_string(&#039;configword&#039;, &#039;filter_helloworld&#039;), &#039;world&#039;, PARAM_NOTAG));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
10. In the language file &#039;filter/helloworld/lang/en_utf8/filter_helloworld.php&#039; add the necessary strings:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$string[&#039;word&#039;] = &#039;The thing to greet&#039;;&lt;br /&gt;
$string[&#039;configword&#039;] = &#039;The hello world filter will add the word \&#039;hello\&#039; in front of every occurrence of this word in any content.&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
11. Change the filter to use the new setting:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
class helloworld_filter extends moodle_text_filter {&lt;br /&gt;
    public function filter($text) {&lt;br /&gt;
        global $CFG;&lt;br /&gt;
        return str_replace($CFG-&amp;gt;filter_helloworld_word,&lt;br /&gt;
                &amp;quot;hello $CFG-&amp;gt;filter_helloworld_word!&amp;quot;, $text);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In standard Moodle, the censor, mediaplugin and tex filters all provide good examples of of how filters use global configuration like this.&lt;br /&gt;
&lt;br /&gt;
==A note about performance==&lt;br /&gt;
&lt;br /&gt;
One important thing to remember when creating a filter is that the filter will be called to transform every bit of text output using format_text(), and possibly also format_string(). That means that you have to be careful, or you could cause big performance problems. If you have to get data out of the database, try to cache it so that you only do a fixed number of database queries per page load. The Glossary filter is an example of this. (I am not sure how good an example ;-))&lt;br /&gt;
&lt;br /&gt;
==Local configuration==&lt;br /&gt;
&lt;br /&gt;
In addition, in Moodle 2.0, filters can also have different configuration in each context. For example, the glossary could be changes so that in Forum A, you can choose to only link words from a particular glossary, sat Glossary A, while in Forum B you choose to link words from Glossary B.&lt;br /&gt;
&lt;br /&gt;
To do that sort of thing, you need to add a file called filterlocalsettings.php. In it, you must define a [[Development:lib/formslib.php|Moodle form]] that is a subclass of filter_local_settings_form. In addition to the standard formslib methods, you also need to define a save_changes method. There is not a good example of this in the standard Moodle install yet. To continue our example:&lt;br /&gt;
&lt;br /&gt;
12. Create a file called &#039;filterlocalsettings.php&#039; inside the &#039;filter/helloworld&#039; folder.&lt;br /&gt;
&lt;br /&gt;
13. In the &#039;filterlocalsettings.php&#039; file, put:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
class helloworld_filter_local_settings_form extends filter_local_settings_form {&lt;br /&gt;
    protected function definition_inner($mform) {&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;text&#039;, &#039;word&#039;, get_string(&#039;word&#039;, &#039;filter_helloworld&#039;), array(&#039;size&#039; =&amp;gt; 20));&lt;br /&gt;
        $mform-&amp;gt;setType(&#039;word&#039;, PARAM_NOTAGS);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
14. Extend the filter to use the new setting, if it is present. The filter must be able to work if the setting is not set, for example by falling back to the global or default setting in this case&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
class helloworld_filter extends moodle_text_filter {&lt;br /&gt;
    public function filter($text) {&lt;br /&gt;
        global $CFG;&lt;br /&gt;
        if (isset($this-&amp;gt;localconfig[&#039;word&#039;])) {&lt;br /&gt;
            $word = $this-&amp;gt;localconfig[&#039;word&#039;];&lt;br /&gt;
        } else {&lt;br /&gt;
            $word = $CFG-&amp;gt;filter_helloworld_word;&lt;br /&gt;
        }&lt;br /&gt;
        return str_replace($word, &amp;quot;hello $word!&amp;quot;, $text);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* The example filter built here is in contrib CVS at http://cvs.moodle.org/contrib/plugins/filter/helloworld/&lt;br /&gt;
* [[Development:Filters]] how to write filters for Moodle 1.9 and before. Note that a Moodle 1.9 filter will still work in Moodle 2.0, but you should still update your code when you get the chance.&lt;br /&gt;
* [[Filters schema]] - a page containing some ideas and thoughts about modifications to the filters system&lt;br /&gt;
* [[Filters 2.0]] - user documentation about filters.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|Filters]]&lt;br /&gt;
[[Category:Filter]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=79434</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=79434"/>
		<updated>2010-12-18T15:44:51Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Use the CVS update script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, Intel Core i3/i5/i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.5 Server (SnowLeopard) comes with PHP 5.3.3 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to switch on the PHP module and to control if the file &#039;&#039;/etc/php.ini&#039;&#039; sets the right values for Moodle. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin-106.png]]&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The next thing is to configure the file &#039;&#039;php.ini&#039;&#039;. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file &#039;&#039;php.ini&#039;&#039; and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.x and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
===Use InnoDB with Moodle 2.0===&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 you should setup the support for InnoDB in your MySQL database.&lt;br /&gt;
&lt;br /&gt;
Open the file /etc/my.cnf an delete every # in all lines beginning with innodb. This uncomments the InnoDB settings. Please save the file and restart your MySQL database.&lt;br /&gt;
&lt;br /&gt;
 # Uncomment the following if you are using InnoDB tables&lt;br /&gt;
 innodb_data_home_dir = /var/mysql/&lt;br /&gt;
 innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend&lt;br /&gt;
 innodb_log_group_home_dir = /var/mysql/&lt;br /&gt;
 innodb_log_arch_dir = /var/mysql/ &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 % &lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size = 384M&lt;br /&gt;
 innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size = 100M&lt;br /&gt;
 innodb_log_buffer_size = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit = 1&lt;br /&gt;
 innodb_lock_wait_timeout = 50&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If CVS does not work on your server please check that the connection port is open.&amp;lt;br /&amp;gt;&lt;br /&gt;
If you see something like this, make sure that there is no firewall blocking the port (it&#039;s port 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_4.png&amp;diff=79433</id>
		<title>File:Moodle4Mac 4.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_4.png&amp;diff=79433"/>
		<updated>2010-12-18T15:40:52Z</updated>

		<summary type="html">&lt;p&gt;Krause: uploaded a new version of &amp;quot;Image:Moodle4Mac 4.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_1.png&amp;diff=79432</id>
		<title>File:Moodle4Mac 1.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_1.png&amp;diff=79432"/>
		<updated>2010-12-18T15:38:50Z</updated>

		<summary type="html">&lt;p&gt;Krause: uploaded a new version of &amp;quot;Image:Moodle4Mac 1.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_2.png&amp;diff=79431</id>
		<title>File:Moodle4Mac 2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_2.png&amp;diff=79431"/>
		<updated>2010-12-18T15:37:58Z</updated>

		<summary type="html">&lt;p&gt;Krause: uploaded a new version of &amp;quot;Image:Moodle4Mac 2.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_1.png&amp;diff=79430</id>
		<title>File:Moodle4Mac 1.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_1.png&amp;diff=79430"/>
		<updated>2010-12-18T15:36:22Z</updated>

		<summary type="html">&lt;p&gt;Krause: uploaded a new version of &amp;quot;Image:Moodle4Mac 1.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_1.png&amp;diff=79429</id>
		<title>File:Moodle4Mac 1.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_1.png&amp;diff=79429"/>
		<updated>2010-12-18T15:35:15Z</updated>

		<summary type="html">&lt;p&gt;Krause: uploaded a new version of &amp;quot;Image:Moodle4Mac 1.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79428</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79428"/>
		<updated>2010-12-18T15:31:01Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Download and install Moodle4Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G4, G5)&lt;br /&gt;
  + RAM: 1 GB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4, 10.5, or 10.6&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&#039;dbpersit&#039; =&amp;amp;gt; 0, );&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;passwordsaltmain = &#039;some_very_long_secret!#A12345678901234567890!&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// There is no php closing tag in this file,&lt;br /&gt;
// it is intentional because it prevents trailing whitespace problems!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20101201 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle20/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r HEAD&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_3.jpg&amp;diff=79427</id>
		<title>File:Moodle4Mac 3.jpg</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_3.jpg&amp;diff=79427"/>
		<updated>2010-12-18T15:30:13Z</updated>

		<summary type="html">&lt;p&gt;Krause: uploaded a new version of &amp;quot;Image:Moodle4Mac 3.jpg&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79426</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79426"/>
		<updated>2010-12-18T15:28:31Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Download and install Moodle4Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G4, G5)&lt;br /&gt;
  + RAM: 1 GB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4, 10.5, or 10.6&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&#039;dbpersit&#039; =&amp;amp;gt; 0, );&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;passwordsaltmain = &#039;some_very_long_secret!#A12345678901234567890!&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// There is no php closing tag in this file,&lt;br /&gt;
// it is intentional because it prevents trailing whitespace problems!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20101201 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle20/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r HEAD&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_3.png&amp;diff=79425</id>
		<title>File:Moodle4Mac 3.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_3.png&amp;diff=79425"/>
		<updated>2010-12-18T15:27:52Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79424</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79424"/>
		<updated>2010-12-18T15:08:57Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G4, G5)&lt;br /&gt;
  + RAM: 1 GB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4, 10.5, or 10.6&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&#039;dbpersit&#039; =&amp;amp;gt; 0, );&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;passwordsaltmain = &#039;some_very_long_secret!#A12345678901234567890!&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// There is no php closing tag in this file,&lt;br /&gt;
// it is intentional because it prevents trailing whitespace problems!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20101201 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle20/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r HEAD&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79423</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79423"/>
		<updated>2010-12-18T15:08:33Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G3, G4, G5)&lt;br /&gt;
  + RAM: 1 GB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4, 10.5, or 10.6&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&#039;dbpersit&#039; =&amp;amp;gt; 0, );&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;passwordsaltmain = &#039;some_very_long_secret!#A12345678901234567890!&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// There is no php closing tag in this file,&lt;br /&gt;
// it is intentional because it prevents trailing whitespace problems!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20101201 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle20/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r HEAD&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79422</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79422"/>
		<updated>2010-12-18T15:07:10Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Edit the file config.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G3, G4, G5)&lt;br /&gt;
  + RAM: 512 MB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4 or 10.5 - for 10.3 you must use a rather old MAMP&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&#039;dbpersit&#039; =&amp;amp;gt; 0, );&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;passwordsaltmain = &#039;some_very_long_secret!#A12345678901234567890!&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// There is no php closing tag in this file,&lt;br /&gt;
// it is intentional because it prevents trailing whitespace problems!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20101201 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle20/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r HEAD&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79420</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79420"/>
		<updated>2010-12-18T15:05:57Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Edit the file config.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G3, G4, G5)&lt;br /&gt;
  + RAM: 512 MB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4 or 10.5 - for 10.3 you must use a rather old MAMP&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle20&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;passwordsaltmain = &#039;some_very_long_secret!#A12345678901234567890!&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// There is no php closing tag in this file,&lt;br /&gt;
// it is intentional because it prevents trailing whitespace problems!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20101201 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle20/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r HEAD&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_Network2.png&amp;diff=79417</id>
		<title>File:Moodle4Mac Network2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_Network2.png&amp;diff=79417"/>
		<updated>2010-12-18T15:02:10Z</updated>

		<summary type="html">&lt;p&gt;Krause: uploaded a new version of &amp;quot;Image:Moodle4Mac Network2.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_Network1.png&amp;diff=79416</id>
		<title>File:Moodle4Mac Network1.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_Network1.png&amp;diff=79416"/>
		<updated>2010-12-18T15:01:47Z</updated>

		<summary type="html">&lt;p&gt;Krause: uploaded a new version of &amp;quot;Image:Moodle4Mac Network1.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79415</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79415"/>
		<updated>2010-12-18T14:56:54Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Look Inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G3, G4, G5)&lt;br /&gt;
  + RAM: 512 MB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4 or 10.5 - for 10.3 you must use a rather old MAMP&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;unicodedb = true;  // Database is utf8&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
?&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20101201 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle20/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r HEAD&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_Update2.png&amp;diff=79414</id>
		<title>File:Moodle4Mac Update2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_Update2.png&amp;diff=79414"/>
		<updated>2010-12-18T14:55:48Z</updated>

		<summary type="html">&lt;p&gt;Krause: uploaded a new version of &amp;quot;Image:Moodle4Mac Update2.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_Update2.png&amp;diff=79413</id>
		<title>File:Moodle4Mac Update2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Moodle4Mac_Update2.png&amp;diff=79413"/>
		<updated>2010-12-18T14:53:41Z</updated>

		<summary type="html">&lt;p&gt;Krause: uploaded a new version of &amp;quot;Image:Moodle4Mac Update2.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79412</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79412"/>
		<updated>2010-12-18T14:36:52Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* More about Moodle and CVS ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G3, G4, G5)&lt;br /&gt;
  + RAM: 512 MB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4 or 10.5 - for 10.3 you must use a rather old MAMP&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;unicodedb = true;  // Database is utf8&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
?&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20080514 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle19/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79411</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=79411"/>
		<updated>2010-12-18T14:33:15Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Look Inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads] which uses &#039;&#039;&#039;MAMP&#039;&#039;&#039;. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your &amp;quot;main&amp;quot; Moodle site. In short, complete install packages are designed for first time install on a &amp;quot;clean&amp;quot; machine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see the [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] for Moodle.  However, remember that the complete package Moodle4Mac is ready to use and no additional programs must be installed and configured together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple Mac Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve&lt;br /&gt;
  + Processor:  Intel Core 2 Duo or PPC (G3, G4, G5)&lt;br /&gt;
  + RAM: 512 MB or better&lt;br /&gt;
  + Hard Disk: 500 MB free&lt;br /&gt;
  + System Software: Mac OS X 10.4 or 10.5 - for 10.3 you must use a rather old MAMP&lt;br /&gt;
&lt;br /&gt;
==Install complete package Moodle4Mac==&lt;br /&gt;
===Download and install Moodle4Mac===&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Doubleclick the file Moodle4Mac.dmg to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Move the folder &#039;&#039;&#039;MAMP&#039;&#039;&#039; into the folder &#039;&#039;&#039;Applications&#039;&#039;&#039;. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Doubleclick the icon MAMP to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type &amp;lt;nowiki&amp;gt; http://127.0.0.1:8888 or http://localhost:8888 &amp;lt;/nowiki&amp;gt; in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; Please login with the username &#039;&#039;&#039;admin&#039;&#039;&#039; and the password &#039;&#039;&#039;12345&#039;&#039;&#039; and you will be the main administrator of your new local Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using Moodle4Mac as a local server in your network==&lt;br /&gt;
&lt;br /&gt;
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.&lt;br /&gt;
&lt;br /&gt;
===Edit the file config.php===&lt;br /&gt;
&lt;br /&gt;
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x&lt;br /&gt;
&lt;br /&gt;
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.20&#039;&#039;. In the following box you will see this address in the line $CFG-&amp;amp;gt;wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
&lt;br /&gt;
unset($CFG);&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbuser    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpass    = &#039;moodle&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbpersist =  false;&lt;br /&gt;
$CFG-&amp;amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
&lt;br /&gt;
// Use the ip address of your computer instead of localhost&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.20:8888/moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dirroot   = &#039;/Applications/MAMP/htdocs/moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle18&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;unicodedb = true;  // Database is utf8&lt;br /&gt;
&lt;br /&gt;
require_once(&amp;quot;$CFG-&amp;amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
?&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Open the firewall===&lt;br /&gt;
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.&lt;br /&gt;
&lt;br /&gt;
To open the firewall please go to &#039;&#039;&#039;System Preferences &amp;gt; Sharing &amp;gt; Firewall&#039;&#039;&#039;. Choose &#039;&#039;&#039;New...&#039;&#039;&#039;, fill in TCP port 8888, and set the rule name &#039;&#039;&#039;Moodle4Mac&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png]]&lt;br /&gt;
&lt;br /&gt;
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png]]&lt;br /&gt;
&lt;br /&gt;
===Connect Moodle from your network ...===&lt;br /&gt;
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.   Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x.  All users from any computer in your network can use your Moodle via this address. &lt;br /&gt;
&lt;br /&gt;
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don&#039;t do this!!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network1.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Network2.png]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
===MAMP is designed for local computers===&lt;br /&gt;
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It&#039;s prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.&lt;br /&gt;
&lt;br /&gt;
===How to secure MAMP?===&lt;br /&gt;
I found some ideas in the following document:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. It&#039;s really old and some of the instructions are not correct for the current version. &lt;br /&gt;
&lt;br /&gt;
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the [http://www.living-e.com/MAMP-PRO/ MAMP internet server]. It&#039;s commertial and not free!&lt;br /&gt;
&lt;br /&gt;
===Step by step to secure Moodle4Mac===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
==How to set up SSL/https in MAMP for a development/test environment==&lt;br /&gt;
The text is copied from [http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x webopius web site] (excepted the last steps). &lt;br /&gt;
&lt;br /&gt;
#stop MAMP&lt;br /&gt;
#backup your /Applications/MAMP/conf folder&lt;br /&gt;
#open a terminal&lt;br /&gt;
#enter: &#039;&#039;openssl genrsa -des3 -out server.key 1024&#039;&#039;. Enter a password twice.&lt;br /&gt;
#enter: &#039;&#039;openssl req -new -key server.key -out server.csr&#039;&#039;. Enter the previous password. You need to answer some questions. &#039;&#039;Common name&#039;&#039; expects your local name (for me it was jerome.moodle.local)&lt;br /&gt;
#enter: &#039;&#039;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;cp server.key server.tmp&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;openssl rsa -in server.tmp -out server.key&#039;&#039;. Enter the previous password.&lt;br /&gt;
#enter: &#039;&#039;mkdir /Applications/MAMP/conf/ssl&#039;&#039;&lt;br /&gt;
#enter: cp server.crt /Applications/MAMP/conf/ssl&lt;br /&gt;
#enter: cp server.key /Applications/MAMP/conf/ssl&lt;br /&gt;
# Edit Applications/MAMP/conf/apache/ssl.conf:&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
##SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt&lt;br /&gt;
##SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key&lt;br /&gt;
# Edit /Applications/MAMP/conf/apache/httpd.conf:&lt;br /&gt;
##Listen 80&lt;br /&gt;
##comment &amp;lt;IfDefine SSL&amp;gt; tag to closing tag (but not the content)&lt;br /&gt;
# Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf&lt;br /&gt;
#in a terminal enter: &#039;&#039;cd /Applications/MAMP/bin/apache2/bin&#039;&#039;&lt;br /&gt;
#enter: &#039;&#039;sudo ./apachectl startssl&#039;&#039;&lt;br /&gt;
#start MAMP&lt;br /&gt;
&lt;br /&gt;
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.&lt;br /&gt;
&lt;br /&gt;
==How To Update Your Moodle4Mac==&lt;br /&gt;
&lt;br /&gt;
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. &lt;br /&gt;
 &lt;br /&gt;
===Update the local Moodle via CVS===&lt;br /&gt;
&lt;br /&gt;
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.&lt;br /&gt;
&lt;br /&gt;
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
Please look for the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039;. If you doubleclick this file you will see that the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is &amp;quot;empty&amp;quot;. The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png]]&lt;br /&gt;
&lt;br /&gt;
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.&lt;br /&gt;
&lt;br /&gt;
If the update takes too long you may break with &amp;lt;strg&amp;gt;-C. It doesn&#039;t matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.&lt;br /&gt;
&lt;br /&gt;
===Look Inside ... ===&lt;br /&gt;
&lt;br /&gt;
If you want to see what is inside the document &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update3.png]]&lt;br /&gt;
&lt;br /&gt;
I chose the system utility &#039;&#039;&#039;Terminal&#039;&#039;&#039; to open the file &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; and to run the script it contains automatically. So everything can be done with a doubleclick. It&#039;s easy and everybody can do it!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This CVS updater for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20080514 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS update for your local Moodle server     &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Applications/MAMP/htdocs/moodle19/&lt;br /&gt;
&lt;br /&gt;
### delete all files named .DS_Store&lt;br /&gt;
find . -name &amp;quot;.DS_Store&amp;quot; -type f -print0 | xargs -0 rm -f&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;strg&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8&lt;br /&gt;
* Moodle 1.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_16_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_17_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===More about Moodle and CVS ... ===&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [[CVS for Administrators]] if you want to learn more. Remember that the CVS server for Moodle changed on 25th April 2007 so you have to update your scripts if you already installed an older version. Moodle had problems with the old CVS server so they had to change it. &lt;br /&gt;
&lt;br /&gt;
If you are using an older package Moodle4Mac you must not reload the whole package and you must not reinstall all your local courses again. You only have to download the archive [http://download.moodle.org/macosx/ChangeCVSServer.zip ChangeCVSServer.zip]. It contains the script ChangeCSVSServer.sh ... please run it once and it changes all the CVS data automatically. You also will find new scripts UpdateMoodle.sh for Moodle 1.6, 1.7, 1.8, and 1.9 dev. You must use the correct version of the new script UpdateMoodle.sh for all your future updates. Please delete the old script from your MAMP folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools on your Mac===&lt;br /&gt;
&lt;br /&gt;
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.&lt;br /&gt;
&lt;br /&gt;
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update4.png]]&lt;br /&gt;
&lt;br /&gt;
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update5.png]]&lt;br /&gt;
&lt;br /&gt;
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by Step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step Installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Private_network Private network addresses in Wikipedia]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
* [[Configuring aspell on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Vollständiges Installationspaket für Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=77684</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=77684"/>
		<updated>2010-11-11T15:42:19Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Mac OS X 10.6 Server - No PHP installation needed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, Intel Core i3/i5/i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.5 Server (SnowLeopard) comes with PHP 5.3.3 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to switch on the PHP module and to control if the file &#039;&#039;/etc/php.ini&#039;&#039; sets the right values for Moodle. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin-106.png]]&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The next thing is to configure the file &#039;&#039;php.ini&#039;&#039;. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file &#039;&#039;php.ini&#039;&#039; and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.x and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
===Use InnoDB with Moodle 2.0===&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 you should setup the support for InnoDB in your MySQL database.&lt;br /&gt;
&lt;br /&gt;
Open the file /etc/my.cnf an delete every # in all lines beginning with innodb. This uncomments the InnoDB settings. Please save the file and restart your MySQL database.&lt;br /&gt;
&lt;br /&gt;
 # Uncomment the following if you are using InnoDB tables&lt;br /&gt;
 innodb_data_home_dir = /var/mysql/&lt;br /&gt;
 innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend&lt;br /&gt;
 innodb_log_group_home_dir = /var/mysql/&lt;br /&gt;
 innodb_log_arch_dir = /var/mysql/ &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 % &lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size = 384M&lt;br /&gt;
 innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size = 100M&lt;br /&gt;
 innodb_log_buffer_size = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit = 1&lt;br /&gt;
 innodb_lock_wait_timeout = 50&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If CVS does not work on your server please check that the connection port is open.&amp;lt;br /&amp;gt;&lt;br /&gt;
If you see something like this, make sure that there is no firewall blocking the port (it&#039;s port 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76966</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76966"/>
		<updated>2010-10-21T14:40:00Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, Intel Core i3/i5/i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to switch on the PHP module and to control if the file &#039;&#039;/etc/php.ini&#039;&#039; sets the right values for Moodle. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin-106.png]]&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The next thing is to configure the file &#039;&#039;php.ini&#039;&#039;. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file &#039;&#039;php.ini&#039;&#039; and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.x and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
===Use InnoDB with Moodle 2.0===&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 you should setup the support for InnoDB in your MySQL database.&lt;br /&gt;
&lt;br /&gt;
Open the file /etc/my.cnf an delete every # in all lines beginning with innodb. This uncomments the InnoDB settings. Please save the file and restart your MySQL database.&lt;br /&gt;
&lt;br /&gt;
 # Uncomment the following if you are using InnoDB tables&lt;br /&gt;
 innodb_data_home_dir = /var/mysql/&lt;br /&gt;
 innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend&lt;br /&gt;
 innodb_log_group_home_dir = /var/mysql/&lt;br /&gt;
 innodb_log_arch_dir = /var/mysql/ &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 % &lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size = 384M&lt;br /&gt;
 innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size = 100M&lt;br /&gt;
 innodb_log_buffer_size = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit = 1&lt;br /&gt;
 innodb_lock_wait_timeout = 50&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If CVS does not work on your server please check that the connection port is open.&amp;lt;br /&amp;gt;&lt;br /&gt;
If you see something like this, make sure that there is no firewall blocking the port (it&#039;s port 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76965</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76965"/>
		<updated>2010-10-21T14:39:32Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, Intel Core i3/i5/i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to switch on the PHP module and to control if the file &#039;&#039;/etc/php.ini&#039;&#039; sets the right values for Moodle. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin-106.png]]&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The next thing is to configure the file &#039;&#039;php.ini&#039;&#039;. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file &#039;&#039;php.ini&#039;&#039; and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.x and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
===Use InnoDB with Moodle 2.0===&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 you should setup the support for InnoDB in your MySQL database.&lt;br /&gt;
&lt;br /&gt;
Open the file /etc/my.cnf an delete every # in all lines beginning with innodb. This uncomments the InnoDB settings. Please save the file and restart your MySQL database.&lt;br /&gt;
&lt;br /&gt;
 # Uncomment the following if you are using InnoDB tables&lt;br /&gt;
 innodb_data_home_dir = /var/mysql/&lt;br /&gt;
 innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend&lt;br /&gt;
 innodb_log_group_home_dir = /var/mysql/&lt;br /&gt;
 innodb_log_arch_dir = /var/mysql/ &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 % &lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size = 384M&lt;br /&gt;
 innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size = 100M&lt;br /&gt;
 innodb_log_buffer_size = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit = 1&lt;br /&gt;
 innodb_lock_wait_timeout = 50&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If CVS does not work on your server please check that the connection port is open.&lt;br /&gt;
If you see something like this, make sure that there is no firewall blocking the port (it&#039;s port 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76964</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76964"/>
		<updated>2010-10-21T14:38:10Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Install Xcode Tools and CVS on your Mac Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, Intel Core i3/i5/i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to switch on the PHP module and to control if the file &#039;&#039;/etc/php.ini&#039;&#039; sets the right values for Moodle. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin-106.png]]&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The next thing is to configure the file &#039;&#039;php.ini&#039;&#039;. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file &#039;&#039;php.ini&#039;&#039; and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.x and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
===Use InnoDB with Moodle 2.0===&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 you should setup the support for InnoDB in your MySQL database.&lt;br /&gt;
&lt;br /&gt;
Open the file /etc/my.cnf an delete every # in all lines beginning with innodb. This uncomments the InnoDB settings. Please save the file and restart your MySQL database.&lt;br /&gt;
&lt;br /&gt;
 # Uncomment the following if you are using InnoDB tables&lt;br /&gt;
 innodb_data_home_dir = /var/mysql/&lt;br /&gt;
 innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend&lt;br /&gt;
 innodb_log_group_home_dir = /var/mysql/&lt;br /&gt;
 innodb_log_arch_dir = /var/mysql/ &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 % &lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size = 384M&lt;br /&gt;
 innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size = 100M&lt;br /&gt;
 innodb_log_buffer_size = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit = 1&lt;br /&gt;
 innodb_lock_wait_timeout = 50&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you see something like this, make sure that there is not some firewall blocking the port (it&#039;s 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76963</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76963"/>
		<updated>2010-10-21T14:36:52Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Configure PHP for your Moodle installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, Intel Core i3/i5/i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to switch on the PHP module and to control if the file &#039;&#039;/etc/php.ini&#039;&#039; sets the right values for Moodle. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin-106.png]]&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The next thing is to configure the file &#039;&#039;php.ini&#039;&#039;. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file &#039;&#039;php.ini&#039;&#039; and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.x and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
===Use InnoDB with Moodle 2.0===&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 you should setup the support for InnoDB in your MySQL database.&lt;br /&gt;
&lt;br /&gt;
Open the file /etc/my.cnf an delete every # in all lines beginning with innodb. This uncomments the InnoDB settings. Please save the file and restart your MySQL database.&lt;br /&gt;
&lt;br /&gt;
 # Uncomment the following if you are using InnoDB tables&lt;br /&gt;
 innodb_data_home_dir = /var/mysql/&lt;br /&gt;
 innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend&lt;br /&gt;
 innodb_log_group_home_dir = /var/mysql/&lt;br /&gt;
 innodb_log_arch_dir = /var/mysql/ &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 % &lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size = 384M&lt;br /&gt;
 innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size = 100M&lt;br /&gt;
 innodb_log_buffer_size = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit = 1&lt;br /&gt;
 innodb_lock_wait_timeout = 50&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you see something like this, make sure that there is not some firewall blocking the port (it&#039;s 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&lt;br /&gt;
If cvs does not work on your server please check that the port 2401 is open.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File:Server-admin-106.png&amp;diff=76962</id>
		<title>File:Server-admin-106.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File:Server-admin-106.png&amp;diff=76962"/>
		<updated>2010-10-21T14:33:58Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76961</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76961"/>
		<updated>2010-10-21T14:33:30Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Configure PHP for your Moodle installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, Intel Core i3/i5/i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to switch on the PHP module and to control if the file /etc/php.ini sets the right values for Moodle. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin-106.png]]&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The second thing to configure is the file php.ini. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
===Use InnoDB with Moodle 2.0===&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 you should setup the support for InnoDB in your MySQL database.&lt;br /&gt;
&lt;br /&gt;
Open the file /etc/my.cnf an delete every # in all lines beginning with innodb. This uncomments the InnoDB settings. Please save the file and restart your MySQL database.&lt;br /&gt;
&lt;br /&gt;
 # Uncomment the following if you are using InnoDB tables&lt;br /&gt;
 innodb_data_home_dir = /var/mysql/&lt;br /&gt;
 innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend&lt;br /&gt;
 innodb_log_group_home_dir = /var/mysql/&lt;br /&gt;
 innodb_log_arch_dir = /var/mysql/ &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 % &lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size = 384M&lt;br /&gt;
 innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size = 100M&lt;br /&gt;
 innodb_log_buffer_size = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit = 1&lt;br /&gt;
 innodb_lock_wait_timeout = 50&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you see something like this, make sure that there is not some firewall blocking the port (it&#039;s 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&lt;br /&gt;
If cvs does not work on your server please check that the port 2401 is open.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76960</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76960"/>
		<updated>2010-10-21T14:13:22Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, Intel Core i3/i5/i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to control if the PHP module is switched on and if the php.ini does the right settings. You should open the file /etc/php.ini and control the settings for Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The second thing to configure is the file php.ini. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
===Use InnoDB with Moodle 2.0===&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 you should setup the support for InnoDB in your MySQL database.&lt;br /&gt;
&lt;br /&gt;
Open the file /etc/my.cnf an delete every # in all lines beginning with innodb. This uncomments the InnoDB settings. Please save the file and restart your MySQL database.&lt;br /&gt;
&lt;br /&gt;
 # Uncomment the following if you are using InnoDB tables&lt;br /&gt;
 innodb_data_home_dir = /var/mysql/&lt;br /&gt;
 innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend&lt;br /&gt;
 innodb_log_group_home_dir = /var/mysql/&lt;br /&gt;
 innodb_log_arch_dir = /var/mysql/ &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 % &lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size = 384M&lt;br /&gt;
 innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size = 100M&lt;br /&gt;
 innodb_log_buffer_size = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit = 1&lt;br /&gt;
 innodb_lock_wait_timeout = 50&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you see something like this, make sure that there is not some firewall blocking the port (it&#039;s 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&lt;br /&gt;
If cvs does not work on your server please check that the port 2401 is open.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76959</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76959"/>
		<updated>2010-10-21T14:06:51Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Use the Terminal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, i5, i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to control if the PHP module is switched on and if the php.ini does the right settings. You should open the file /etc/php.ini and control the settings for Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The second thing to configure is the file php.ini. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
===Use InnoDB with Moodle 2.0===&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 you should setup the support for InnoDB in your MySQL database.&lt;br /&gt;
&lt;br /&gt;
Open the file /etc/my.cnf an delete every # in all lines beginning with innodb. This uncomments the InnoDB settings. Please save the file and restart your MySQL database.&lt;br /&gt;
&lt;br /&gt;
 # Uncomment the following if you are using InnoDB tables&lt;br /&gt;
 innodb_data_home_dir = /var/mysql/&lt;br /&gt;
 innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend&lt;br /&gt;
 innodb_log_group_home_dir = /var/mysql/&lt;br /&gt;
 innodb_log_arch_dir = /var/mysql/ &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 % &lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size = 384M&lt;br /&gt;
 innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size = 100M&lt;br /&gt;
 innodb_log_buffer_size = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit = 1&lt;br /&gt;
 innodb_lock_wait_timeout = 50&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you see something like this, make sure that there is not some firewall blocking the port (it&#039;s 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&lt;br /&gt;
If cvs does not work on your server please check that the port 2401 is open.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76958</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76958"/>
		<updated>2010-10-21T14:06:09Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Use the Terminal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, i5, i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to control if the PHP module is switched on and if the php.ini does the right settings. You should open the file /etc/php.ini and control the settings for Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The second thing to configure is the file php.ini. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Use InnoDB with Moodle 2.0===&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 you should setup the support for InnoDB in your MySQL database.&lt;br /&gt;
&lt;br /&gt;
Open the file /etc/my.cnf an delete every # in all lines beginning with innodb. This uncomments the InnoDB settings. Please save the file and restart your MySQL database.&lt;br /&gt;
&lt;br /&gt;
 # Uncomment the following if you are using InnoDB tables&lt;br /&gt;
 innodb_data_home_dir = /var/mysql/&lt;br /&gt;
 innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend&lt;br /&gt;
 innodb_log_group_home_dir = /var/mysql/&lt;br /&gt;
 innodb_log_arch_dir = /var/mysql/ &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 % &lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size = 384M&lt;br /&gt;
 innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size = 100M&lt;br /&gt;
 innodb_log_buffer_size = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit = 1&lt;br /&gt;
 innodb_lock_wait_timeout = 50&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you see something like this, make sure that there is not some firewall blocking the port (it&#039;s 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&lt;br /&gt;
If cvs does not work on your server please check that the port 2401 is open.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76957</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76957"/>
		<updated>2010-10-21T13:43:40Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, i5, i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to control if the PHP module is switched on and if the php.ini does the right settings. You should open the file /etc/php.ini and control the settings for Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The second thing to configure is the file php.ini. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you see something like this, make sure that there is not some firewall blocking the port (it&#039;s 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&lt;br /&gt;
If cvs does not work on your server please check that the port 2401 is open.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76956</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76956"/>
		<updated>2010-10-21T13:43:00Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Install Xcode Tools and CVS on your Mac Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, i5, i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to control if the PHP module is switched on and if the php.ini does the right settings. You should open the file /etc/php.ini and control the settings for Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The second thing to configure is the file php.ini. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you see something like this, make sure that there is not some firewall blocking the port (it&#039;s 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&lt;br /&gt;
If cvs does not work on your server please check that the port 2401 is open.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=CVS_for_Administrators&amp;diff=76955</id>
		<title>CVS for Administrators</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=CVS_for_Administrators&amp;diff=76955"/>
		<updated>2010-10-21T13:41:41Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* From a Mac OS X computer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [http://cvs.moodle.org/ CVS archive] contains all the source code for Moodle. You can use a CVS program to extract versions ranging from the most stable release to the most cutting-edge development version. CVS can be an extremely convenient way of maintaining a Moodle server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cvstree.png|CVS tree]]&lt;br /&gt;
&lt;br /&gt;
Developers may have selective write access to the Moodle CVS archive (see [[CVS for Developers]] for details about how to do this). However, most people only need read-only access, so they can just connect to one of the mirrors using &#039;&#039;&#039;anonymous CVS&#039;&#039;&#039; as described below. There can however currently be a delay of up to 1 hour between the time a developer commits changes to developer CVS and the time it becomes available on anonymous CVS. &lt;br /&gt;
&lt;br /&gt;
==CVS Servers==&lt;br /&gt;
&lt;br /&gt;
Please choose the closest CVS mirror server to you from this list:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Country&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Server&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Provided by&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|EU&lt;br /&gt;
|&#039;&#039;&#039;eu.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|[http://www.open.ac.uk/ The Open University] In case of trouble, contact [mailto:r.t.c.norfor@open.ac.uk Rod Norfor] or [mailto:d.a.woolhead@open.ac.uk Derek Woolhead]&lt;br /&gt;
|-&lt;br /&gt;
|ES&lt;br /&gt;
|&#039;&#039;&#039;es.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|[http://www.mondragon.edu/ Mondragon Unibertsitatea] In case of trouble, contact [mailto:iarenuno@eteo.mondragon.edu iarenuno@eteo.mondragon.edu] or [mailto:iarenaza@escomposlinux.org iarenaza@escomposlinux.org]&lt;br /&gt;
|-&lt;br /&gt;
|UK&lt;br /&gt;
|&#039;&#039;&#039;uk.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|Cumbria and Lancashire Education Online ([http://www.cleo.net.uk/ CLEO]) in collaboration with Lancaster University Network Services ([http://www.luns.net.uk/ LUNS])&lt;br /&gt;
|-&lt;br /&gt;
|US&lt;br /&gt;
|&#039;&#039;&#039;us.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|San Francisco State University, Academic Technology ([http://www.sfsu.edu/ SFSU]). In case of trouble, contact [mailto:ilearn@sfsu.edu iLearn support]&lt;br /&gt;
|-&lt;br /&gt;
|US&lt;br /&gt;
|&#039;&#039;&#039;us2.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|[http://www.contractorsinstitute.com The Contractors Institute] pserver and viewvc. In case of trouble contact [mailto:cvs@contractorsinstitute.com network support].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Replace the SERVER.cvs.moodle.org in the instructions below with the server you chose above!&lt;br /&gt;
&lt;br /&gt;
For up-to-date alerts about planned or unplanned outages on any of these servers subscribe to the [http://lists.moodle.org/info/outages Moodle Outage mailing list]. See [http://moodle.org/stats/network.php moodle.org/stats/network.php] for server availability.&lt;br /&gt;
&lt;br /&gt;
(If you would like to contribute to the project by running a mirror, please see [[How to set up a CVS mirror]])&lt;br /&gt;
&lt;br /&gt;
==Moodle versions and CVS branches==&lt;br /&gt;
&lt;br /&gt;
CVS stores every version of Moodle there has ever been. Versions are organised into branches as in the diagram at the top of this page. There is one branch for each series of stable releases, so the 1.9.x releases all come from the MOODLE_19_STABLE branch.&lt;br /&gt;
&lt;br /&gt;
Along that branch, each actual release is marked with a tag. For example the Moodle 1.9 release is tagged MOODLE_19, and the 1.9.1 release is MOODLE_191. The latest 1.9.x+ weekly build is always tagged MOODLE_19_WEEKLY.&lt;br /&gt;
&lt;br /&gt;
The latest development version is what all the stable branches branch away from. It is sometimes called HEAD or TRUNK. At the moment (mid 2009) this is the development version of Moodle 2.0, but around the time we get to the Moodle 2.0 beta release we will create the MOODLE_20_STABLE branch, and HEAD will become 2.1 dev.&lt;br /&gt;
&lt;br /&gt;
As explained below you when you do a CVS checkout, you choose which version you want.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installing and maintaining Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
===From a Unix computer===&lt;br /&gt;
&lt;br /&gt;
To connect and login for the first time to the CVS server, you can use this command (remember to replace &#039;&#039;&#039;SERVER.cvs.moodle.org&#039;&#039;&#039; in the instructions below with the mirror server you chose above):&lt;br /&gt;
&lt;br /&gt;
 cvs -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
&lt;br /&gt;
There is no password - when asked for one, just hit Enter.&lt;br /&gt;
&lt;br /&gt;
To checkout (download) the entire Moodle code for the first time, use this command to get the latest WEEKLY version (generally the latest, most bug free version):&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
&lt;br /&gt;
Or the latest development version - sometimes called HEAD - (not for production use):&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P moodle&lt;br /&gt;
&lt;br /&gt;
Or the modules in Contrib&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co contrib&lt;br /&gt;
&lt;br /&gt;
Later, to update your local copy of Moodle to the current version in CVS you just need to go into your local Moodle directory and type:&lt;br /&gt;
&lt;br /&gt;
 cvs update -dP&lt;br /&gt;
&lt;br /&gt;
To update your local copy of Moodle to a new version (e.g. from 1.8+ to 1.9), go into your local Moodle directory and type:&lt;br /&gt;
&lt;br /&gt;
 cvs update -dP -r MOODLE_19_STABLE&lt;br /&gt;
&lt;br /&gt;
To update your local copy of Moodle to a version from a specific date (e.g. 4th February 2009), go into your local Moodle directory and type:&lt;br /&gt;
&lt;br /&gt;
  cvs -q update -dP -r MOODLE_19_STABLE -D &amp;quot;4 Feb 2009&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To update your local copy and to save the log of the process, use the following command instead the previous one:&lt;br /&gt;
&lt;br /&gt;
 cvs update -dP -r MOODLE_19_STABLE | tee upgrade.log&lt;br /&gt;
&lt;br /&gt;
Then look at the upgrade.log, notably look for lines starting with &amp;quot;C&amp;quot; (conflict):&lt;br /&gt;
&lt;br /&gt;
 grep &#039;^C&#039; upgrade.log&lt;br /&gt;
&lt;br /&gt;
Conflicts may appear in case you have manually modified your source files. You have to resolve conflicts before using the site. See [[CVS for Developers]] for more details.&lt;br /&gt;
&lt;br /&gt;
===Changing the directory name===&lt;br /&gt;
&lt;br /&gt;
By default, the CVS checkout creates a directory on your webserver called &#039;moodle&#039;. If you want your Moodle installation in a different directory, you can change the name of the directory that it will checkout the files to, by typing the following. This would download the MOODLE_19_STABLE branch into a directory called &amp;quot;mydirectory&amp;quot; (-d mydirectory).&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P &#039;&#039;&#039;-d mydirectory&#039;&#039;&#039; -r MOODLE_19_STABLE moodle&lt;br /&gt;
&lt;br /&gt;
Or the latest development version to a directory called &#039;moodle-dev&#039;:&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P &#039;&#039;&#039;-d moodle-dev&#039;&#039;&#039; moodle&lt;br /&gt;
&lt;br /&gt;
You can also change the name of the directory after the files are downloaded, and before you go through the Moodle install process. If you change the name of the directory before install, it will not affect anything during the install or during a CVS update. If you change the name of the directory after an install, you will need to change the config.php to reflect the name change ([[Moodle_migration#Migrating_a_complete_Moodle_site|guidance here]]). It won&#039;t affect the CVS update though.&lt;br /&gt;
&lt;br /&gt;
===Change directory owner===&lt;br /&gt;
&lt;br /&gt;
Depending on your webserver setup, you may well need to change the owner of the directory to the webserver user. Follow this step if you get permissions error when you try to access the page. For apache:&lt;br /&gt;
  &lt;br /&gt;
  chown -R www-data:www-data moodle&lt;br /&gt;
&lt;br /&gt;
===From a Windows computer===&lt;br /&gt;
&lt;br /&gt;
To get started with a fresh copy of Moodle, follow the following steps (remember to replace  &#039;&#039;&#039;SERVER.cvs.moodle.org&#039;&#039;&#039; in the instructions below with the mirror server you chose above):[[Image:CVS moodle settings for tortoise CVS.jpg|thumb|Tortoise CVS Screen capture]]&lt;br /&gt;
[[Image:Ecran cvs.jpg|thumb|Tortoise CVS (real name) Screen capture]]&lt;br /&gt;
# Get TortoiseCVS from [http://www.tortoisecvs.org/ tortoisecvs.org] and install it, then reboot.&lt;br /&gt;
# Find or create a new folder somewhere where you want Moodle to be downloaded to.&lt;br /&gt;
# Right-mouse-click that folder and choose &amp;quot;CVS Checkout&amp;quot; from the menu. You should see a dialog box. &lt;br /&gt;
# Copy this text into the CVSROOT field: &amp;lt;code&amp;gt;:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle&amp;lt;/code&amp;gt;&lt;br /&gt;
#* NOTE - replace &amp;quot;SERVER&amp;quot; with &amp;quot;eu&amp;quot;, &amp;quot;es&amp;quot;, &amp;quot;uk&amp;quot; or &amp;quot;us&amp;quot; depending on your location.&lt;br /&gt;
# Under the &amp;quot;Module&amp;quot; field, type &amp;quot;moodle&amp;quot; to get moodle. (Other options here include&amp;quot;contrib&amp;quot; to get the contrib directory of hacks and addons, or &amp;quot;mysql&amp;quot; to get the optional MySQL Admin module).&lt;br /&gt;
#* For the latest STABLE version, click on the &amp;quot;Revision&amp;quot; tab and then check the radio button labelled &amp;quot;Choose branch or tag&amp;quot;. From the drop-down menu select MOODLE_18_STABLE.&lt;br /&gt;
#* If you don&#039;t see the very latest version in the long drop-down list under Branch or tag name, click the Update List button next to it and wait for the list to be updated.&lt;br /&gt;
#* For the latest UNSTABLE development version, the radio-button &amp;quot;Use HEAD branch&amp;quot; in the Revision tab should be checked.&lt;br /&gt;
# Press the button: &amp;quot;OK&amp;quot; and everything should be downloaded. &lt;br /&gt;
&lt;br /&gt;
Later, to update your local copy of Moodle to the current version in CVS, just right-mouse-click the folder and choose &amp;quot;CVS Update&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the enclosing moodle folder is self-contained - you can move it anywhere you like or even rename it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE.-&#039;&#039;&#039; Admins with a developer account on cvs.moodle.org can connect with their account name, see attached screen shot.&lt;br /&gt;
&lt;br /&gt;
===From a Mac OS X computer===&lt;br /&gt;
You will find useful informations about CVS and Mac OS X  in the documentation for the complete installation package Moodle4Mac and for the Mac OS X Server installation. &lt;br /&gt;
&lt;br /&gt;
Please read [[Complete_Install_Packages_for_Mac_OS_X#How_To_Update_Your_Moodle4Mac | How to update your Moodle4Mac]] or [[Step_by_Step_Installation_on_a_Mac_OS_X_Server#How_to_install_and_update_Moodle_via_CVS | How to install and to update Moodle via CVS]]. It works fine with the Moodle CVS servers.&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you see something like this, make sure that there is not some firewall blocking the port (it&#039;s 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Switching to a new CVS server==&lt;br /&gt;
&lt;br /&gt;
If you were &#039;&#039;already&#039;&#039; using CVS and want to switch to a different server, you&#039;ll probably need to make a small change so that the control files in your working copy will point to the new mirrors. &lt;br /&gt;
&lt;br /&gt;
===Switching to a new server on Unix===&lt;br /&gt;
&lt;br /&gt;
Use a shell command like this to change existing installations to point to the new mirror (UK mirror used in this example):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;find . -type f -name Root -print0 | xargs -0 perl -pi -e &#039;s/\@moodle\.cvs\.sourceforge\.net/\@uk\.cvs\.moodle\.org/&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It can be run from /home, say, to fix multiple sites at once.&lt;br /&gt;
&lt;br /&gt;
===Switching to a new server with TortoiseCVS===&lt;br /&gt;
&lt;br /&gt;
If you were &#039;&#039;already&#039;&#039; using Tortoise CVS on Windows it&#039;s tricky, because Tortoise doesn&#039;t have any interface for changing the server.  http://www.tortoisecvs.org/faq.html#changecvsroot explains it.  But basically, &lt;br /&gt;
&lt;br /&gt;
 1) Install WinCVS and launch it. &lt;br /&gt;
 2) Navigate to and select your Moodle folder. &lt;br /&gt;
 3) Choose &#039;Macros&#039;-&amp;gt;CVS-&amp;gt;Change Root from the menu.  &lt;br /&gt;
 4) Accept (or change) the default for the &#039;old&#039; server. &lt;br /&gt;
 5) Type the new server name. OK!  &lt;br /&gt;
&lt;br /&gt;
It takes a few seconds to go through all of the &#039;&#039;&#039;cvs&#039;&#039;&#039; folders and update the &#039;&#039;&#039;root&#039;&#039;&#039; files.&lt;br /&gt;
&lt;br /&gt;
By the way, if you don&#039;t want to install WinCVS, another way of doing this is to uninstall your TortoiseCVS client on Windows, then do a regedit to clean up all the tortoisecvs related entries (might not be necessary), then reinstall TortoiseCVS client again (a good reason to upgrade to the most recent version of TortoiseCVS!). I have tested this and it cleared up the original setting of the original anonymous CVS server setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Talk:CVS for Administrators]]&lt;br /&gt;
*[[Development:CVS_for_developers|CVS for developers]]&lt;br /&gt;
*[[Development:Setting up Eclipse]] for step by step instructions for setting up the [http://www.eclipse.org/ Eclipse IDE] for Moodle development, which including how to do the necessary CVS operations&lt;br /&gt;
*[[Development:Setting up Netbeans]] step by step instructions for those who prefer the [http://netbeans.org/ NetBeans IDE]. NetBeans comes with integrated CVS support.&lt;br /&gt;
* [[Development:Tracking Moodle CVS with git]]&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=26731&amp;amp;parent=125858 Using cvs]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=91891 CVS Updating of 3rd-Party Plug-ins in the Moodle folder itself]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=108196 simple question for cvs]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Developer tools]]&lt;br /&gt;
&lt;br /&gt;
[[de:CVS für Administratoren]]&lt;br /&gt;
[[fr:CVS pour administrateurs]]&lt;br /&gt;
[[ja:管理者用CVS]]&lt;br /&gt;
[[ru:CVS для администраторов]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=CVS_for_Administrators&amp;diff=76954</id>
		<title>CVS for Administrators</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=CVS_for_Administrators&amp;diff=76954"/>
		<updated>2010-10-21T13:40:53Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* From a Mac OS X computer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [http://cvs.moodle.org/ CVS archive] contains all the source code for Moodle. You can use a CVS program to extract versions ranging from the most stable release to the most cutting-edge development version. CVS can be an extremely convenient way of maintaining a Moodle server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cvstree.png|CVS tree]]&lt;br /&gt;
&lt;br /&gt;
Developers may have selective write access to the Moodle CVS archive (see [[CVS for Developers]] for details about how to do this). However, most people only need read-only access, so they can just connect to one of the mirrors using &#039;&#039;&#039;anonymous CVS&#039;&#039;&#039; as described below. There can however currently be a delay of up to 1 hour between the time a developer commits changes to developer CVS and the time it becomes available on anonymous CVS. &lt;br /&gt;
&lt;br /&gt;
==CVS Servers==&lt;br /&gt;
&lt;br /&gt;
Please choose the closest CVS mirror server to you from this list:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Country&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Server&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Provided by&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|EU&lt;br /&gt;
|&#039;&#039;&#039;eu.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|[http://www.open.ac.uk/ The Open University] In case of trouble, contact [mailto:r.t.c.norfor@open.ac.uk Rod Norfor] or [mailto:d.a.woolhead@open.ac.uk Derek Woolhead]&lt;br /&gt;
|-&lt;br /&gt;
|ES&lt;br /&gt;
|&#039;&#039;&#039;es.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|[http://www.mondragon.edu/ Mondragon Unibertsitatea] In case of trouble, contact [mailto:iarenuno@eteo.mondragon.edu iarenuno@eteo.mondragon.edu] or [mailto:iarenaza@escomposlinux.org iarenaza@escomposlinux.org]&lt;br /&gt;
|-&lt;br /&gt;
|UK&lt;br /&gt;
|&#039;&#039;&#039;uk.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|Cumbria and Lancashire Education Online ([http://www.cleo.net.uk/ CLEO]) in collaboration with Lancaster University Network Services ([http://www.luns.net.uk/ LUNS])&lt;br /&gt;
|-&lt;br /&gt;
|US&lt;br /&gt;
|&#039;&#039;&#039;us.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|San Francisco State University, Academic Technology ([http://www.sfsu.edu/ SFSU]). In case of trouble, contact [mailto:ilearn@sfsu.edu iLearn support]&lt;br /&gt;
|-&lt;br /&gt;
|US&lt;br /&gt;
|&#039;&#039;&#039;us2.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|[http://www.contractorsinstitute.com The Contractors Institute] pserver and viewvc. In case of trouble contact [mailto:cvs@contractorsinstitute.com network support].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Replace the SERVER.cvs.moodle.org in the instructions below with the server you chose above!&lt;br /&gt;
&lt;br /&gt;
For up-to-date alerts about planned or unplanned outages on any of these servers subscribe to the [http://lists.moodle.org/info/outages Moodle Outage mailing list]. See [http://moodle.org/stats/network.php moodle.org/stats/network.php] for server availability.&lt;br /&gt;
&lt;br /&gt;
(If you would like to contribute to the project by running a mirror, please see [[How to set up a CVS mirror]])&lt;br /&gt;
&lt;br /&gt;
==Moodle versions and CVS branches==&lt;br /&gt;
&lt;br /&gt;
CVS stores every version of Moodle there has ever been. Versions are organised into branches as in the diagram at the top of this page. There is one branch for each series of stable releases, so the 1.9.x releases all come from the MOODLE_19_STABLE branch.&lt;br /&gt;
&lt;br /&gt;
Along that branch, each actual release is marked with a tag. For example the Moodle 1.9 release is tagged MOODLE_19, and the 1.9.1 release is MOODLE_191. The latest 1.9.x+ weekly build is always tagged MOODLE_19_WEEKLY.&lt;br /&gt;
&lt;br /&gt;
The latest development version is what all the stable branches branch away from. It is sometimes called HEAD or TRUNK. At the moment (mid 2009) this is the development version of Moodle 2.0, but around the time we get to the Moodle 2.0 beta release we will create the MOODLE_20_STABLE branch, and HEAD will become 2.1 dev.&lt;br /&gt;
&lt;br /&gt;
As explained below you when you do a CVS checkout, you choose which version you want.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installing and maintaining Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
===From a Unix computer===&lt;br /&gt;
&lt;br /&gt;
To connect and login for the first time to the CVS server, you can use this command (remember to replace &#039;&#039;&#039;SERVER.cvs.moodle.org&#039;&#039;&#039; in the instructions below with the mirror server you chose above):&lt;br /&gt;
&lt;br /&gt;
 cvs -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
&lt;br /&gt;
There is no password - when asked for one, just hit Enter.&lt;br /&gt;
&lt;br /&gt;
To checkout (download) the entire Moodle code for the first time, use this command to get the latest WEEKLY version (generally the latest, most bug free version):&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
&lt;br /&gt;
Or the latest development version - sometimes called HEAD - (not for production use):&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P moodle&lt;br /&gt;
&lt;br /&gt;
Or the modules in Contrib&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co contrib&lt;br /&gt;
&lt;br /&gt;
Later, to update your local copy of Moodle to the current version in CVS you just need to go into your local Moodle directory and type:&lt;br /&gt;
&lt;br /&gt;
 cvs update -dP&lt;br /&gt;
&lt;br /&gt;
To update your local copy of Moodle to a new version (e.g. from 1.8+ to 1.9), go into your local Moodle directory and type:&lt;br /&gt;
&lt;br /&gt;
 cvs update -dP -r MOODLE_19_STABLE&lt;br /&gt;
&lt;br /&gt;
To update your local copy of Moodle to a version from a specific date (e.g. 4th February 2009), go into your local Moodle directory and type:&lt;br /&gt;
&lt;br /&gt;
  cvs -q update -dP -r MOODLE_19_STABLE -D &amp;quot;4 Feb 2009&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To update your local copy and to save the log of the process, use the following command instead the previous one:&lt;br /&gt;
&lt;br /&gt;
 cvs update -dP -r MOODLE_19_STABLE | tee upgrade.log&lt;br /&gt;
&lt;br /&gt;
Then look at the upgrade.log, notably look for lines starting with &amp;quot;C&amp;quot; (conflict):&lt;br /&gt;
&lt;br /&gt;
 grep &#039;^C&#039; upgrade.log&lt;br /&gt;
&lt;br /&gt;
Conflicts may appear in case you have manually modified your source files. You have to resolve conflicts before using the site. See [[CVS for Developers]] for more details.&lt;br /&gt;
&lt;br /&gt;
===Changing the directory name===&lt;br /&gt;
&lt;br /&gt;
By default, the CVS checkout creates a directory on your webserver called &#039;moodle&#039;. If you want your Moodle installation in a different directory, you can change the name of the directory that it will checkout the files to, by typing the following. This would download the MOODLE_19_STABLE branch into a directory called &amp;quot;mydirectory&amp;quot; (-d mydirectory).&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P &#039;&#039;&#039;-d mydirectory&#039;&#039;&#039; -r MOODLE_19_STABLE moodle&lt;br /&gt;
&lt;br /&gt;
Or the latest development version to a directory called &#039;moodle-dev&#039;:&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P &#039;&#039;&#039;-d moodle-dev&#039;&#039;&#039; moodle&lt;br /&gt;
&lt;br /&gt;
You can also change the name of the directory after the files are downloaded, and before you go through the Moodle install process. If you change the name of the directory before install, it will not affect anything during the install or during a CVS update. If you change the name of the directory after an install, you will need to change the config.php to reflect the name change ([[Moodle_migration#Migrating_a_complete_Moodle_site|guidance here]]). It won&#039;t affect the CVS update though.&lt;br /&gt;
&lt;br /&gt;
===Change directory owner===&lt;br /&gt;
&lt;br /&gt;
Depending on your webserver setup, you may well need to change the owner of the directory to the webserver user. Follow this step if you get permissions error when you try to access the page. For apache:&lt;br /&gt;
  &lt;br /&gt;
  chown -R www-data:www-data moodle&lt;br /&gt;
&lt;br /&gt;
===From a Windows computer===&lt;br /&gt;
&lt;br /&gt;
To get started with a fresh copy of Moodle, follow the following steps (remember to replace  &#039;&#039;&#039;SERVER.cvs.moodle.org&#039;&#039;&#039; in the instructions below with the mirror server you chose above):[[Image:CVS moodle settings for tortoise CVS.jpg|thumb|Tortoise CVS Screen capture]]&lt;br /&gt;
[[Image:Ecran cvs.jpg|thumb|Tortoise CVS (real name) Screen capture]]&lt;br /&gt;
# Get TortoiseCVS from [http://www.tortoisecvs.org/ tortoisecvs.org] and install it, then reboot.&lt;br /&gt;
# Find or create a new folder somewhere where you want Moodle to be downloaded to.&lt;br /&gt;
# Right-mouse-click that folder and choose &amp;quot;CVS Checkout&amp;quot; from the menu. You should see a dialog box. &lt;br /&gt;
# Copy this text into the CVSROOT field: &amp;lt;code&amp;gt;:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle&amp;lt;/code&amp;gt;&lt;br /&gt;
#* NOTE - replace &amp;quot;SERVER&amp;quot; with &amp;quot;eu&amp;quot;, &amp;quot;es&amp;quot;, &amp;quot;uk&amp;quot; or &amp;quot;us&amp;quot; depending on your location.&lt;br /&gt;
# Under the &amp;quot;Module&amp;quot; field, type &amp;quot;moodle&amp;quot; to get moodle. (Other options here include&amp;quot;contrib&amp;quot; to get the contrib directory of hacks and addons, or &amp;quot;mysql&amp;quot; to get the optional MySQL Admin module).&lt;br /&gt;
#* For the latest STABLE version, click on the &amp;quot;Revision&amp;quot; tab and then check the radio button labelled &amp;quot;Choose branch or tag&amp;quot;. From the drop-down menu select MOODLE_18_STABLE.&lt;br /&gt;
#* If you don&#039;t see the very latest version in the long drop-down list under Branch or tag name, click the Update List button next to it and wait for the list to be updated.&lt;br /&gt;
#* For the latest UNSTABLE development version, the radio-button &amp;quot;Use HEAD branch&amp;quot; in the Revision tab should be checked.&lt;br /&gt;
# Press the button: &amp;quot;OK&amp;quot; and everything should be downloaded. &lt;br /&gt;
&lt;br /&gt;
Later, to update your local copy of Moodle to the current version in CVS, just right-mouse-click the folder and choose &amp;quot;CVS Update&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the enclosing moodle folder is self-contained - you can move it anywhere you like or even rename it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE.-&#039;&#039;&#039; Admins with a developer account on cvs.moodle.org can connect with their account name, see attached screen shot.&lt;br /&gt;
&lt;br /&gt;
===From a Mac OS X computer===&lt;br /&gt;
You will find useful informations about CVS and Mac OS X  in the documentation for the complete installation package Moodle4Mac and for the Mac OS X Server installation. &lt;br /&gt;
&lt;br /&gt;
Please read [[Complete_Install_Packages_for_Mac_OS_X#How_To_Update_Your_Moodle4Mac | How to update your Moodle4Mac]] or [[Step_by_Step_Installation_on_a_Mac_OS_X_Server#How_to_install_and_update_Moodle_via_CVS | How ti install and to update Moodle via CVS]]. It works fine with the Moodle CVS servers.&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you see something like this, make sure that there is not some firewall blocking the port (it&#039;s 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Switching to a new CVS server==&lt;br /&gt;
&lt;br /&gt;
If you were &#039;&#039;already&#039;&#039; using CVS and want to switch to a different server, you&#039;ll probably need to make a small change so that the control files in your working copy will point to the new mirrors. &lt;br /&gt;
&lt;br /&gt;
===Switching to a new server on Unix===&lt;br /&gt;
&lt;br /&gt;
Use a shell command like this to change existing installations to point to the new mirror (UK mirror used in this example):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;find . -type f -name Root -print0 | xargs -0 perl -pi -e &#039;s/\@moodle\.cvs\.sourceforge\.net/\@uk\.cvs\.moodle\.org/&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It can be run from /home, say, to fix multiple sites at once.&lt;br /&gt;
&lt;br /&gt;
===Switching to a new server with TortoiseCVS===&lt;br /&gt;
&lt;br /&gt;
If you were &#039;&#039;already&#039;&#039; using Tortoise CVS on Windows it&#039;s tricky, because Tortoise doesn&#039;t have any interface for changing the server.  http://www.tortoisecvs.org/faq.html#changecvsroot explains it.  But basically, &lt;br /&gt;
&lt;br /&gt;
 1) Install WinCVS and launch it. &lt;br /&gt;
 2) Navigate to and select your Moodle folder. &lt;br /&gt;
 3) Choose &#039;Macros&#039;-&amp;gt;CVS-&amp;gt;Change Root from the menu.  &lt;br /&gt;
 4) Accept (or change) the default for the &#039;old&#039; server. &lt;br /&gt;
 5) Type the new server name. OK!  &lt;br /&gt;
&lt;br /&gt;
It takes a few seconds to go through all of the &#039;&#039;&#039;cvs&#039;&#039;&#039; folders and update the &#039;&#039;&#039;root&#039;&#039;&#039; files.&lt;br /&gt;
&lt;br /&gt;
By the way, if you don&#039;t want to install WinCVS, another way of doing this is to uninstall your TortoiseCVS client on Windows, then do a regedit to clean up all the tortoisecvs related entries (might not be necessary), then reinstall TortoiseCVS client again (a good reason to upgrade to the most recent version of TortoiseCVS!). I have tested this and it cleared up the original setting of the original anonymous CVS server setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Talk:CVS for Administrators]]&lt;br /&gt;
*[[Development:CVS_for_developers|CVS for developers]]&lt;br /&gt;
*[[Development:Setting up Eclipse]] for step by step instructions for setting up the [http://www.eclipse.org/ Eclipse IDE] for Moodle development, which including how to do the necessary CVS operations&lt;br /&gt;
*[[Development:Setting up Netbeans]] step by step instructions for those who prefer the [http://netbeans.org/ NetBeans IDE]. NetBeans comes with integrated CVS support.&lt;br /&gt;
* [[Development:Tracking Moodle CVS with git]]&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=26731&amp;amp;parent=125858 Using cvs]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=91891 CVS Updating of 3rd-Party Plug-ins in the Moodle folder itself]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=108196 simple question for cvs]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Developer tools]]&lt;br /&gt;
&lt;br /&gt;
[[de:CVS für Administratoren]]&lt;br /&gt;
[[fr:CVS pour administrateurs]]&lt;br /&gt;
[[ja:管理者用CVS]]&lt;br /&gt;
[[ru:CVS для администраторов]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=CVS_for_Administrators&amp;diff=76953</id>
		<title>CVS for Administrators</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=CVS_for_Administrators&amp;diff=76953"/>
		<updated>2010-10-21T13:39:44Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* From a Mac OS X computer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [http://cvs.moodle.org/ CVS archive] contains all the source code for Moodle. You can use a CVS program to extract versions ranging from the most stable release to the most cutting-edge development version. CVS can be an extremely convenient way of maintaining a Moodle server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cvstree.png|CVS tree]]&lt;br /&gt;
&lt;br /&gt;
Developers may have selective write access to the Moodle CVS archive (see [[CVS for Developers]] for details about how to do this). However, most people only need read-only access, so they can just connect to one of the mirrors using &#039;&#039;&#039;anonymous CVS&#039;&#039;&#039; as described below. There can however currently be a delay of up to 1 hour between the time a developer commits changes to developer CVS and the time it becomes available on anonymous CVS. &lt;br /&gt;
&lt;br /&gt;
==CVS Servers==&lt;br /&gt;
&lt;br /&gt;
Please choose the closest CVS mirror server to you from this list:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Country&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Server&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Provided by&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|EU&lt;br /&gt;
|&#039;&#039;&#039;eu.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|[http://www.open.ac.uk/ The Open University] In case of trouble, contact [mailto:r.t.c.norfor@open.ac.uk Rod Norfor] or [mailto:d.a.woolhead@open.ac.uk Derek Woolhead]&lt;br /&gt;
|-&lt;br /&gt;
|ES&lt;br /&gt;
|&#039;&#039;&#039;es.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|[http://www.mondragon.edu/ Mondragon Unibertsitatea] In case of trouble, contact [mailto:iarenuno@eteo.mondragon.edu iarenuno@eteo.mondragon.edu] or [mailto:iarenaza@escomposlinux.org iarenaza@escomposlinux.org]&lt;br /&gt;
|-&lt;br /&gt;
|UK&lt;br /&gt;
|&#039;&#039;&#039;uk.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|Cumbria and Lancashire Education Online ([http://www.cleo.net.uk/ CLEO]) in collaboration with Lancaster University Network Services ([http://www.luns.net.uk/ LUNS])&lt;br /&gt;
|-&lt;br /&gt;
|US&lt;br /&gt;
|&#039;&#039;&#039;us.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|San Francisco State University, Academic Technology ([http://www.sfsu.edu/ SFSU]). In case of trouble, contact [mailto:ilearn@sfsu.edu iLearn support]&lt;br /&gt;
|-&lt;br /&gt;
|US&lt;br /&gt;
|&#039;&#039;&#039;us2.cvs.moodle.org&#039;&#039;&#039;&lt;br /&gt;
|[http://www.contractorsinstitute.com The Contractors Institute] pserver and viewvc. In case of trouble contact [mailto:cvs@contractorsinstitute.com network support].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Replace the SERVER.cvs.moodle.org in the instructions below with the server you chose above!&lt;br /&gt;
&lt;br /&gt;
For up-to-date alerts about planned or unplanned outages on any of these servers subscribe to the [http://lists.moodle.org/info/outages Moodle Outage mailing list]. See [http://moodle.org/stats/network.php moodle.org/stats/network.php] for server availability.&lt;br /&gt;
&lt;br /&gt;
(If you would like to contribute to the project by running a mirror, please see [[How to set up a CVS mirror]])&lt;br /&gt;
&lt;br /&gt;
==Moodle versions and CVS branches==&lt;br /&gt;
&lt;br /&gt;
CVS stores every version of Moodle there has ever been. Versions are organised into branches as in the diagram at the top of this page. There is one branch for each series of stable releases, so the 1.9.x releases all come from the MOODLE_19_STABLE branch.&lt;br /&gt;
&lt;br /&gt;
Along that branch, each actual release is marked with a tag. For example the Moodle 1.9 release is tagged MOODLE_19, and the 1.9.1 release is MOODLE_191. The latest 1.9.x+ weekly build is always tagged MOODLE_19_WEEKLY.&lt;br /&gt;
&lt;br /&gt;
The latest development version is what all the stable branches branch away from. It is sometimes called HEAD or TRUNK. At the moment (mid 2009) this is the development version of Moodle 2.0, but around the time we get to the Moodle 2.0 beta release we will create the MOODLE_20_STABLE branch, and HEAD will become 2.1 dev.&lt;br /&gt;
&lt;br /&gt;
As explained below you when you do a CVS checkout, you choose which version you want.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installing and maintaining Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
===From a Unix computer===&lt;br /&gt;
&lt;br /&gt;
To connect and login for the first time to the CVS server, you can use this command (remember to replace &#039;&#039;&#039;SERVER.cvs.moodle.org&#039;&#039;&#039; in the instructions below with the mirror server you chose above):&lt;br /&gt;
&lt;br /&gt;
 cvs -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
&lt;br /&gt;
There is no password - when asked for one, just hit Enter.&lt;br /&gt;
&lt;br /&gt;
To checkout (download) the entire Moodle code for the first time, use this command to get the latest WEEKLY version (generally the latest, most bug free version):&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
&lt;br /&gt;
Or the latest development version - sometimes called HEAD - (not for production use):&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P moodle&lt;br /&gt;
&lt;br /&gt;
Or the modules in Contrib&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co contrib&lt;br /&gt;
&lt;br /&gt;
Later, to update your local copy of Moodle to the current version in CVS you just need to go into your local Moodle directory and type:&lt;br /&gt;
&lt;br /&gt;
 cvs update -dP&lt;br /&gt;
&lt;br /&gt;
To update your local copy of Moodle to a new version (e.g. from 1.8+ to 1.9), go into your local Moodle directory and type:&lt;br /&gt;
&lt;br /&gt;
 cvs update -dP -r MOODLE_19_STABLE&lt;br /&gt;
&lt;br /&gt;
To update your local copy of Moodle to a version from a specific date (e.g. 4th February 2009), go into your local Moodle directory and type:&lt;br /&gt;
&lt;br /&gt;
  cvs -q update -dP -r MOODLE_19_STABLE -D &amp;quot;4 Feb 2009&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To update your local copy and to save the log of the process, use the following command instead the previous one:&lt;br /&gt;
&lt;br /&gt;
 cvs update -dP -r MOODLE_19_STABLE | tee upgrade.log&lt;br /&gt;
&lt;br /&gt;
Then look at the upgrade.log, notably look for lines starting with &amp;quot;C&amp;quot; (conflict):&lt;br /&gt;
&lt;br /&gt;
 grep &#039;^C&#039; upgrade.log&lt;br /&gt;
&lt;br /&gt;
Conflicts may appear in case you have manually modified your source files. You have to resolve conflicts before using the site. See [[CVS for Developers]] for more details.&lt;br /&gt;
&lt;br /&gt;
===Changing the directory name===&lt;br /&gt;
&lt;br /&gt;
By default, the CVS checkout creates a directory on your webserver called &#039;moodle&#039;. If you want your Moodle installation in a different directory, you can change the name of the directory that it will checkout the files to, by typing the following. This would download the MOODLE_19_STABLE branch into a directory called &amp;quot;mydirectory&amp;quot; (-d mydirectory).&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P &#039;&#039;&#039;-d mydirectory&#039;&#039;&#039; -r MOODLE_19_STABLE moodle&lt;br /&gt;
&lt;br /&gt;
Or the latest development version to a directory called &#039;moodle-dev&#039;:&lt;br /&gt;
&lt;br /&gt;
 cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P &#039;&#039;&#039;-d moodle-dev&#039;&#039;&#039; moodle&lt;br /&gt;
&lt;br /&gt;
You can also change the name of the directory after the files are downloaded, and before you go through the Moodle install process. If you change the name of the directory before install, it will not affect anything during the install or during a CVS update. If you change the name of the directory after an install, you will need to change the config.php to reflect the name change ([[Moodle_migration#Migrating_a_complete_Moodle_site|guidance here]]). It won&#039;t affect the CVS update though.&lt;br /&gt;
&lt;br /&gt;
===Change directory owner===&lt;br /&gt;
&lt;br /&gt;
Depending on your webserver setup, you may well need to change the owner of the directory to the webserver user. Follow this step if you get permissions error when you try to access the page. For apache:&lt;br /&gt;
  &lt;br /&gt;
  chown -R www-data:www-data moodle&lt;br /&gt;
&lt;br /&gt;
===From a Windows computer===&lt;br /&gt;
&lt;br /&gt;
To get started with a fresh copy of Moodle, follow the following steps (remember to replace  &#039;&#039;&#039;SERVER.cvs.moodle.org&#039;&#039;&#039; in the instructions below with the mirror server you chose above):[[Image:CVS moodle settings for tortoise CVS.jpg|thumb|Tortoise CVS Screen capture]]&lt;br /&gt;
[[Image:Ecran cvs.jpg|thumb|Tortoise CVS (real name) Screen capture]]&lt;br /&gt;
# Get TortoiseCVS from [http://www.tortoisecvs.org/ tortoisecvs.org] and install it, then reboot.&lt;br /&gt;
# Find or create a new folder somewhere where you want Moodle to be downloaded to.&lt;br /&gt;
# Right-mouse-click that folder and choose &amp;quot;CVS Checkout&amp;quot; from the menu. You should see a dialog box. &lt;br /&gt;
# Copy this text into the CVSROOT field: &amp;lt;code&amp;gt;:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle&amp;lt;/code&amp;gt;&lt;br /&gt;
#* NOTE - replace &amp;quot;SERVER&amp;quot; with &amp;quot;eu&amp;quot;, &amp;quot;es&amp;quot;, &amp;quot;uk&amp;quot; or &amp;quot;us&amp;quot; depending on your location.&lt;br /&gt;
# Under the &amp;quot;Module&amp;quot; field, type &amp;quot;moodle&amp;quot; to get moodle. (Other options here include&amp;quot;contrib&amp;quot; to get the contrib directory of hacks and addons, or &amp;quot;mysql&amp;quot; to get the optional MySQL Admin module).&lt;br /&gt;
#* For the latest STABLE version, click on the &amp;quot;Revision&amp;quot; tab and then check the radio button labelled &amp;quot;Choose branch or tag&amp;quot;. From the drop-down menu select MOODLE_18_STABLE.&lt;br /&gt;
#* If you don&#039;t see the very latest version in the long drop-down list under Branch or tag name, click the Update List button next to it and wait for the list to be updated.&lt;br /&gt;
#* For the latest UNSTABLE development version, the radio-button &amp;quot;Use HEAD branch&amp;quot; in the Revision tab should be checked.&lt;br /&gt;
# Press the button: &amp;quot;OK&amp;quot; and everything should be downloaded. &lt;br /&gt;
&lt;br /&gt;
Later, to update your local copy of Moodle to the current version in CVS, just right-mouse-click the folder and choose &amp;quot;CVS Update&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the enclosing moodle folder is self-contained - you can move it anywhere you like or even rename it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE.-&#039;&#039;&#039; Admins with a developer account on cvs.moodle.org can connect with their account name, see attached screen shot.&lt;br /&gt;
&lt;br /&gt;
===From a Mac OS X computer===&lt;br /&gt;
You will find some information about CVS and Mac OS X  in the documentation for the complete installation package Moodle4Mac and for the Mac OS X Server installation. &lt;br /&gt;
Please read [[Complete_Install_Packages_for_Mac_OS_X#How_To_Update_Your_Moodle4Mac | How to update your Moodle4Mac]] or [[Step_by_Step_Installation_on_a_Mac_OS_X_Server#How_to_install_and_update_Moodle_via_CVS | How ti install and to update Moodle via CVS]]. It works fine with the Moodle CVS servers.&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you see something like this, make sure that there is not some firewall blocking the port (it&#039;s 2401):&lt;br /&gt;
&lt;br /&gt;
 $ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
 Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle&lt;br /&gt;
 CVS password:&lt;br /&gt;
 cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Switching to a new CVS server==&lt;br /&gt;
&lt;br /&gt;
If you were &#039;&#039;already&#039;&#039; using CVS and want to switch to a different server, you&#039;ll probably need to make a small change so that the control files in your working copy will point to the new mirrors. &lt;br /&gt;
&lt;br /&gt;
===Switching to a new server on Unix===&lt;br /&gt;
&lt;br /&gt;
Use a shell command like this to change existing installations to point to the new mirror (UK mirror used in this example):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;find . -type f -name Root -print0 | xargs -0 perl -pi -e &#039;s/\@moodle\.cvs\.sourceforge\.net/\@uk\.cvs\.moodle\.org/&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It can be run from /home, say, to fix multiple sites at once.&lt;br /&gt;
&lt;br /&gt;
===Switching to a new server with TortoiseCVS===&lt;br /&gt;
&lt;br /&gt;
If you were &#039;&#039;already&#039;&#039; using Tortoise CVS on Windows it&#039;s tricky, because Tortoise doesn&#039;t have any interface for changing the server.  http://www.tortoisecvs.org/faq.html#changecvsroot explains it.  But basically, &lt;br /&gt;
&lt;br /&gt;
 1) Install WinCVS and launch it. &lt;br /&gt;
 2) Navigate to and select your Moodle folder. &lt;br /&gt;
 3) Choose &#039;Macros&#039;-&amp;gt;CVS-&amp;gt;Change Root from the menu.  &lt;br /&gt;
 4) Accept (or change) the default for the &#039;old&#039; server. &lt;br /&gt;
 5) Type the new server name. OK!  &lt;br /&gt;
&lt;br /&gt;
It takes a few seconds to go through all of the &#039;&#039;&#039;cvs&#039;&#039;&#039; folders and update the &#039;&#039;&#039;root&#039;&#039;&#039; files.&lt;br /&gt;
&lt;br /&gt;
By the way, if you don&#039;t want to install WinCVS, another way of doing this is to uninstall your TortoiseCVS client on Windows, then do a regedit to clean up all the tortoisecvs related entries (might not be necessary), then reinstall TortoiseCVS client again (a good reason to upgrade to the most recent version of TortoiseCVS!). I have tested this and it cleared up the original setting of the original anonymous CVS server setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Talk:CVS for Administrators]]&lt;br /&gt;
*[[Development:CVS_for_developers|CVS for developers]]&lt;br /&gt;
*[[Development:Setting up Eclipse]] for step by step instructions for setting up the [http://www.eclipse.org/ Eclipse IDE] for Moodle development, which including how to do the necessary CVS operations&lt;br /&gt;
*[[Development:Setting up Netbeans]] step by step instructions for those who prefer the [http://netbeans.org/ NetBeans IDE]. NetBeans comes with integrated CVS support.&lt;br /&gt;
* [[Development:Tracking Moodle CVS with git]]&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=26731&amp;amp;parent=125858 Using cvs]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=91891 CVS Updating of 3rd-Party Plug-ins in the Moodle folder itself]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=108196 simple question for cvs]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Developer tools]]&lt;br /&gt;
&lt;br /&gt;
[[de:CVS für Administratoren]]&lt;br /&gt;
[[fr:CVS pour administrateurs]]&lt;br /&gt;
[[ja:管理者用CVS]]&lt;br /&gt;
[[ru:CVS для администраторов]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76952</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76952"/>
		<updated>2010-10-21T13:33:13Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, i5, i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to control if the PHP module is switched on and if the php.ini does the right settings. You should open the file /etc/php.ini and control the settings for Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The second thing to configure is the file php.ini. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&lt;br /&gt;
If cvs does not work on your server please check that the port 2401 is open.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X Client 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76951</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76951"/>
		<updated>2010-10-21T13:32:42Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, i5, i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to control if the PHP module is switched on and if the php.ini does the right settings. You should open the file /etc/php.ini and control the settings for Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The second thing to configure is the file php.ini. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&lt;br /&gt;
If cvs does not work on your server please check that the port 2401 is open.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation for Mac OS X Clients 10.4]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76950</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76950"/>
		<updated>2010-10-21T13:31:37Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Use the CVS update script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, i5, i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to control if the PHP module is switched on and if the php.ini does the right settings. You should open the file /etc/php.ini and control the settings for Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The second thing to configure is the file php.ini. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 RC1 still uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&lt;br /&gt;
If cvs does not work on your server please check that the port 2401 is open.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X 10.4 Client]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76949</id>
		<title>Step by Step Installation on a Mac OS X Server</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Step_by_Step_Installation_on_a_Mac_OS_X_Server&amp;diff=76949"/>
		<updated>2010-10-21T13:31:01Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Use the CVS update script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
This guide shows all steps for the installation of Moodle on a [http://www.apple.com/server/macosx Mac OS X Server]. This server is a commercial product. You will find [http://www.apple.com/server/macosx/resources/documentation.html all documentations] about the web server on the Apple support pages. &lt;br /&gt;
&lt;br /&gt;
This installation guide can&#039;t be useful for an installation on MAMP or XAMPP. If you are looking for an easy way to install Moodle on your local machine please use [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]] that can be downloaded from http://download.moodle.org/macosx/ ... but if you are planning to set up a Moodle internet server on a Mac then you should think about some more security as the ever local package could give.&lt;br /&gt;
&lt;br /&gt;
Please feel free to add your ideas and wishes to the discussion page for this article. You may also write a complete chapter if you tried the facts yourself on your own Mac Server. I am most interested to make the things better.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
 + Apple Computer &lt;br /&gt;
 + Mac mini, Mac Pro or Xserve&lt;br /&gt;
 + Processor:  Intel Core 2 Duo, i5, i7&lt;br /&gt;
 + RAM: 2 GB or better&lt;br /&gt;
 + Hard Disk: 500 MB free&lt;br /&gt;
 + System Software: Mac OS X Server 10.5 or 10.6&lt;br /&gt;
&lt;br /&gt;
==Configure PHP for your Moodle installation==&lt;br /&gt;
===Mac OS X 10.6 Server - No PHP installation needed===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.6.4 Server (SnowLeopard) comes with PHP 5.3.2 and a lot of PHP extensions. This would be the best choice for Moodle 1.9.x and for Moodle 2.0 on a Mac OS X Server. Please forget everything you read about the missing GD Library! The PHP installation is totally complete for Moodle. You only have to control if the PHP module is switched on and if the php.ini does the right settings. You should open the file /etc/php.ini and control the settings for Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.5 Server - Install PHP 5.3.0 and the GD Library===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X 10.5.8 Server (Leopard) comes with PHP 5.2.6 ... this is correct for Moodle 1.9.x. But you have to add the missing GD Library support to get Moodle running on your server. For Moodle 2.0 the server must have PHP 5.2.8 (or better) and some more PHP extensions ... in this case you need to get the better PHP version. These instructions are helpful in both cases.&lt;br /&gt;
&lt;br /&gt;
To see which PHP version and extensions are installed on your server you should edit the file &#039;&#039;/Library/WebServer/Documents/info.php&#039;&#039;. You must activate the function call phpinfo() by deleting the both slashes // at the start of the function line. After saving the file you can get all PHP informations in your browser. Please look at http://your-server-address/info.php ... you will not find any GD library support ... bad thing for Moodle!!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // You can use Server Admin to enable the Apache PHP module; it&#039;s disabled by default.&lt;br /&gt;
 // You can uncomment the phpinfo() directive below to provide a default PHP info page&lt;br /&gt;
 // but note that this displays information about your host&#039;s configuration.&lt;br /&gt;
 phpinfo();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the GD library support and to get a better PHP version would be the installation of the complete PHP 5.3.0 package from http://www.entropy.ch/software/macosx/php/. Marc Liyanage precompiled this package to use it on Mac clients and Mac servers. Please get the package and install it by following the instructions on the download page. The installer does everything for you ... it copies PHP into the correct folder &#039;&#039;/usr/local/php5&#039;&#039; and changes its owner to &#039;&#039;root&#039;&#039; automatically. You will find the file php.ini inside the new package folder. Open the file &#039;&#039;/usr/local/php5/lib/php.ini&#039;&#039; and edit some settings for Moodle. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; If you want to install Moodle 1.8.x on the server you need to get the Entropy PHP-5.2.9-7.pkg instead. Moodle 1.8.x does not run with PHP 5.3.0. (MDL-20128)&lt;br /&gt;
&lt;br /&gt;
Now the Apache web server must get knowledge that you want to use the new PHP library instead of the old. Open the application Server Admin to switch to the new library. Go to the web server settings and find the entry php5_module. The normal place for PHP the Mac server is &#039;&#039;libexec/apache2/libphp5.so&#039;&#039;. Please change to &#039;&#039;/usr/local/php5/libphp5.so&#039;&#039; and save the settings. &lt;br /&gt;
&lt;br /&gt;
[[Image:Server-admin.png]]&lt;br /&gt;
&lt;br /&gt;
===PHP settings in your php.ini===&lt;br /&gt;
The second thing to configure is the file php.ini. Most of the settings are okay but not all of them. To communicate to the MySQL database with PHP you have to set the default socket name for local MySQL connects. The default socket name for local MySQLi connects is needed for Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
If you want to upload any file to your Moodle you should add  a little bit more upload size in php.ini. If your server can&#039;t use more than 1 GB RAM you should set the memory_limit to a value less than 128M ... but it should have more than 48M for Moodle 1.9 and Moodle 2.0.  Note that these sections are not likely to be consecutive in the php.ini file; the quickest way to find each one is search on the initial term (such as &#039;mysql.default_socket&#039;).&lt;br /&gt;
&lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysql.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Default socket name for local MySQL connects.  &lt;br /&gt;
 ; If empty, uses the built-in MySQL defaults.&lt;br /&gt;
 mysqli.default_socket = /var/mysql/mysql.sock&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;
 memory_limit = 128M     &lt;br /&gt;
 &lt;br /&gt;
 ; Maximum allowed size for uploaded files.&lt;br /&gt;
 upload_max_filesize = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Maximum size of POST data that PHP will accept.&lt;br /&gt;
 post_max_size = 128M&lt;br /&gt;
 &lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = &#039;Europe/Berlin&#039;;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s all ... save the file php.ini and restart the web server. Now you should look at http://your-server-address/info.php again. I hope that everything will be okay. You will find the version number PHP 5.3.0 and the running GD library support. Congratulations ... the first step for Moodle on your Mac server is done!&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:phpinfo2.png]]&lt;br /&gt;
&lt;br /&gt;
==Configure the MySQL database for your Moodle installation==&lt;br /&gt;
&lt;br /&gt;
In standard case the database MySQL is installed on the Mac OS X Server but it is not running yet. Please make sure that you start the MySQL database server.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
Sorry ... there are some more installations and a lot of clicks to configure MySQL in a graphical way.&lt;br /&gt;
&lt;br /&gt;
First of all start the &#039;&#039;Server Admin&#039;&#039;. You will find this program by the way &#039;&#039;Applications &amp;gt; Server &amp;gt; Server Admin&#039;&#039;. Activate MySQL on the local server. You must set the password for the user &#039;&#039;root&#039;&#039; before you can start MySQL.&lt;br /&gt;
&lt;br /&gt;
For the next you must download the MySQL database administration tool &#039;&#039;&#039;phpMyAdmin&#039;&#039;&#039; from http://www.phpmyadmin.net . Move the folder to the web server documents as &#039;&#039;/Library/WebServer/Documents/phpMyAdmin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add the security phrase to the file &#039;&#039;config.inc.php&#039;&#039; in between the single quotes on the line $cfg[&#039;blowfish_secret&#039;] = &#039;&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start http://your-server-address/phpMyAdmin/ in your browser and to log into the database as the user &#039;&#039;root&#039;&#039;. Add a database &#039;&#039;moodle19&#039;&#039;. Add a database user &#039;&#039;moodle&#039;&#039; to the server &#039;&#039;localhost&#039;&#039;. Don&#039;t forget to set a secure password. The database user &#039;&#039;moodle&#039;&#039; should be allowed to administrate the database &#039;&#039;moodle19&#039;&#039; only. It is a bad way to set &#039;&#039;root&#039;&#039; to administrate the database &#039;&#039;moodle19&#039;&#039;. If you want to install also Moodle 2.0 dev please add a second database &#039;&#039;moodle20&#039;&#039; and use the same database user for it.&lt;br /&gt;
&lt;br /&gt;
phpMyAdmin is a nice thing to look into the database while Moodle is running for some time. It&#039;s much easier to see in the graphical interface than in the command line tools. The image shows the database after Moodle 1.9 and Moodle 2.0 were already installed on this server.&lt;br /&gt;
&lt;br /&gt;
[[Image:phpmyadmin.png]]&lt;br /&gt;
&lt;br /&gt;
===Use the Terminal===&lt;br /&gt;
If you want a quick installation then don&#039;t fear to use the Terminal. It&#039;s easier to tell you all the commands for the right way with the Terminal than showing you all the pictures to do the same with graphical tools. There are only a few commands to do everything I told you before.&lt;br /&gt;
&lt;br /&gt;
Start the Terminal. You will find this program by the way &#039;&#039;Applications &amp;gt; Tools &amp;gt; Terminal&#039;&#039;. You will see that we must do the same steps as before but you can read them in a text form.&lt;br /&gt;
&lt;br /&gt;
First of all you need to set the root password. If you didn&#039;t this before then use the first command line. If you want to change an existing password then use the second one.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root password &#039;secret&#039;&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p password &#039;topsecret&#039;&lt;br /&gt;
&lt;br /&gt;
The next steps are creating a new database &#039;&#039;moodle19&#039;&#039; with correct character set and setting up a database user &#039;&#039;moodle&#039;&#039;, with an assigned password (IDENTIFIED BY), to administrate the new database ... and if you want, then do the same for &#039;&#039;moodle20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 Server:~ $ mysqladmin -u root -p create moodle19&lt;br /&gt;
 Server:~ $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; ALTER DATABASE moodle19 CHARSET &#039;utf8&#039;;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON moodle19.* TO moodle@localhost&lt;br /&gt;
    -&amp;gt; IDENTIFIED BY &#039;moodle!&#039;;&lt;br /&gt;
 mysql&amp;gt; quit&lt;br /&gt;
 &lt;br /&gt;
 Server:~ $&lt;br /&gt;
&lt;br /&gt;
That&#039;s really all with the Terminal. You are just ready!&lt;br /&gt;
&lt;br /&gt;
==Copy the Moodle files to the web server==&lt;br /&gt;
&lt;br /&gt;
The documents for the web server are saved in the folder &#039;&#039;/Library/WebServer/Documents/&#039;&#039;. You will place your Moodle folder here after you got it from http://download.moodle.org. Download the standard package MOODLE_19_WEEKLY because this is the best choice for new servers. Set the owner &#039;&#039;_www&#039;&#039; for the moodle folder ... this is the user for the web server. The folder permissions should be 755 before the installation and 555 after it&#039;s done ... please remember to set this later!&lt;br /&gt;
&lt;br /&gt;
You also need the moodledata folder outside of the Documents folder ... so please make one. Go to the folder &#039;&#039;/Library/WebServer/&#039;&#039; and add the folder &#039;&#039;moodledata&#039;&#039;. Because I want to install Moodle 1.9.x and Moodle 2.0 dev together on the same Mac server I add two folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; inside the moodledata folder. Please set the owner &#039;&#039;_www&#039;&#039; for both folders &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; and the folder permissions to 755.&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer/&lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
 mkdir moodledata/moodle19&lt;br /&gt;
 mkdir moodledata/moodle20&lt;br /&gt;
 sudo chown -R _www moodledata&lt;br /&gt;
 sudo chmod -R 755 moodledata&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to put the moodledata folder on another volume (not a bad idea if you think you&#039;ll have a substantial amount of data within the moodle), note that you cannot simply reference it using the /Volumes/&amp;lt;volume_name&amp;gt;/folder syntax during the moodle setup.  Instead, you&#039;ll need to create the folder (assigning the user and permissions), then create a &#039;&#039;&#039;link&#039;&#039;&#039; to it within the /Library/WebServer folder.  To create the link, use the following command in a terminal window, substituting your data volume and folder name:&lt;br /&gt;
&lt;br /&gt;
 cd /Library/WebServer&lt;br /&gt;
 ln -s /Volumes/Data_Volume/moodledata moodledata&lt;br /&gt;
&lt;br /&gt;
==Run the Moodle installation==&lt;br /&gt;
The installation on the Mac server is the same like the installation on every other server.&lt;br /&gt;
Open a web browser to http://your-server-address/moodle/install.php to begin the installation process.  &lt;br /&gt;
On the screen picture and in the shown config.php you see the web address &#039;&#039;your-server-address&#039;&#039; ... it&#039;s only a placeholder for a real address or url ... please set yours. Also a user &#039;moodle&#039; with a password &#039;moodle&#039; would be very unsafe settings for your installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:moodle-install2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installer generates the config.php automatically and saves it in the folder &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039;. Please edit the config.php with a text editor and add the line &#039;&#039;date_default_timezone_set(&#039;UTC&#039;);&#039;&#039;. You may change &#039;&#039;UTC&#039;&#039; to your own timezone ... this is needed for PHP 5.3.0.  In case you don&#039;t know all the relevant time zone identifiers by heart, there is a [http://phpbuilder.com/manual/en/timezones.php list available online].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  /// Moodle Configuration File &lt;br /&gt;
 &lt;br /&gt;
 unset($CFG);&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;dbtype    = &#039;mysql&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbname    = &#039;moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbuser    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpass    = &#039;moodle&#039;; &lt;br /&gt;
 $CFG-&amp;gt;dbpersist =  false;&lt;br /&gt;
 $CFG-&amp;gt;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;wwwroot   = &#039;http://your-server-address/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dirroot   = &#039;/Library/WebServer/Documents/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;dataroot  = &#039;/Library/WebServer/moodledata/moodle19&#039;;&lt;br /&gt;
 $CFG-&amp;gt;admin     = &#039;admin&#039;;&lt;br /&gt;
 &lt;br /&gt;
 $CFG-&amp;gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode&lt;br /&gt;
 &lt;br /&gt;
 date_default_timezone_set(&#039;Europe/Berlin&#039;); // timezone for PHP 5.3.0&lt;br /&gt;
 require_once(&amp;quot;$CFG-&amp;gt;dirroot/lib/setup.php&amp;quot;);&lt;br /&gt;
 // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,&lt;br /&gt;
 // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the web-based installation component will walk you through &#039;&#039;&#039;several&#039;&#039;&#039; screens worth of database configurations and updates, for most of which you&#039;ll just click the continue button. You&#039;ll set up an admin user and give the site a basic configuration (title, description, etc).  When the installation is ready you should change the folder permission for &#039;&#039;/Library/WebServer/Documents/moodle19&#039;&#039; to 555 so the web server is not able to write into this folder again.&lt;br /&gt;
&lt;br /&gt;
==Download the language packages==&lt;br /&gt;
&lt;br /&gt;
==Moodle is running ...==&lt;br /&gt;
[[Image:moodle-on-macosx-server.png]]&lt;br /&gt;
&lt;br /&gt;
==How to setup the cron job with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more information about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;. That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; the server will get a cron service for both instances.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==How to install and update Moodle via CVS==&lt;br /&gt;
&lt;br /&gt;
CVS is very simple way to install and update your Moodle.&lt;br /&gt;
&lt;br /&gt;
The only software you must have installed on your Mac server is the Xcode Tools package from your system installation media. You also must have an internet connection to get the files from the update server. After you installed both script files on your server desktop it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package. Please remember - before you can update your Moodle via CVS you must install Moodle via CVS at once.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all .... really .... it&#039;s easy!!&lt;br /&gt;
&lt;br /&gt;
===Use the CVS installation script===&lt;br /&gt;
If your Moodle is already installed via CVS please use the CVS updater (see below). Running the CVS installer will install only the standard version of Moodle on your server. &lt;br /&gt;
&lt;br /&gt;
If you already have a working Moodle on your server then this script copies the file config.php into your new installation but it does not copy your additional modules or plugins or themes. You will find your old moodle folder in same directory and it will be renamed with an additional date stamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS installer for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS installer for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents&lt;br /&gt;
&lt;br /&gt;
### get the cvs installation into a tmp folder&lt;br /&gt;
if ! test -e tmp ; then&lt;br /&gt;
    sudo mkdir tmp&lt;br /&gt;
    sudo chmod 777 tmp&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
cd tmp&lt;br /&gt;
cvs -z9 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
### copy config.php from your current moodle folder if it exists&lt;br /&gt;
if ! test -e moodle/config.php ; then&lt;br /&gt;
    cp moodle19/config.php tmp/moodle/config.php&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### move the new moodle to the right place&lt;br /&gt;
DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
sudo mv moodle19 moodle19-$DATE&lt;br /&gt;
sudo mv tmp/moodle moodle19&lt;br /&gt;
sudo chown -R _www moodle19&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use the CVS update script===&lt;br /&gt;
To be able to update Moodle via CVS please check that your Moodle was already installed via CVS (see above).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  CVS updater for Moodle&lt;br /&gt;
#  on a Mac OS X Server&lt;br /&gt;
# &lt;br /&gt;
#  20100818 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
export CVS_RSH=ssh&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| CVS updater for the Moodle server &amp;quot;&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
cd /Library/WebServer/Documents/moodle19/&lt;br /&gt;
&lt;br /&gt;
### file ~/.cvspass must exist&lt;br /&gt;
if ! test -e ~/.cvspass ; then&lt;br /&gt;
    touch ~/.cvspass&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
### login to the cvs server only for the first time&lt;br /&gt;
if ! grep &amp;quot;uk.cvs.moodle.org&amp;quot; ~/.cvspass &amp;gt; /dev/null ; then&lt;br /&gt;
    echo &amp;quot;CVS password is empty ... please only press &amp;lt;return&amp;gt; to start&amp;quot;&lt;br /&gt;
    sudo cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
    echo&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Connecting to the CVS server. Download will take a few moments!&amp;quot;&lt;br /&gt;
echo &amp;quot;If the CVS update runs too long you may break with &amp;lt;ctrl&amp;gt;-C&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
### do the cvs installation&lt;br /&gt;
sudo cvs -q update -dP -r MOODLE_19_WEEKLY&lt;br /&gt;
sudo chown -R _www .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please look at the documentation [https://docs.moodle.org/en/CVS_for_Administrators CVS for Administrators] if you want to learn more about Moodle and CVS. There you will also find a list of different [https://docs.moodle.org/en/CVS_for_Administrators#CVS_Servers CVS servers for Moodle] which you may choose for your updates.&lt;br /&gt;
&lt;br /&gt;
The shown update script should be modified in only three things ... first you need to choose the correct folder for the Moodle files, second choose a CVS server near your server place to minimate internet traffic, and third you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.9&lt;br /&gt;
* Moodle 1.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_18_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 1.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_19_WEEKLY&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.0 Preview uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;HEAD&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Xcode Tools and CVS on your Mac Server===&lt;br /&gt;
&lt;br /&gt;
To test if cvs is already on your Mac Server please open the Terminal and type &#039;&#039;cvs -v&#039;&#039;. The output of this command should show a version notice of your Concurrent Versions System (CVS). If you get the &#039;&#039;command not found&#039;&#039; message then you must search for your Mac OS X 10.5 Server installation media. You will find the Xcode Tools on your installation CD or DVD set.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. Starting the download then the Xcode package copies a lot of bytes on your harddisk and will need a very few minutes to complete.&lt;br /&gt;
&lt;br /&gt;
After you installed the Xcode Tools in your server system you will get the correct version answer from the Terminal command &#039;&#039;cvs -v&#039;&#039;. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.&lt;br /&gt;
&lt;br /&gt;
If cvs does not work on your server please check that the port 2401 is open.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==User administration via LDAP==&lt;br /&gt;
&lt;br /&gt;
The following settings will work on 10.5 Server running LDAP - edit them to customize to your own environment.  Please note that moodle requires some fields - it is best to have these fields completed in Workgroup Manager on 10.5 Server - otherwise they&#039;ll be prompted to enter info into their moodle profile on first login, but the way we&#039;ve got it set up, moodle can&#039;t modify LDAP for security and data integrity.  The necessary fields are user name, first name, surname, Email address, City/Town, country, description, ID number.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LDAP SERVER SETTINGS&lt;br /&gt;
Host URL = ourserver.example.com&lt;br /&gt;
Version = 3&lt;br /&gt;
LDAP encoding = utf-8&lt;br /&gt;
&lt;br /&gt;
BIND SETTINGS&lt;br /&gt;
Hide passwords = Yes&lt;br /&gt;
Distinguished Name = (blank)&lt;br /&gt;
Password = (blank)&lt;br /&gt;
&lt;br /&gt;
USER LOOKUP SETTINGS&lt;br /&gt;
User type = posixAccount (rfc2307)&lt;br /&gt;
Contexts = cn=users,dc=ourserver,dc=example,dc=com&lt;br /&gt;
Search subcontexts = Yes&lt;br /&gt;
Dereference aliases = No&lt;br /&gt;
User attribute = (blank)&lt;br /&gt;
Member attribute = (blank)&lt;br /&gt;
Member attribute uses dn = (blank)&lt;br /&gt;
Object class = (blank)&lt;br /&gt;
&lt;br /&gt;
FORCE CHANGE PASSWORD&lt;br /&gt;
Force change password = No&lt;br /&gt;
Use standard Change Password Page = No&lt;br /&gt;
Password format = Plain text&lt;br /&gt;
Password change URL = (blank)&lt;br /&gt;
&lt;br /&gt;
LDAP PASSWORD EXPIRATION SETTINGS&lt;br /&gt;
Expiration = no&lt;br /&gt;
Expiration warning = 10&lt;br /&gt;
Expiration attribute = &amp;quot;&amp;quot;&lt;br /&gt;
Grace logins = No&lt;br /&gt;
Grace login attribute = (blank)&lt;br /&gt;
&lt;br /&gt;
ENABLE USER CREATION&lt;br /&gt;
Create users externally = No&lt;br /&gt;
Context for new users = (blank)&lt;br /&gt;
&lt;br /&gt;
COURSE CREATOR&lt;br /&gt;
Creators = (blank)&lt;br /&gt;
&lt;br /&gt;
CRON SYNCHRONIZATION SCRIPT&lt;br /&gt;
Removed ext user = Keep internal&lt;br /&gt;
&lt;br /&gt;
NTLM SSO &lt;br /&gt;
Enable = No&lt;br /&gt;
Subnet = (blank)&lt;br /&gt;
First name = givenName (On every login, Never, Locked)&lt;br /&gt;
Surname = sn (On every login, Never, Locked)&lt;br /&gt;
Email address = mail (On every login, Never, Locked)&lt;br /&gt;
Phone 1 = (blank)&lt;br /&gt;
Phone 2 = (blank)&lt;br /&gt;
Department = (blank)&lt;br /&gt;
Address = (blank)&lt;br /&gt;
City/Town = l (On every login, Never, Locked)&lt;br /&gt;
Country = c (On every login, Never, Locked)&lt;br /&gt;
Description = description (On every login, Never, Locked)&lt;br /&gt;
ID number = uidNumber (On every login, Never, Locked)&lt;br /&gt;
Language = (blank)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete install packages for Mac OS X 10.4/10.5/10.6 Clients]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by step installation on a Mac OS X 10.4 Client]]&lt;br /&gt;
* [[Cron | Installation of cron for Moodle]]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
 &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=24632 Using Moodle: Dynamic DNS Home Server]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
</feed>