<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/402/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/402/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Krause"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/Special:Contributions/Krause"/>
	<updated>2026-05-11T23:45:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=146510</id>
		<title>Installation Package for macOS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=146510"/>
		<updated>2023-08-14T05:46:03Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle packages for macOS]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
WARNING: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Apple M1/M2 or Intel x86_64 (i9, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: macOS 10.10 up to macOS 13.5&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for macOS]. You will find various image files for the different Moodle versions up to Moodle 4.0, 4.1, 4.2 and 4.3dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash. For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses an OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_401_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_402_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.3dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=146372</id>
		<title>Installation Package for macOS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=146372"/>
		<updated>2023-06-19T07:24:15Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Script control ... looking inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle packages for macOS]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
WARNING: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  M1/M2 or Intel x86_64 (i9, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: macOS 10.10 up to macOS 13.4&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for macOS]. You will find various image files for the different Moodle versions up to Moodle 4.0, 4.1, 4.2 and 4.3dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash. For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses an OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_401_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_402_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.3dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=146371</id>
		<title>Installation Package for macOS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=146371"/>
		<updated>2023-06-19T07:22:24Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Download and install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle packages for macOS]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
WARNING: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  M1/M2 or Intel x86_64 (i9, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: macOS 10.10 up to macOS 13.4&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for macOS]. You will find various image files for the different Moodle versions up to Moodle 4.0, 4.1, 4.2 and 4.3dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash. For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses an OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_401_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=146370</id>
		<title>Installation Package for macOS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=146370"/>
		<updated>2023-06-19T07:21:16Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle packages for macOS]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
WARNING: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  M1/M2 or Intel x86_64 (i9, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: macOS 10.10 up to macOS 13.4&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for macOS]. You will find various image files for the different Moodle versions up to Moodle 4.0, 4.1, and 4.2dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash. For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses an OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_401_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=145562</id>
		<title>Installation Package for macOS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=145562"/>
		<updated>2023-02-28T08:23:34Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle packages for macOS]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
WARNING: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  M1/M2 or Intel x86_64 (i9, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: macOS 10.10 up to macOS 13.1&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for macOS]. You will find various image files for the different Moodle versions up to Moodle 4.0, 4.1, and 4.2dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash. For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses an OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_401_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=145154</id>
		<title>Installation Package for macOS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=145154"/>
		<updated>2022-12-03T14:59:19Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Script control ... looking inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle packages for macOS]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
WARNING: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  M1/N2 or Intel x86_64 (i9, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: macOS 10.10 up to macOS 13.1&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for macOS]. You will find various image files for the different Moodle versions up to Moodle 4.0, 4.1, and 4.2dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash. For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses an OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_401_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=145153</id>
		<title>Installation Package for macOS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=145153"/>
		<updated>2022-12-03T14:56:20Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle packages for macOS]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
WARNING: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  M1/N2 or Intel x86_64 (i9, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: macOS 10.10 up to macOS 13.1&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for macOS]. You will find various image files for the different Moodle versions up to Moodle 4.0, 4.1, and 4.2dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash. For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses an OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=145152</id>
		<title>Installation Package for macOS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_macOS&amp;diff=145152"/>
		<updated>2022-12-03T14:53:50Z</updated>

		<summary type="html">&lt;p&gt;Krause: Created page with &amp;quot;{{Installing Moodle}} ==Summary== The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, deskto...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
WARNING: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  M1/N2 or Intel x86_64 (i9, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: macOS 10.10 up to macOS 13.1&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions up to Moodle 4.0 and Moodle 4.1dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses an OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=145151</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=145151"/>
		<updated>2022-12-03T14:53:37Z</updated>

		<summary type="html">&lt;p&gt;Krause: Redirected page to Installation Package for macOS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#redirect[[Installation Package for macOS]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=145150</id>
		<title>Complete Install Packages for Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Complete_Install_Packages_for_Mac_OS_X&amp;diff=145150"/>
		<updated>2022-12-03T14:50:28Z</updated>

		<summary type="html">&lt;p&gt;Krause: Changed redirect target from Installation Package for OS X to Installation Package for macOS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Installation Package for macOS]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für macOS]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Talk:Email_setup_gmail&amp;diff=143995</id>
		<title>Talk:Email setup gmail</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Talk:Email_setup_gmail&amp;diff=143995"/>
		<updated>2022-08-06T11:41:34Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Gmail SMTP does not work anymore for Moodle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Gmail SMTP does not work anymore for Moodle ==&lt;br /&gt;
I found that my Moodle test server does not sent emails anymore since June 2022.&lt;br /&gt;
&lt;br /&gt;
Ralf Krause&lt;br /&gt;
&amp;lt;br&amp;gt;moodleSCHULE e.V.&lt;br /&gt;
&amp;lt;br&amp;gt;Germany&lt;br /&gt;
&lt;br /&gt;
== Moodle 2.3 Tested ==&lt;br /&gt;
Today 1st Aug 2012 I have tested tested setting secure SMTP with Gmail and it works perfectly without an issue.&lt;br /&gt;
I have made changes to the Wiki to outline what needs to be done. --[[User:Kyle Goslin|Kyle Goslin]]&lt;br /&gt;
&lt;br /&gt;
:Great work Kyle, thanks a lot :-) --[[User:Helen Foster|Helen Foster]] 23:19, 1 August 2012 (WST)&lt;br /&gt;
&lt;br /&gt;
== Edit for Amazon SES instructions? ==&lt;br /&gt;
&lt;br /&gt;
I can adapt these to work with amazon SES can I create a new page or edit this article to be more generally about hosted email solutions?&lt;br /&gt;
&lt;br /&gt;
:Ben, thanks for offering to add Amazon SES instructions. Please feel free to create a new page for it. --[[User:Helen Foster|Helen Foster]] 19:43, 17 April 2012 (WST)&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Talk:Email_setup_gmail&amp;diff=143994</id>
		<title>Talk:Email setup gmail</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Talk:Email_setup_gmail&amp;diff=143994"/>
		<updated>2022-08-06T11:41:03Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Gmail SMTP does not work anymore for Moodle ==&lt;br /&gt;
I found that my Moodle test server does not sent emails anymore since June 2022.&lt;br /&gt;
&lt;br /&gt;
Ralf Krause&lt;br /&gt;
moodleSCHULE e.V.&lt;br /&gt;
Germany&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Moodle 2.3 Tested ==&lt;br /&gt;
Today 1st Aug 2012 I have tested tested setting secure SMTP with Gmail and it works perfectly without an issue.&lt;br /&gt;
I have made changes to the Wiki to outline what needs to be done. --[[User:Kyle Goslin|Kyle Goslin]]&lt;br /&gt;
&lt;br /&gt;
:Great work Kyle, thanks a lot :-) --[[User:Helen Foster|Helen Foster]] 23:19, 1 August 2012 (WST)&lt;br /&gt;
&lt;br /&gt;
== Edit for Amazon SES instructions? ==&lt;br /&gt;
&lt;br /&gt;
I can adapt these to work with amazon SES can I create a new page or edit this article to be more generally about hosted email solutions?&lt;br /&gt;
&lt;br /&gt;
:Ben, thanks for offering to add Amazon SES instructions. Please feel free to create a new page for it. --[[User:Helen Foster|Helen Foster]] 19:43, 17 April 2012 (WST)&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Talk:Language_settings&amp;diff=143992</id>
		<title>Talk:Language settings</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Talk:Language_settings&amp;diff=143992"/>
		<updated>2022-08-05T10:38:50Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Language selection priority===&lt;br /&gt;
&lt;br /&gt;
This figure shows Moodle priority when selecting languages and should help you understand the relationship of the various settings for Site, Course, and User.&lt;br /&gt;
&lt;br /&gt;
[[File:mdl_lang_selection_priority.png|640px|Moodle language selection priority]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Dead links===&lt;br /&gt;
Do you want something like this? https://www.shellhacks.com/linux-define-locale-language-settings/ or this https://www.tecmint.com/set-system-locales-in-linux/&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Talk:Language_settings&amp;diff=143991</id>
		<title>Talk:Language settings</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Talk:Language_settings&amp;diff=143991"/>
		<updated>2022-08-05T10:38:13Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Language selection priority */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Language selection priority===&lt;br /&gt;
&lt;br /&gt;
This figure shows Moodle priority when selecting languages and should help you understand the relationship of the various settings for Site, Course, and User.&lt;br /&gt;
&lt;br /&gt;
[[File:mdl_lang_selection_priority.png|640px|Moodle language selection priority]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Dead links===&lt;br /&gt;
Do you want something like this?&lt;br /&gt;
https://www.shellhacks.com/linux-define-locale-language-settings/&lt;br /&gt;
https://www.tecmint.com/set-system-locales-in-linux/&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143827</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143827"/>
		<updated>2022-07-17T09:56:10Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
WARNING: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  M1 or Intel x86_64 (i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8 up to macOS 12.4&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions up to Moodle 4.0 and Moodle 4.1dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses an OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143826</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143826"/>
		<updated>2022-07-17T09:48:19Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  M1 or Intel x86_64 (i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8 up to macOS 12.4&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions up to Moodle 4.0 and Moodle 4.1dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses an OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143254</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143254"/>
		<updated>2022-04-24T15:36:17Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Script control ... looking inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (M1, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8 up to macOS 12.3.1&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions up to Moodle 4.0 and Moodle 4.1dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143253</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143253"/>
		<updated>2022-04-24T15:13:25Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Download and install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (M1, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8 up to macOS 12.3.1&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions up to Moodle 4.0 and Moodle 4.1dev. The pictures in this manual are made with Moodle 2.8 ... please don&#039;t worry!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143252</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143252"/>
		<updated>2022-04-24T15:08:55Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Download and install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (M1, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8 up to macOS 12.3.1&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; With newer versions of macOS you will get an error message that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the &#039;&#039;&#039;System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General&#039;&#039;&#039; and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:Moodle4Mac_4a.png&amp;diff=143251</id>
		<title>File:Moodle4Mac 4a.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:Moodle4Mac_4a.png&amp;diff=143251"/>
		<updated>2022-04-24T15:05:53Z</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/402/en/index.php?title=File:security-and-privacy-2.png&amp;diff=143250</id>
		<title>File:security-and-privacy-2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:security-and-privacy-2.png&amp;diff=143250"/>
		<updated>2022-04-24T15:04:22Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Moodle4Mac_4a.png&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:security-and-privacy-2.png&amp;diff=143249</id>
		<title>File:security-and-privacy-2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:security-and-privacy-2.png&amp;diff=143249"/>
		<updated>2022-04-24T15:00:55Z</updated>

		<summary type="html">&lt;p&gt;Krause: Moodle4Mac-4a.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Moodle4Mac-4a.png&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143248</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143248"/>
		<updated>2022-04-24T14:59:32Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Download and install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (M1, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8 up to macOS 12.3.1&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; With newer versions of macOS you will get an error that the apps httpd, php, or mysqld can not be started because the developer can not be verified. Yes, this could be a problem. The MAMP package normally will be installed by an installer and not by moving a folder. So please open the System Preferences &amp;gt; Security &amp;amp; Privacy &amp;gt; General and unlock the settings. While the MAMP app starts up the apps httpd, php, and mysqld will ask to be allowed to start. Please allow. You only need to do this at the first start of MAMP.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_4a.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143247</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143247"/>
		<updated>2022-04-24T14:41:58Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (M1, i7, i5, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8 up to macOS 12.3.1&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143241</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143241"/>
		<updated>2022-04-23T10:05:26Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core 2 Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8 up to macOS 11.6.5&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143240</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=143240"/>
		<updated>2022-04-23T10:02:58Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Script control ... looking inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core 2 Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8 up to macOS 11.6.2&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_400_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.1dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=142784</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=142784"/>
		<updated>2022-01-11T19:54:35Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for macOS are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core 2 Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8 up to macOS 11.6.2&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=142783</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=142783"/>
		<updated>2022-01-11T19:52:41Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple macOS Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core 2 Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8 up to macOS 11.6.2&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx, 172.xxx, or 192.168.xxx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20220111 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE https://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_32_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_33_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_34_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_35_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_36_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_37_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_38_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_39_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.10 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_310_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.11 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_311_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 4.0dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Upload_users&amp;diff=137532</id>
		<title>Upload users</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Upload_users&amp;diff=137532"/>
		<updated>2020-06-30T17:07:49Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Optional user fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Accounts}}&lt;br /&gt;
==Uploading users via text file==&lt;br /&gt;
&lt;br /&gt;
There are many options for uploading information (fields associated with a user) with this method: from enrolling users in multiple courses with course specific [[Roles|roles]] to updating user information in the [[User profile]] to deleting users from the site.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip:&#039;&#039; It is usually not necessary to upload users in bulk with Upload users. To keep maintenance work down you should first explore forms of authentication that do not require manual maintenance, such as [[External database authentication|connecting to existing external databases]] or letting the users create their own accounts ([[Self enrolment]]). See [[Authentication]] for more information.&lt;br /&gt;
&lt;br /&gt;
{{MediaPlayer | url = https://youtu.be/blUw-ZbhFqw| desc = How to bulk upload users and add to courses}}&lt;br /&gt;
&lt;br /&gt;
==File formats for upload users file==&lt;br /&gt;
The upload users file has fields separated by a comma (or other delimiter) ONLY - no space.   The first line contains the valid field names.  The rest of the lines (records) contain information about each user.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip:&#039;&#039; Avoid special characters in field information like quotes or other commas. Test a file with only one record before a large upload.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip:&#039;&#039; You can use a spread sheet program to create the file with the required columns and fields. Then save the file as &amp;quot;CSV (comma delimited)&amp;quot;. These files can be opened with simple text editors (eg, [https://notepad-plus-plus.org/ Notepad++]) for verification. &lt;br /&gt;
&lt;br /&gt;
===Valid upload file for testing===&lt;br /&gt;
&lt;br /&gt;
*From Site administration / Users / Upload users, an example text (.csv) file is available. It includes can be downloaded and adapted to your needs. &lt;br /&gt;
&lt;br /&gt;
username,firstname,lastname,email&lt;br /&gt;
&lt;br /&gt;
student1,Student,One,s1@example.com&lt;br /&gt;
&lt;br /&gt;
student2,Student,Two,s2@example.com&lt;br /&gt;
&lt;br /&gt;
student3,Student,Three,s3@example.com&lt;br /&gt;
&lt;br /&gt;
*Additional fields can be added as below. The course and cohort must already have been manually created.&lt;br /&gt;
&lt;br /&gt;
username,firstname,lastname,email,course1,group1,cohort1&lt;br /&gt;
&lt;br /&gt;
student1,Student,One,s1@example.com,math102,groupA,cohortZ&lt;br /&gt;
&lt;br /&gt;
student2,Student,Two,s2@example.com,math102,groupB,cohort Y&lt;br /&gt;
&lt;br /&gt;
student3,Student,Three,s3@example.com,math102,groupA,cohortZ&lt;br /&gt;
&lt;br /&gt;
== User Fields that can be included==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip:&#039;&#039; We strongly recommend that you test a file that contains fields you proposed to use with one user before attempting a file upload for the first time. &lt;br /&gt;
&lt;br /&gt;
===Required fields=== &lt;br /&gt;
&lt;br /&gt;
These are the required user identification fields:&lt;br /&gt;
&amp;lt;code&amp;gt;username,firstname,lastname,email&amp;lt;/code&amp;gt;&lt;br /&gt;
Validity checks are performed for:&lt;br /&gt;
* &#039;&#039;&#039;username&#039;&#039;&#039; can only contain alphabetical &#039;&#039;&#039;lowercase&#039;&#039;&#039; letters , numbers, hypen &#039;-&#039;, underscore &#039;_&#039;, period &#039;.&#039;, or at-sign &#039;@&#039; &lt;br /&gt;
* &#039;&#039;&#039;email&#039;&#039;&#039; is in the form: &#039;&#039;name@example.com&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Passwords===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;password&amp;quot; field is optional if the &#039;New user password&#039; setting on the upload screen is set to &amp;quot;Create password if needed and send via email&amp;quot;  but is required if the setting is &amp;quot;Field required in file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If included, values should meet the requirements for the site&#039;s [[Site_policies#Password_policy|Password policy]]. &lt;br /&gt;
&lt;br /&gt;
To force password change for a particular user, set the password field to &#039;&#039;&#039;changeme&#039;&#039;&#039;. If omitted, a password will be generated for each user (during the next Cron job) and welcome e-mails sent out. The text for the welcome e-mail is in the language settings in &#039;&#039;Site administration &amp;gt; Language &amp;gt; Language customisation&#039;&#039;  with a String identifier of &#039;newusernewpasswordtext&#039;.&lt;br /&gt;
&lt;br /&gt;
===Optional user fields===&lt;br /&gt;
&lt;br /&gt;
Note: Commas within  a field must be encoded as &amp;amp;#44 - the script will decode these back to commas.&lt;br /&gt;
Tip: For Boolean fields with only two values, use &#039;&#039;&#039;0&#039;&#039;&#039; for false and &#039;&#039;&#039;1&#039;&#039;&#039;for true. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To provide values other than the default you can include one or more of these optional user fields:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;institution,department,city,country,lang,auth,timezone,idnumber,icq,phone1,phone2,address,url,description,mailformat,maildisplay,maildigest,htmleditor,autosubscribe,interests,theme&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of the these are user profile fields or user preference fields that belong to the user profile and are the filled in the user or at manual creation. Some however require specific formats:&lt;br /&gt;
&lt;br /&gt;
See [[Additional name fields]] for more details. Key things to note are:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;country&#039;&#039;&#039; - use the country TWO LETTER CODE, in upper case, eg AU,ES,GB,US. These are all UPPER CASE. Using &amp;quot;au&amp;quot; or &amp;quot;es&amp;quot; or &amp;quot;USA&amp;quot; as a country code will result in a database error. If you are having trouble working out the two-letter code for a country, you can consult the list of [https://www.iso.org/obp/ui/#search country names and code elements] available on the ISO Website. A common error is to use UK for United Kingdom; it should be GB.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;lang&#039;&#039;&#039; - use the two letter (or extended four lettter) code as defined in the Moodle language packs, e.g. en, es, en_us, de, in &#039;&#039;Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;auth&#039;&#039;&#039; - The auth field must be used if the site uses an alternative authentication method, such as LDAP, as otherwise the authentication method will default to manual and users using a different auth method won&#039;t be able to log in. &lt;br /&gt;
Use the shortname codes defined in Plugins &amp;gt; Authentication for the various types, e.g. manual, nlogin, ldap, cas, mnet, db, none. If you do not include an auth column, then newly created users will be created with the manual account type.&lt;br /&gt;
&lt;br /&gt;
You can set &amp;quot;auth&amp;quot; to &amp;quot;nologin&amp;quot; in your csv file which will mean that then created users cannot login.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;timezone&#039;&#039;&#039; - Should be in the format as found in the Location settings in terms of Zone/Region, eg. Australia/Sydney, Asia/Kathmandu, Europe/Madrid, etc. The entry is case sensitive so Europe/London will work but europe/london will not.&lt;br /&gt;
&lt;br /&gt;
NOTE: Needed: settings for &#039;&#039;&#039;mailformat&#039;&#039;&#039;,&#039;&#039;&#039;maildisplay&#039;&#039;&#039;,&#039;&#039;&#039;htmleditor&#039;&#039;&#039;,&#039;&#039;&#039;autosubscribe&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;maildigest&#039;&#039;&#039; To prevent users from receiving a large number of emails from courses or forced subscription forums use the &#039;&#039;&#039;maildigest&#039;&#039;&#039;.  The options for this field are 0 = No digest, 1 = Complete digest and 2 = Digest with just subjects.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;maildisplay&#039;&#039;&#039; allows you to set the email display option for a user. The options for this field are 0 = Hide my email address from non-privileged users, 1 = Allow everyone to see my email address and 2 = Allow only other course members to see my email address.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;theme&#039;&#039;&#039; User themes may be added by using &#039;classic&#039;, &#039;boost&#039; or the name of any other installed theme. The value should be the short name of the theme, e.g &#039;boost&#039; not &#039;Boost&#039;, &#039;fordson&#039; not &#039;Fordson&#039;.&lt;br /&gt;
&lt;br /&gt;
===Custom profile field names===&lt;br /&gt;
&lt;br /&gt;
These are optional and depend on whether you have created any custom profile fields in your site. The name of the header in file is of the form &#039;profile_field_xxxxx&#039; where xxxx is the unique shortname of custom user profile field name as you created it. &lt;br /&gt;
&lt;br /&gt;
The field name should match the case of the profile field shortname. So, for instance if the shortname of your custom profile field is all upper case, for example, &#039;&#039;DOB&#039;&#039;, then use a header of &#039;&#039;profile_field_DOB&#039;&#039; to match the case, not &#039;&#039;profile_field_dob&#039;&#039;, which will produce a &amp;quot;is not a valid field name&amp;quot; error. Likewise, a mixed case shortname such as &#039;&#039;Dob&#039;&#039; should have a header of &#039;&#039;profile_field_Dob&#039;&#039;. (The exception to this is if the shortname is all lower case, then any case will work in the field header, which is a historical quirk: but best practice is to match the case and you will avoid errors.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;profile_field_xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;: To create a custom field &amp;quot;genre&amp;quot;, you must write a shortname &amp;quot;genre&amp;quot; in the new field, and write &amp;quot;profile_field_genre&amp;quot; in the header of the .csv file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For custom profile fields that are dates, use the ISO standard format YYYY-MM-DD, eg. 2014-06-19 which will then be properly localized in the interfaced. For example, a field called dohire for date of hire, the fields could be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username,firstname,lastname,email,profile_field_dohire&lt;br /&gt;
blumbergh,Bill,Lumbergh,blumbergh@example.com,1990-02-19&lt;br /&gt;
pgibbons,Peter,BGibbons,pgibbons@example.com,1996-06-05&lt;br /&gt;
tsmykowski,Tom,Smykowski,tsmykowski@example.com,1970-01-01 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For custom profile fields that are a menu, use the corresponding value in the menu list from field as you defined it. For example: a custom field &#039;corporatedivision&#039; with one of three values &#039;Management&#039;, &#039;Development&#039; or &#039;Training&#039;. Just insert one of those three words (e.g. &#039;Training&#039;) as the value for that field. Eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username,firstname,lastname,email,profile_field_corporatedivision&lt;br /&gt;
blumbergh,Bill,Lumbergh,blumbergh@example.com,Management&lt;br /&gt;
pgibbons,Peter,BGibbons,pgibbons@example.com,Development&lt;br /&gt;
tsmykowski,Tom,Smykowski,tsmykowski@example.com,Training &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Special user change fields===&lt;br /&gt;
&lt;br /&gt;
Three special fields are used for managing user accounts, &#039;&#039;&#039;oldusername&#039;&#039;&#039;, &#039;&#039;&#039;deleted&#039;&#039;&#039; and &#039;&#039;&#039;suspended&#039;&#039;&#039;.  [[#Allow_renames|See below for details]].&lt;br /&gt;
&lt;br /&gt;
===Enrolment fields===&lt;br /&gt;
&lt;br /&gt;
You may optionally enrol users in already existing courses using manual enrolment. Only manual enrolment is done this way; if the manual enrolment method is disabled in a course, then no enrol is done.&lt;br /&gt;
&lt;br /&gt;
You use fields in the upload file of this type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;course1,type1,role1,group1,enroltimestart1,enrolperiod1,enrolstatus1,course2,type2,role2,group2,enroltimestart2,enrolperiod2,enrolstatus2&amp;lt;/pre&amp;gt; etc.&lt;br /&gt;
&lt;br /&gt;
Header fields &#039;&#039;&#039;must&#039;&#039;&#039; have a numeric suffix such that type1,role1,group1,enrolperiod1 and enrolstatus1 all apply to course1 for course&#039;&#039;&#039;1&#039;&#039;&#039; to course&#039;&#039;&#039;n&#039;&#039;&#039;. Even if you are just doing one course enrolment, you must still use the number 1 on the heading name, i.e. course1,role1, etc. Do not use the bare headings without numbers, e.g. course,role, etc as those will generate an error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;course#&#039;&#039;&#039; is the shortname of the course, if present the user will be enrolled in that course. Do not use the fullname of the course or it will generate an error. This field is the ONLY required field for a succesful enrolment. All the others are optional. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;type#&#039;&#039;&#039; sets the role to be used for the enrolment. A value of 1 is default course role,  2 is legacy Teacher role and 3 is legacy Non-editing Teacher.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;role#&#039;&#039;&#039; may be used to specify roles directly, using either role short name or the role id (numeric names of roles are not supported). Usually you will use the role name that is the shortname of the role as defined in Users &amp;gt;  Permissions &amp;gt; Define roles, eg. student, editingteacher. If the role column is left out, the users will be enroled in the course with the default role, which is normally student.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;group#&#039;&#039;&#039; may be used to assign users to groups in course, using name or id (numeric group names are not supported). NOTE: if the group does not already exist, it will be created.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enroltimestart#&#039;&#039;&#039; may be used to set the enrolment start time, for each course. If not explicitly set here, the enrolment start time is set to be today.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enrolperiod#&#039;&#039;&#039; may be used to set the enrolment duration, in days, for each course. If not explicitly set here, all the users will get the duration as set in the Manual enrolment method of the course (which defaults to 0 meaning unlimited.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enrolstatus#&#039;&#039;&#039; is optional as by default all newly enrolled users are set to active. If used a value of 1, it will suspend users in the course and if a user is previously set as inactive / suspended then a value of 0 will unsuspend them and make them active again.&lt;br /&gt;
&lt;br /&gt;
=== Cohort membership assignment===&lt;br /&gt;
&lt;br /&gt;
You can assign users to any already existing Cohort by using only the &amp;quot;username&amp;quot; and the &amp;quot;Cohort ID&amp;quot; with just two fields in the file. Note that this is an exception to the usual case where the firstname, lastname and email address of the user are required.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;cohort#&#039;&#039;&#039; is the form to use and like enrolment in courses, you have to add a number to each header, so cohort1,cohort2, etc.&lt;br /&gt;
&lt;br /&gt;
Internal cohort id numbers or non-numeric Cohort IDs of existing cohorts must be used; do not use the full name are not allowed. (Note that cohort id is what is usually known elsewhere as the &amp;quot;shortname&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Here is a sample CSV file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
username,cohort1,cohort2&lt;br /&gt;
student1,nursing,2016class&lt;br /&gt;
student2,nursing,2014class&lt;br /&gt;
student3,nursing,2014class&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MNet ===&lt;br /&gt;
&lt;br /&gt;
Existing [[MNet]]users can be added to courses, groups or cohorts as below by using the field header &#039;&#039;&#039;mnethostid&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#enrolling to courses: username+mnethostid+course required&lt;br /&gt;
#adding to group: username+mnethostid+course+group required&lt;br /&gt;
#adding to cohort: username+mnethostid+cohort required&lt;br /&gt;
#suspending/reviving accounts: username+mnethostid+suspended required&lt;br /&gt;
&lt;br /&gt;
All other operations are ignored. You can not add users, delete them or update them (such as change names or email, profile fields, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Set system roles ===&lt;br /&gt;
Users may also be assigned to already defined system roles, using the shortname of the system role as defined in &#039;&#039;Site administration &amp;gt; Users &amp;gt; Permissions &amp;gt; Define roles&#039;&#039; for roles with a system context defined.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sysrole1,sysrole2,sysrole3&amp;lt;/code&amp;gt; etc&lt;br /&gt;
&lt;br /&gt;
Users may be uploaded to a system role (usually Manager or Course creator)  by entering the shortname of that role. Other roles can only be uploaded if they have already been assigned in the &#039;system&#039; context. See [[Creating custom roles]]. Multiple roles can be assigned using sysrole2, sysrole3, etc. fields. Note that the number suffix in no way relates to the number suffixes on the enrolment fields. The numbers must go up in sequence starting at 1.&lt;br /&gt;
&lt;br /&gt;
Unassigning system roles&lt;br /&gt;
Users can also be removed from a given system role by entering the shortname of that role prefixed with a minus symbol: &#039;-&#039;. If the user is currently assigned to that role, they are removed from it. If the user is not currently assigned to that system role, the field value is ignored. However, the field value must refer to a system role that does exist on the system, otherwise an error will occur.&lt;br /&gt;
[[File:GlobalRoles1.png|thumb|500px|center|Example of a file for uploading users with global/system roles]]&lt;br /&gt;
&lt;br /&gt;
==Upload user process==&lt;br /&gt;
&lt;br /&gt;
# Create file for uploading&lt;br /&gt;
# Go to &#039;&#039;Site administration &amp;gt; Users &amp;gt; Accounts &amp;gt; Upload users&#039;&#039;&lt;br /&gt;
# Add file to upload&lt;br /&gt;
# Upload users preview - check settings and default user profile settings&lt;br /&gt;
# Upload users preview - click &amp;quot;Upload users&amp;quot;&lt;br /&gt;
# Upload users results - shows list of users, exceptions made in upload and summary of number of users&lt;br /&gt;
# Upload users results - click &amp;quot;Continue&amp;quot;&lt;br /&gt;
# Returns to Upload users screen&lt;br /&gt;
&lt;br /&gt;
==Updating users preview==&lt;br /&gt;
There are various settings to better control the desired upload behaviour. These settings are found on the &amp;quot;Upload users preview&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: errors updating existing accounts can affect your users badly. &#039;&#039;&#039;&#039;&#039;Be careful&#039;&#039;&#039;&#039;&#039; when using the options to update.&lt;br /&gt;
&lt;br /&gt;
====Upload type====&lt;br /&gt;
The Upload type specifies how to handle existing accounts.&lt;br /&gt;
&lt;br /&gt;
;Add new only, skip existing users : is the default Moodle upload type. It creates a new user account for each new record in the uploaded file. If an existing username is found in the uploaded file matches an existing username, that record is &#039;&#039;&#039;skipped&#039;&#039;&#039;. By skipping the existing user account, the data in the existing record is not touched (in contrast to the &amp;quot;Add new and update existing users&amp;quot; option) and a second new user account is &#039;&#039;&#039;not&#039;&#039;&#039; created (in contrast to the &amp;quot;Add all, append number to usernames if needed&amp;quot; option). &lt;br /&gt;
&lt;br /&gt;
;Add all, append number to usernames if needed : creates a new user account for each record in the uploaded file. If an existing user account is found, a new account will be created with a number appended to the username. For example, if a user account for username &#039;jsmith&#039; already exists and a new record in the uploaded file contains a record forusername &#039;jsmith&#039; an additional user account is created with a 1 &#039;&#039;&#039;appended&#039;&#039;&#039; to the username to produce user &#039;jsmith1&#039;. &lt;br /&gt;
&lt;br /&gt;
;Add  new and update existing users : creates a new user account for each new user in the upload file. If an existing user account with the same username is found, the account information is &#039;&#039;&#039;updated&#039;&#039;&#039; by the data in the uploaded file. &lt;br /&gt;
&lt;br /&gt;
;Update existing users only : ignores any new users found in the upload file and updates the user account if a matching username record is found in the uploaded file.&lt;br /&gt;
&lt;br /&gt;
====New user password====&lt;br /&gt;
When creating a new user account Moodle can create a new password (if one is not provided) or require a password in the uploaded file.&lt;br /&gt;
&lt;br /&gt;
;Create password if needed and send via email: creates a random default password for each new user account if one is not provided in the uploaded file, and emails the user their user information and new password.&lt;br /&gt;
&lt;br /&gt;
;Field required in file : requires that a password be provided in the uploaded file in order. If a password is not provided, an error is generated and the user account is not created. No notification of this user information or password is sent to the user.&lt;br /&gt;
&lt;br /&gt;
====Existing user details====&lt;br /&gt;
The Existing user details options are only available when the Upload type allows existing user accounts to be updated. It specifies how Moodle should process user detail information for existing users.&lt;br /&gt;
&lt;br /&gt;
;No changes : ignores user detail data in the uploaded and leaves the existing user account data unchanged.&lt;br /&gt;
;Override with file : overwrites data in the existing user account with the data provided in the uploaded file.&lt;br /&gt;
;Override with file and defaults : overwrites data in the existing user account with data provided in the uploaded file and fills in the default values for existing user details when no data is provided in the uploaded file.&lt;br /&gt;
;Fill in missing from file and defaults : adds data in the existing user account with data provided in the uploaded file if the field is empty (does not already contain data) and fills in the default values for existing user details when no data is provided in the uploaded file.&lt;br /&gt;
&lt;br /&gt;
====Existing user password====&lt;br /&gt;
The Existing user password option appears when you you have set the &amp;quot;Existing user details&amp;quot; setting to &amp;quot;Overwrite with file&amp;quot;. It specifies how to handle password data for existing user accounts, to change them or leave them as it. This is a bit of insurance to make sure that you really want to mass change user passwords.&lt;br /&gt;
&lt;br /&gt;
;No changes : ignores password field in the uploaded user file and leaves the existing user account password untouched&lt;br /&gt;
;Update : overwrites the existing user account password with the password provided in the uploaded file&lt;br /&gt;
&lt;br /&gt;
====Force password change====&lt;br /&gt;
The Force password change option specifies when to tag a user account so that the next login attempt will require the user to change the user&#039;s password.&lt;br /&gt;
&lt;br /&gt;
;Users having a weak password : If the user account has a weak password as defined by the site&#039;s [[Password_policy#Password_policy|Password policy]] then the user will be forced to change the password during the next login attempt. This option is not shown if there the site does not have a [[Password_policy#Password_policy|Password policy]]. &lt;br /&gt;
;None : None of the users in the uploaded file will be forced to change the password during the user&#039;s next login attempt.&lt;br /&gt;
;All : All of the users in the uploaded file will be forced to change the password during the user&#039;s next login attempt.&lt;br /&gt;
&lt;br /&gt;
====Allow renames====&lt;br /&gt;
If the uploaded file contains the special &#039;&#039;&#039;oldusername&#039;&#039;&#039; field, it is possible to rename a user from the &#039;&#039;&#039;oldusername&#039;&#039;&#039; to a new &#039;&#039;&#039;username&#039;&#039;&#039;. The default setting is to &#039;&#039;&#039;not&#039;&#039;&#039; allow renames. Keep in mind that renaming a user will require the user to use the new username when logging in.&lt;br /&gt;
;No : ignores the &#039;&#039;&#039;oldusername&#039;&#039;&#039; field and leaves the existing user account&#039;s username field unchanged.&lt;br /&gt;
;Yes : allows the existing user account&#039;s username to be changed by the data provided in the uploaded file&#039;s username field. The &#039;&#039;&#039;oldusername&#039;&#039;&#039; will be searched for and then updated with the data provided in the username column.&lt;br /&gt;
&lt;br /&gt;
====Allow deletes====&lt;br /&gt;
If the uploaded file contains the &#039;&#039;&#039;deleted&#039;&#039;&#039; special field, it is possible to use the upload file to delete existing user accounts. The default setting is to &#039;&#039;&#039;not&#039;&#039;&#039; allow deletes. Keep in mind that deleting a user account will prevent that user from logging in. As a protection, site administrator user accounts cannot be deleted with this method. &lt;br /&gt;
;No : ignores the &#039;&#039;&#039;deleted&#039;&#039;&#039; special field in the uploaded file and leaves the existing user account unchanged&lt;br /&gt;
;Yes : allows the existing user account to be deleted when the value of the of the &#039;&#039;&#039;deleted&#039;&#039;&#039; field is 1. &lt;br /&gt;
&lt;br /&gt;
====Allow suspending and activating of accounts====&lt;br /&gt;
If the uploaded file contains the &#039;&#039;&#039;suspended&#039;&#039;&#039; special field, it is possible to use the upload file to either suspend or make active (unsuspend) existing user accounts. The default setting is to allow suspending/activating of existing user accounts. Keep in mind that suspending an existing user account will prevent that user from logging in. &lt;br /&gt;
;Yes : allows the existing user account to be suspended when the value of the of the &#039;&#039;&#039;suspended&#039;&#039;&#039; field is 1. &lt;br /&gt;
;No : ignores the &#039;&#039;&#039;suspended&#039;&#039;&#039; special field in the uploaded file and leaves the existing user account status unchanged.&lt;br /&gt;
&lt;br /&gt;
====Prevent email address duplicates====&lt;br /&gt;
It is possible, but &#039;&#039;&#039;not&#039;&#039;&#039; recommended to upload users with duplicate email addresses. By default, uploading users with duplicate email addresses is prevented. To allow duplicate email addresses, go to Site administration ► Plugins ► Authentication ► Manage authentication. You can tick &amp;quot;Allow accounts with same email&amp;quot;. Then on the upload users screen you will be allowed to change the &amp;quot;Prevent email address duplicates&amp;quot; setting. &lt;br /&gt;
&lt;br /&gt;
However, doing this is not recommended for file uploads. Test thoroughly any user uploads before implementing.&lt;br /&gt;
&lt;br /&gt;
For more info, see the [[Managing_authentication#Allow_accounts_with_same_email|Managing authentication]] docs page&lt;br /&gt;
;Yes : prevents user accounts from being created from the uploaded if an existing user account already has the same email address as found in the uploaded file&#039;s  &#039;&#039;&#039;email&#039;&#039;&#039; column.&lt;br /&gt;
;No : allows user accounts to be created if an existing user account already has the same email address found in the uploaded file&#039;s  &#039;&#039;&#039;email&#039;&#039;&#039; column.&lt;br /&gt;
&lt;br /&gt;
====Standardise usernames====&lt;br /&gt;
Standardise usernames is used by default to convert the username to all lower case and to strip out illegal characters. It is possible to not standardise the usernames; however, doing so is &#039;&#039;&#039;not&#039;&#039;&#039; recommended.&lt;br /&gt;
;Yes : standardises usernames found in the uploaded file before updating existing or creating new user accounts so that the username contains only lowercase letters and numbers.&lt;br /&gt;
;No : skips standardising usernames found in the uploaded file so that the newly created or updated usernames will be exactly as they are in the uploaded file (&#039;&#039;&#039;not recommended&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
For those seeking a more technical explanation, the process for standardising the usernames consists of ensuring the characters are all UTF-8 (fix_utf8) encoded, converting the username to lower case, and then stripping out non-letters/non-number characters (unless &#039;&#039;Site administration &amp;gt; Security &amp;gt; Site policies &amp;gt; Allow extended characters in usernames&#039;&#039; is set on) with something similar to: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$username = preg_replace(&#039;/[^-\.@_a-z0-9]/&#039;, &#039;&#039;, $username);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Select for bulk user actions====&lt;br /&gt;
After the uploaded file has finished being processed (all new accounts have been created and existing accounts updated as specified by the previous settings), there is an option to select some of those user accounts to perform additional [[admin/user/user_bulk|bulk user actions]] such as &lt;br /&gt;
*Confirm user accounts created through Email-based self-registration which are not yet confirmed by the user&lt;br /&gt;
*Send a message (requires Messaging to be enabled)&lt;br /&gt;
*Delete user accounts&lt;br /&gt;
*Display a list of users on a page&lt;br /&gt;
*Download user data in text, ODS or Excel file format&lt;br /&gt;
*Force users to change their passwords&lt;br /&gt;
*Add users to a cohort&lt;br /&gt;
&lt;br /&gt;
By default, no users are selected for [[admin/user/user_bulk|bulk user actions]].&lt;br /&gt;
&lt;br /&gt;
;No : No users are selected for [[admin/user/user_bulk|bulk user actions]]&lt;br /&gt;
;New users : Only newly created users are selected for [[admin/user/user_bulk|bulk user actions]]&lt;br /&gt;
;Updated users : Only updated user accounts are selected for [[admin/user/user_bulk|bulk user actions]]&lt;br /&gt;
;All users : All users found (existing updated users and newly created user accounts) in the uploaded file are selected for [[admin/user/user_bulk|bulk user actions]]&lt;br /&gt;
&lt;br /&gt;
===Default values===&lt;br /&gt;
&lt;br /&gt;
You can provide default user values for some fields not included in the uploaded file. Some fields include:&lt;br /&gt;
&lt;br /&gt;
*Email display&lt;br /&gt;
*Forum auto-subscribe&lt;br /&gt;
*City/town&lt;br /&gt;
*ID number&lt;br /&gt;
*Institution&lt;br /&gt;
*Department&lt;br /&gt;
&lt;br /&gt;
By clicking the &#039;&#039;&#039;Show more....&#039;&#039;&#039; link, other default user profile fields will show up. You can set 17 different fields here, including the Authentication method, Country. Language, Timezone, as well as most other standard User profile fields.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other fields&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have created any custom profile fields for your users, they will show up here.&lt;br /&gt;
&lt;br /&gt;
==Upload user results ==&lt;br /&gt;
After accepting the preview settings by clicking on &amp;quot;Upload users&amp;quot;, you should see the the Upload users results screen.&lt;br /&gt;
[[File:Upload users results 2.0.JPG|thumb|center|The results screen; everything went well!]]&lt;br /&gt;
This screen will show you any exceptions or changes that were made to each user in the upload process.   For example if you were updating user information, the updated information will be shown. Or if a user was not added that record will be highlighted.&lt;br /&gt;
&lt;br /&gt;
The screen will summarize how many users were uploaded or updated, indicate the number of weak passwords and the number of errors.&lt;br /&gt;
&lt;br /&gt;
==Advanced potentials of Upload user==&lt;br /&gt;
===Templates===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: This section needs checking and updating if necessary for Moodle 2.0. Please do so and remove this note when finished.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The default values are processed as templates in which the following codes are allowed:&lt;br /&gt;
&lt;br /&gt;
* %l - will be replaced by the lastname&lt;br /&gt;
* %f - will be replaced by the firstname&lt;br /&gt;
* %u - will be replaced by the username&lt;br /&gt;
* %% - will be replaced by the %&lt;br /&gt;
&lt;br /&gt;
Between the percent sign (%) and any code letter (l, f or u) the following modifiers are allowed:&lt;br /&gt;
&lt;br /&gt;
* (-) minus sign - the information specified by the code letter will be converted to lowercase&lt;br /&gt;
* (+) plus sign - the information specified by the code letter will be converted to UPPERCASE&lt;br /&gt;
* (~) tilde sign - the information specified by the code letter will be converted to Title Case&lt;br /&gt;
* a decimal number - the information specified by the code letter will be truncated to that many characters&lt;br /&gt;
&lt;br /&gt;
For example, if the firstname is John and the lastname is Doe, the following values will be obtained with the specified templates:&lt;br /&gt;
&lt;br /&gt;
* %l%f = DoeJohn&lt;br /&gt;
* %l%1f = DoeJ&lt;br /&gt;
* %-l%+f = doeJOHN&lt;br /&gt;
* %-f_%-l = john_doe&lt;br /&gt;
*&amp;lt;nowiki&amp;gt; http://www.example.com/~%u/&amp;lt;/nowiki&amp;gt; results in  &amp;lt;nowiki&amp;gt;http://www.example.com/~jdoe/&amp;lt;/nowiki&amp;gt; (if the username is jdoe or %-1f%-l)&lt;br /&gt;
&lt;br /&gt;
Template processing is done only on default values, and not on the values retrieved from the CSV file.&lt;br /&gt;
&lt;br /&gt;
In order to create correct Moodle usernames, the username is always converted to lowercase. Moreover, if the &amp;quot;Allow extended characters in usernames&amp;quot; option in the Site policies page is off, characters different to letters, digits, dash (-) and dot (.) are removed. For example if the firstname is John Jr. and the lastname is Doe, the username %-f_%-l will produce john jr._doe when Allow extended characters in usernames is on, and johnjr.doe when off.&lt;br /&gt;
&lt;br /&gt;
When the &amp;quot;New username duplicate handling&amp;quot; setting is set to Append counter, an auto-increment counter will be append to duplicate usernames produced by the template. For example, if the CSV file contains the users named John Doe, Jane Doe and Jenny Doe without explicit usernames, the default username is %-1f%-l and New username duplicate handling is set to Append counter, then the usernames produced will be jdoe, jdoe2 and jdoe3.&lt;br /&gt;
&lt;br /&gt;
===Deleting accounts===&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;deleted&#039;&#039;&#039; field is present, users with value 1 for it will be deleted. In this case, all the fields may be omitted, except for &#039;&#039;&#039;username&#039;&#039;&#039;. After uploading the file, be sure to change the &amp;quot;Upload type&amp;quot; to &amp;quot;Update existing users only&amp;quot; and the &amp;quot;Allow deletes&amp;quot; option to &amp;quot;Yes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip:&#039;&#039;  A similar field is available for &#039;&#039;&#039;suspended&#039;&#039;&#039;. This enables a user account to be temporarily disabled rather than completely removed.&lt;br /&gt;
&lt;br /&gt;
Deleting and uploading accounts could be done with a single CSV file. For example, the following file will add the user Tom Jones and delete the user reznort:&lt;br /&gt;
&lt;br /&gt;
 username,firstname,lastname,deleted&lt;br /&gt;
 jonest,Tom,Jones,0&lt;br /&gt;
 reznort,,,1&lt;br /&gt;
&lt;br /&gt;
==Encoding file format==&lt;br /&gt;
On the initial Upload user screen, you may select the file encoding format from a pull down list.  These include UTF-8 (the default), ASCII,  ISO-8859-1 to ISO-8859-11 or any one of over 36 formats.&lt;br /&gt;
&lt;br /&gt;
==Hints==&lt;br /&gt;
&lt;br /&gt;
===Spreadsheet===&lt;br /&gt;
&lt;br /&gt;
If you use a spreadsheet program such as Excel to create your .csv file, check the resulting output in a text editor before you upload it.  It is possible to get trailing commas on each line from an empty field if you have added and deleted columns of information prior to saving the final file. Also check the character encoding. A csv file is a simple text file (ASCII or Unicode) that can be used to upload user accounts.&lt;br /&gt;
&lt;br /&gt;
Excel translates passwords that begin with - (minus) or + (plus) as zero. Even when saving as .csv and saying &amp;quot;Yes&amp;quot; to &amp;quot;Keep this format, and leave out any incompatible features.&amp;quot; Check for this before uploading, as a zero halts the upload process.&lt;br /&gt;
&lt;br /&gt;
If you use a formula in Excel to create fields (for example, the concatenate function to create a user name), then remember to copy the cells with the formula and use special paste with values checked to make them into an acceptable data for a csv file.&lt;br /&gt;
&lt;br /&gt;
The upload will also fail if you have trailing spaces at the end of your data fields. Often, this can not be removed with a simple Find &amp;quot; &amp;quot; and Replace with &amp;quot;&amp;quot;. If information has been copied from web sources than it is possible to include non-breaking spaces which will prevent your upload from being completed correctly. To find these invisible spaces, use the Find and Replace function in Excel. In the find field, hold alt and type 0160. Leave the replace field blank. &lt;br /&gt;
&lt;br /&gt;
===Field size limits===&lt;br /&gt;
Some fields have maximum character lengths, as defined in the database fields.  Typically the file will import to the preview list screen but not finish the process. Turn on debug to see the fields that are too long. The error will be &amp;quot;User not added - error&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The sizes of some common fields, in number of characters, are currently (3.2):&lt;br /&gt;
&lt;br /&gt;
*username - 100 	 &lt;br /&gt;
*password - 255 	 &lt;br /&gt;
*idnumber - 255 	 &lt;br /&gt;
*firstname - 100 	 &lt;br /&gt;
*lastname - 100 	 &lt;br /&gt;
*lastnamephonetic - 255 	 &lt;br /&gt;
*firstnamephonetic - 255 	 &lt;br /&gt;
*middlename - 255 	 &lt;br /&gt;
*alternatename - 255 &lt;br /&gt;
*institution -  255 	 &lt;br /&gt;
*department - 255 	 &lt;br /&gt;
*address - 255 	 &lt;br /&gt;
*city - 120 	 &lt;br /&gt;
*icq -15 	 &lt;br /&gt;
*skype - 50 	 &lt;br /&gt;
*yahoo - 50 	 &lt;br /&gt;
*aim - 50&lt;br /&gt;
*msn - 50 	 &lt;br /&gt;
*phone1 - 20 	 &lt;br /&gt;
*phone2  - 20&lt;br /&gt;
&lt;br /&gt;
===All user fields listed here===&lt;br /&gt;
:All the user fields that are valid in an upload file are listed below, except for any custom fields you may have created (for which see below.)&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;firstname,lastname,username,email,password,auth,idnumber,institution,department,city,country,timezone,lang,mailformat,maildisplay,maildigest,htmleditor,autosubscribe,skype,msn,aim,yahoo,icq,phone1,phone2,address,url,description,descriptionformat,interests,oldusername,deleted,suspended,alternatename,lastnamephonetic,firstnamephonetic,middlename&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The enrolments into courses information are &amp;lt;pre&amp;gt;course1,type1,role1,group1,enrolperiod1,enrolstatus1&amp;lt;/pre&amp;gt; &lt;br /&gt;
where each enrolment is grouped by number.&lt;br /&gt;
&lt;br /&gt;
===Capabilities===&lt;br /&gt;
&lt;br /&gt;
You may wish to create a limited role to allow some users access to this function. Create a role at the system/site level with the following capabilities allowed:&lt;br /&gt;
* moodle/site:uploadusers&lt;br /&gt;
* moodle/role:assign&lt;br /&gt;
&lt;br /&gt;
And &lt;br /&gt;
* In &#039;Allow role assignments&#039; tab of this new role, permit it to assign the required roles that it may be uploading, especially Student, but also Teacher, Non-editing Teacher, and any other custom roles you may have created, which will be used in the uploads to assign users to.&lt;br /&gt;
&lt;br /&gt;
In particular, don&#039;t forget the moodle/role:assign capability (even if these users have it in the courses they will be enrolling users in - it won&#039;t work).&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Flat file]] enrolment&lt;br /&gt;
* [[User profile fields]] for details of how to include data about custom user profile fields in the upload users file&lt;br /&gt;
* [[Upload courses]]&lt;br /&gt;
&lt;br /&gt;
Forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97903 Uploading users to custom roles]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=144569 Matriculacion con flat file csv] - discussion in Spanish&lt;br /&gt;
&lt;br /&gt;
[[fr:Importer des utilisateurs]]&lt;br /&gt;
[[ja:ユーザのアップロード]]&lt;br /&gt;
[[de:Nutzerliste hochladen]]&lt;br /&gt;
[[es:Subir usuarios]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Moodle_app&amp;diff=136644</id>
		<title>Moodle app</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Moodle_app&amp;diff=136644"/>
		<updated>2020-02-12T08:09:55Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main page}}{{Mobile}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
==On the move with Moodle==&lt;br /&gt;
[[File:Mobile orientation.png|thumb|Access your Moodle course on your mobile]]&lt;br /&gt;
&lt;br /&gt;
With the official mobile app for Moodle, you can&lt;br /&gt;
&lt;br /&gt;
* Browse the content of your courses, even when offline&lt;br /&gt;
* Receive instant notifications of messages and other events&lt;br /&gt;
* Quickly find and contact other people in your courses&lt;br /&gt;
* Upload images, audio, videos and other files from your mobile device&lt;br /&gt;
* Track your progress, mark tasks as complete and browse your learning plans&lt;br /&gt;
* Attempt quizzes, post in forums and edit wiki pages&lt;br /&gt;
* View your course grades&lt;br /&gt;
&lt;br /&gt;
... and lots more - see the full list of [[Moodle app features]].&lt;br /&gt;
&lt;br /&gt;
==Using the app==&lt;br /&gt;
&lt;br /&gt;
Note: The Moodle app will ONLY work with Moodle sites that have been set up to allow it. Site admins, please see the [[Moodle app guide for admins]].&lt;br /&gt;
&lt;br /&gt;
Links to download the app are available in the footer and user profile pages when mobile access is enabled:&lt;br /&gt;
&lt;br /&gt;
{{MediaPlayer | url = https://www.youtube.com/watch?v=wURqxr4eKs0 | desc = Video description}}&lt;br /&gt;
&lt;br /&gt;
Teachers, for info on improving your courses for access via the app, please see [[Creating Moodle-app-friendly courses]].&lt;br /&gt;
&lt;br /&gt;
==Staying up to date with new features and improvements==&lt;br /&gt;
&lt;br /&gt;
Follow [https://twitter.com/moodleapps @moodleapps on Twitter] for news, updates and release announcements and join the discussions in the [https://moodle.org/mod/forum/view.php?id=7798 Moodle for mobile forum] on moodle.org.&lt;br /&gt;
&lt;br /&gt;
See [[New for mobile]] and the [[:dev:Moodle Mobile release notes|Moodle app release notes]] for details of new features recently added.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Moodle app FAQ]]&lt;br /&gt;
* [[Moodle Desktop]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mobile]]&lt;br /&gt;
	&lt;br /&gt;
[[ca:Moodle Mobile]]&lt;br /&gt;
[[de:Mobiles Moodle]]&lt;br /&gt;
[[es:Moodle Mobile]]&lt;br /&gt;
[[fr:App Moodle]]&lt;br /&gt;
[[it:App Moodle]]&lt;br /&gt;
[[ja:モバイルアプリ]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Moodle_App_Block_support&amp;diff=136643</id>
		<title>Moodle App Block support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Moodle_App_Block_support&amp;diff=136643"/>
		<updated>2020-02-12T08:09:19Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
Blocks are supported on the App from 3.8 onwards.&lt;br /&gt;
This is the list of blocks supported on the app.&lt;br /&gt;
&lt;br /&gt;
== Only title blocks ==&lt;br /&gt;
Some blocks have a match with the app features. It will only display the title and they will link the app feature directly when clicked:&lt;br /&gt;
&lt;br /&gt;
* Calendar month&lt;br /&gt;
* Calendar upcoming&lt;br /&gt;
* Comments&lt;br /&gt;
* Completion status&lt;br /&gt;
* Learning plans&lt;br /&gt;
* Private files&lt;br /&gt;
* Self completion&lt;br /&gt;
&lt;br /&gt;
== Pre-rendered blocks ==&lt;br /&gt;
Some blocks displays likely the same content as in the website:&lt;br /&gt;
&lt;br /&gt;
* Badges&lt;br /&gt;
* Blog menu&lt;br /&gt;
* Blog recent&lt;br /&gt;
* Blog tags&lt;br /&gt;
* Glossary random&lt;br /&gt;
* HTML block&lt;br /&gt;
* News items&lt;br /&gt;
* Online Users&lt;br /&gt;
* Recent Activity&lt;br /&gt;
* RSS Client&lt;br /&gt;
* Tags&lt;br /&gt;
&lt;br /&gt;
== Full supported blocks ==&lt;br /&gt;
Some blocks have an specific treatment on the app, they&#039;ve been natively adapted:&lt;br /&gt;
&lt;br /&gt;
* Activity modules&lt;br /&gt;
* Site Main menu (Site home)&lt;br /&gt;
* Course overview (Dashboard)&lt;br /&gt;
* Timeline  (Dashboard)&lt;br /&gt;
* Starred Courses (Dashboard)&lt;br /&gt;
* Recent accessed items (Dashboard)&lt;br /&gt;
* Recent Courses (Dashboard)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[es:Soporte para Bloque en Moodle App]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Template:Mobile&amp;diff=136642</id>
		<title>Template:Mobile</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Template:Mobile&amp;diff=136642"/>
		<updated>2020-02-12T08:08:50Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Template:Mobile */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;navtrail&amp;quot;&amp;gt;[[Main page]] ► [[Managing a Moodle site]] ► [[Moodle app]] ► [[{{PAGENAME}}]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 14em;&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot;&amp;gt;[[Moodle app]]&amp;lt;/div&amp;gt;	&lt;br /&gt;
&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Moodle app features]]&lt;br /&gt;
* [[New for mobile]]&lt;br /&gt;
* [[Moodle app guide for admins]]&lt;br /&gt;
* [[Moodle app notifications]]&lt;br /&gt;
* [[Creating mobile-friendly courses]]&lt;br /&gt;
* [[Moodle App Block support]]&lt;br /&gt;
* [[Moodle Desktop]]&lt;br /&gt;
* [[Moodle app FAQ]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;[[Category:Mobile]]&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;This template will categorize articles that include it into [[:Category:Mobile]].&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Talk:Moodle_app_features&amp;diff=132796</id>
		<title>Talk:Moodle app features</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Talk:Moodle_app_features&amp;diff=132796"/>
		<updated>2018-12-13T09:06:00Z</updated>

		<summary type="html">&lt;p&gt;Krause: Created page with &amp;quot;Hi Juan, do we need the &amp;quot;Comparison of features in different versions&amp;quot; at the bottom of this page? I think, that nobody will still be using an older app. Ralf&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi Juan,&lt;br /&gt;
do we need the &amp;quot;Comparison of features in different versions&amp;quot; at the bottom of this page? I think, that nobody will still be using an older app.&lt;br /&gt;
Ralf&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Creating_mobile-friendly_courses&amp;diff=131139</id>
		<title>Creating mobile-friendly courses</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Creating_mobile-friendly_courses&amp;diff=131139"/>
		<updated>2018-06-02T17:47:44Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Learn more */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
As more and more students access courses from their smartphones, tablets or other mobile devices, it is increasingly important to ensure your courses are mobile-friendly.&lt;br /&gt;
&lt;br /&gt;
Encouraging students to install the [https://download.moodle.org/mobile/ official Moodle mobile app] is one way to improve their learning experience. Below are some suggestions for optimising your course materials for students both using the app and accessing Moodle from mobile devices.&lt;br /&gt;
&lt;br /&gt;
==Use a mobile-friendly theme==&lt;br /&gt;
&lt;br /&gt;
Recent versions of Moodle allow for responsive themes, which adapt to the browser screen size. Make sure your course uses such a theme and check its contents yourself before your students start the course.&lt;br /&gt;
&lt;br /&gt;
Please, notice that a responsive theme does not have any visual impact in the Mobile app.&lt;br /&gt;
&lt;br /&gt;
==Use the latest Moodle version available or the Moodle Mobile additional features plugin==&lt;br /&gt;
&lt;br /&gt;
As indicated in [[Moodle Mobile features]] some features are only available in recent Moodle versions.&lt;br /&gt;
&lt;br /&gt;
It is recommended to use the latest Moodle version or, if is not possible to upgrade your site, install the [[Moodle Mobile additional features]] plugin.&lt;br /&gt;
&lt;br /&gt;
==Notifications and messages==&lt;br /&gt;
&lt;br /&gt;
Encourage your students to enable mobile notifications so they are alerted about calendar events, forum posts, messages, assignment submissions and so on. Find out more in [[Mobile app notifications]].&lt;br /&gt;
&lt;br /&gt;
You can also enable mobile notifications for all the users by default via the [[Messaging settings]] default message outputs. Students can disable Mobile notifications within the app.&lt;br /&gt;
&lt;br /&gt;
==Provide a &#039;how to&#039; guide to Moodle on the mobile==&lt;br /&gt;
&lt;br /&gt;
Consider offering your students a guide (as a PDF or a page resource) on how to access your course on the app, what they can do and not (yet) do from the app. Read up on the [[Moodle Mobile features]] and what&#039;s [[New for mobile]].&lt;br /&gt;
&lt;br /&gt;
==Setting up your course==&lt;br /&gt;
&lt;br /&gt;
*Topics or weekly course format is best suited to mobile devices.&lt;br /&gt;
*Don&#039;t use orphaned activities or direct links to activities (the links will work but is not the best experience for mobile).&lt;br /&gt;
*If you have a mix of students accessing the course on mobile and desktop, consider asking your admin to install the [[Moodle Mobile availability plugin]] which restricts items to desktop or mobile users.&lt;br /&gt;
*Site or course blocks are not displayed in the Mobile app, avoid putting important information in blocks.&lt;br /&gt;
&lt;br /&gt;
==Course content==&lt;br /&gt;
&lt;br /&gt;
*Use responsive HTML in pages or mini-sites.&lt;br /&gt;
*Try to use a [[Page resource|page resource]] instead of downloadable documents where possible.&lt;br /&gt;
*Avoid uploading many documents or having numerous, text heavy pages. Think more in terms of short &amp;quot;information-bytes&amp;quot;.&lt;br /&gt;
*If you include YouTube videos, provide them also for download and offline viewing in a [[Folder resource|folder]]. Not all video formats are supported so add them in different formats. (MP4 is probably the most widely accepted format.)&lt;br /&gt;
*Drag and drop questions behave differently in the app. You can&#039;t drag images, you need to tap to select and tap to drop.&lt;br /&gt;
*Note that if you add YouTube video links or map links as URL resources, they will open automatically in the app.&lt;br /&gt;
{|&lt;br /&gt;
| [[File:moodlemobile_short_text_intro.png|thumb|Short text for label]]&lt;br /&gt;
| [[File:moodlemobile_responsive_html.png|thumb|Responsive HTML]]&lt;br /&gt;
| [[File:moodlemobile_youtube_maps_links.png|thumb|Map link]]&lt;br /&gt;
|}&lt;br /&gt;
* Use only plugins which provide support so they can be accessed via the mobile app - see [https://moodle.org/plugins/browse.php?list=award&amp;amp;id=6 Moodle plugins directory: Award: mobile app support].&lt;br /&gt;
* If you want to include large audio files in your course, please consider to included them embedded in a label or HTML page content instead as a file. The reason is that embedded files will play even if the screen is locked but files won&#039;t play with the screen locked.&lt;br /&gt;
&lt;br /&gt;
===Media download for offline usage===&lt;br /&gt;
&lt;br /&gt;
To enable media files, such as video, to be downloaded&lt;br /&gt;
&lt;br /&gt;
* The file must be uploaded to the course, rather than being linked to (from YouTube, Vimeo etc)&lt;br /&gt;
* The file must be small - less than 2MB for 3G users or less than 20MB for WiFi users&lt;br /&gt;
&lt;br /&gt;
When a page containing the video is viewed (without playing the video), the file will then be downloaded.&lt;br /&gt;
&lt;br /&gt;
When using Moodle Mobile 3.1 with a WiFi connection, when the video is played, the file will be downloaded in the background. The next time the video is played, the downloaded file will be used.&lt;br /&gt;
&lt;br /&gt;
===Offline activities===&lt;br /&gt;
&lt;br /&gt;
All the supported activities work offline, although some require specific settings like the quiz module, see [[Moodle Mobile quiz offline attempts]] for more information.&lt;br /&gt;
&lt;br /&gt;
=== Things to avoid===&lt;br /&gt;
&lt;br /&gt;
Some activities are not yet fully supported by the mobile app, so find alternatives. See [[Moodle Mobile SCORM player]] for things to avoid in SCORM packages.&lt;br /&gt;
&lt;br /&gt;
You can find the list of activities supported by the app in the [[Moodle Mobile features]] page.&lt;br /&gt;
&lt;br /&gt;
==Mobile device considerations==&lt;br /&gt;
&lt;br /&gt;
The app works better on devices running&lt;br /&gt;
* Android 4.4 onwards&lt;br /&gt;
* iOs 6 onwards&lt;br /&gt;
&lt;br /&gt;
In old devices you may find problems related to:&lt;br /&gt;
* User interface&lt;br /&gt;
* Connection problems (specifically when connecting to sites using https certificates)&lt;br /&gt;
* Slowness &lt;br /&gt;
&lt;br /&gt;
The first version of the app was supported in Windows Phone and Windows 7. This version is not supported anymore and it was withdrawn from the Windows Store. Its usage is not advised.&lt;br /&gt;
&lt;br /&gt;
==Links to open the Moodle Mobile app==&lt;br /&gt;
&lt;br /&gt;
If required, links which open the Moodle Mobile app may be provided in the course (for users browsing the site using a mobile device with the app installed).&lt;br /&gt;
&lt;br /&gt;
Links are of the form &amp;lt;code&amp;gt;moodlemobile://link=https://yourmoodlesite.org/mod/...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, the link &amp;lt;code&amp;gt;moodlemobile://link=https://mysite.es/mod/choice/view.php?id=8&amp;lt;/code&amp;gt; will open the mobile app and display a choice activity.&lt;br /&gt;
&lt;br /&gt;
==Learn more==&lt;br /&gt;
&lt;br /&gt;
* A &amp;quot;[http://mobile.moodlebites.com free Moodle Mobile MOOC]&amp;quot; run by [http://www.hrdnz.com HRDNZ] (Moodle Partner) twice a year, specifically focussing on the use of Moodle with mobile devices, and how to best design courses for these environments - including the Moodle Mobile App. &lt;br /&gt;
* [http://es.slideshare.net/juanleyva/tips-for-creating-moodle-mobile-friendly-courses-sites-moodlemoot-spain-2014 Tips for creating Moodle Mobile friendly courses and sites - MoodleMoot Spain 2014] - Juan Leyva, Mobile app developer,  presented this in 2014. While some features have now been updated, the general principles are still useful. &lt;br /&gt;
* An open course, about &amp;quot;[http://tempus-efa.proj.ac.il/moodle/course/view.php?id=102 Teaching using Mobile - Best practices]&amp;quot;&lt;br /&gt;
*Forum post: [https://moodle.org/mod/forum/discuss.php?d=349160 Try the Moodle Mobile app with a mobile-friendly course].&lt;br /&gt;
&lt;br /&gt;
[[de:Moodle Mobile - Websites optimieren]]&lt;br /&gt;
[[es:Crear sitios amistosos para Moodle Mobile]]&lt;br /&gt;
[[fr:Créer des cours pour appareils mobiles]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=125409</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=125409"/>
		<updated>2016-09-19T14:08:15Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple OS X Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core 2 Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8, 10.7, 10.8, 10.9, 10.10, 10.11&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[Language packs|language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx , 172.xxx , or 192.168.xx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20150511 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE git://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Moodle_app_notifications&amp;diff=124596</id>
		<title>Moodle app notifications</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Moodle_app_notifications&amp;diff=124596"/>
		<updated>2016-08-02T11:53:19Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
&lt;br /&gt;
==For students and teachers==&lt;br /&gt;
[[File:12Notifications.png|thumb|Forum post notification]]&lt;br /&gt;
The Moodle mobile app lets you keep up to date with all that&#039;s happening in your courses and on the site. Every time you open the app, events are synchronised with the main website.&lt;br /&gt;
&lt;br /&gt;
You will receive [[Calendar|Moodle calendar]] event notifications automatically. If you don&#039;t want to get them, you can turn them all off individually in the Calendar events options in the main menu.&lt;br /&gt;
&lt;br /&gt;
You will also receive notifications of messages, forum posts, submitted assignments etc (known as &#039;push notifications&#039;) if your site administrator has enabled these. To receive these notifications you need to enable them for your mobile on the main site, from the user menu top right &amp;gt;&#039;&#039;Preferences&amp;gt;Messaging.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==For administrators==&lt;br /&gt;
&lt;br /&gt;
Push notifications can be enabled by an administrator by connecting their Moodle site to a messaging server such https://messages.moodle.net (available for [[Site registration|registered Moodle sites]] only). An access key can be obtained via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Message outputs &amp;gt; Mobile Notifications&#039;&#039;. (If you have problems requesting the access key, please fill in the [http://goo.gl/forms/WLwkbe8b7c  Airnotifier access key manual request form]. Your site registration will be checked and you will be sent an access key in a few days if everything is correct.)&lt;br /&gt;
&lt;br /&gt;
Users then need to connect at least once with the latest version of the Moodle Mobile app in order to register their phones with the Moodle site.&lt;br /&gt;
&lt;br /&gt;
=== Event Reminders plugin===&lt;br /&gt;
&lt;br /&gt;
Push notifications can also include calendar event notifications, however this requires the [https://moodle.org/plugins/view/local_reminders Event Reminders plugin] to be installed on the Moodle site.&lt;br /&gt;
&lt;br /&gt;
The Event Reminders plugin will automatically send reminders for Moodle calendar events in a timely manner via Moodle message interface. It also allows users to control how they receive messages for each type of event in the Moodle calendar.&lt;br /&gt;
&lt;br /&gt;
=== Installing your own notifications infrastructure ===&lt;br /&gt;
&lt;br /&gt;
If you have a customized version of the Moodle Mobile app, or you want to use your own notifications infrastructure, you will have to install a private [http://airnotifier.github.io AirNotifier] (backend server for notifications).&lt;br /&gt;
&lt;br /&gt;
https://messages.moodle.net uses a slightly modified version of Airnotifier: https://github.com/moodlehq/airnotifier/tree/moodle2. &lt;br /&gt;
&lt;br /&gt;
You will have to add your app certificates - see https://github.com/airnotifier/airnotifier/wiki/Installation for further information.&lt;br /&gt;
&lt;br /&gt;
The Airnotifier message plugin allows you to point to your custom Airnotifier instance using your own access keys.&lt;br /&gt;
&lt;br /&gt;
Remember to install using GIT (repository https://github.com/moodlehq/airnotifier.git branch &#039;&#039;moodle2&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[de:Moodle Mobile - Benachrichtigungen]]&lt;br /&gt;
[[ca:Notificacions_de_la_app_Mobile]]&lt;br /&gt;
[[es:Mobile app Notificaciones Push]]&lt;br /&gt;
[[fr:Notifications de l&#039;app mobile]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=123776</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=123776"/>
		<updated>2016-05-24T08:03:35Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Download and install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple OS X Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8, 10.7, 10.8, 10.9, 10.10, 10.11&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[Language packs|language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx , 172.xxx , or 192.168.xx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20150511 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE git://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=123775</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=123775"/>
		<updated>2016-05-24T08:02:41Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple OS X Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 4 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8, 10.7, 10.8, 10.9, 10.10, 10.11&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[Language packs|language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx , 172.xxx , or 192.168.xx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20150511 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE git://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=123774</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=123774"/>
		<updated>2016-05-24T08:01:28Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Script control ... looking inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop or test server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle - the Apache web server, MySQL database and PHP scripting language. Packages are available for different Moodle versions. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
You can also install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and thus may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac packages also include a special Git update script, enabling you to easily update your Moodle site without needing to download the whole package again and without reinstalling all your courses. &lt;br /&gt;
&lt;br /&gt;
Note: Moodle4Mac is NOT intended to be used for a production server on the Internet. It is only intended for installation on a local computer to test and develop, as it is not optimized for security.&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple OS X Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 1 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8, 10.7, 10.8, 10.9, 10.10&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; from [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is in English only; other languages must be installed. For example, you may want to switch your site to German. The German standard package &#039;&#039;de&#039;&#039; translates all text strings to German, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
Additional [[Language packs|language packs]] may be imported via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Language &amp;gt; Language packs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German.&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customised system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. A snapshot of our Moodle site will be saved together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything has stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you need to create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory stick, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in the section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and then distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx , 172.xxx , or 192.168.xx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is prepared for an easy start and not for a public web server!! But with some careful modifications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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] (except for 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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20150511 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE git://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_30_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.1 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_31_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.2dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Moodle_app_FAQ&amp;diff=119384</id>
		<title>Moodle app FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Moodle_app_FAQ&amp;diff=119384"/>
		<updated>2015-07-26T09:23:45Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
== How can I use Moodle on mobile devices? ==&lt;br /&gt;
There are currently 3 main ways to use Moodle on mobile devices:&lt;br /&gt;
&lt;br /&gt;
* Users can open Moodle sites in their mobile web browsers.&lt;br /&gt;
* Users can download native apps for their mobile devices.&lt;br /&gt;
* Admins can configure their Moodle site to be Mobile-accessible through server extensions.&lt;br /&gt;
&lt;br /&gt;
=== Mobile Apps ===&lt;br /&gt;
* The official [[Mobile app]] developed by Juan Leyva with support from Jerome Mouneyrac, Moodle HQ and others.&lt;br /&gt;
* [http://www.moodletouch.com MoodleTouch] (aka &#039;&#039;mTouch&#039;&#039;) for iOS, created by Ali OzGur&lt;br /&gt;
* [http://mpage.hk/ mPage] for iOS and Android (work in progress), created by Mass Media HK&lt;br /&gt;
* [http://codeguild.org/app/mbot/ Mbot] for Android, created by Code Guild&lt;br /&gt;
* The [https://docs.moodle.org/23/en/Mobile_app My Moodle app] for iPhone, created by Moodle HQ (no longer being developed)&lt;br /&gt;
* [https://market.android.com/details?id=com.ivoid.droodle Droodle] - an Android client for the Moodle 2.1 platform&lt;br /&gt;
&lt;br /&gt;
=== Server-side ===&lt;br /&gt;
* [http://www.mobilemoodle.org/momo18/ MoMo] (Moodle for Mobiles) - Requires a server extension and a client app; supports most mobile OSes including Symbian.&lt;br /&gt;
* [http://code.google.com/p/moodbile/ Moodbile] - Reference implementation of Moodle Web Services. Under development.&lt;br /&gt;
* [http://iphone.moodle.com.au iPhone4Moodle] - Under development.&lt;br /&gt;
&lt;br /&gt;
==Where can I download the official Mobile app? ==&lt;br /&gt;
&lt;br /&gt;
Please, visit https://download.moodle.org/mobile/ for download links&lt;br /&gt;
&lt;br /&gt;
==How do I get the official Mobile app to work for my Moodle site?==&lt;br /&gt;
&lt;br /&gt;
Firstly, your Moodle site must be using Moodle 2.4 or later.&lt;br /&gt;
&lt;br /&gt;
Secondly mobile web services must be enabled. See [[Enable mobile web services]] for details. &lt;br /&gt;
&lt;br /&gt;
==Where can I select a theme for mobile devices?==&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;Site administration &amp;gt; Appearance &amp;gt; Themes &amp;gt; Theme selector&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
New in Moodle 2.2 onwards is the MyMobile theme especially designed for mobile devices. &lt;br /&gt;
&lt;br /&gt;
== I can&#039;t access my Moodle site using the app ==&lt;br /&gt;
&lt;br /&gt;
Notice that by default Mobile access is disabled in Moodle. The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access.&lt;br /&gt;
&lt;br /&gt;
Authentication methods like Shibboleth, CAS or LDAP/SSO are supported only using a Moodle add-one (See [[Moodle Mobile additional features]])&lt;br /&gt;
&lt;br /&gt;
You should verify also that Debugging and &amp;quot;Display debug messages&amp;quot; are disabled in your site (go to Administration / Development / Debugging for checking that options)&lt;br /&gt;
&lt;br /&gt;
If your site uses a SSL certificate it must be a trusted certificate. For security reasons the app doesn&#039;t work with self-signed certificates. There are some certificates entities that provides certificates not trusted by the Android browser (but trusted in desktop browsers) like GoDaddy and TERENA SSL CA. Here you can find a workaround/solution: https://moodle.org/mod/forum/discuss.php?d=268963#p1172128&lt;br /&gt;
&lt;br /&gt;
== Moodle Mobile app says I need 2.4 or higher ==&lt;br /&gt;
&lt;br /&gt;
The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access as follows:&lt;br /&gt;
&lt;br /&gt;
In Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Mobile tick the &#039;Enable web services for mobile devices&#039; checkbox, then click the button to save changes.&lt;br /&gt;
&lt;br /&gt;
Some Moodle sites uses special authentication methods like Shibboleth, CAS or LDAP/SSO that currently are not supported. See https://tracker.moodle.org/browse/MOBILE-113 for more information.&lt;br /&gt;
&lt;br /&gt;
==I can&#039;t view the courses tab as an administrator==&lt;br /&gt;
Moodle Mobile app is not suited for administrators ad the app displays only the courses you are enrolled in (not the courses you can see by capabilities).Note that the targeted user of the app is mainly a student or teacher.If you want to see the courses as an admin, you must be enrolled in the courses. You can use a non visible role or something similar.&lt;br /&gt;
&lt;br /&gt;
== What happened to the Mobile app remote translation feature? ==&lt;br /&gt;
&lt;br /&gt;
Remote translation is not available any more; this feature was removed because due to core changes in Moodle it never worked as expected.&lt;br /&gt;
&lt;br /&gt;
Language packs comes now with the app bundle. If you want to contribute a translation of the app you can do so on the [http://lang.moodle.org Moodle translation site]. The component name is local_moodlemobileapp. See the forum discussion [https://moodle.org/mod/forum/discuss.php?d=252704 Moodle Mobile translation to other languages] for more details.&lt;br /&gt;
&lt;br /&gt;
== I got the &amp;quot;we lost connection, you need to reconnect. Your token is now invalid.&amp;quot; on my custom version of Moodle Mobile ==&lt;br /&gt;
&lt;br /&gt;
Please, verify that you have followed all the steps here: https://docs.moodle.org/dev/Moodle_Mobile_Developing_a_plugin_tutorial#Set_up_your_Moodle_installation&lt;br /&gt;
&lt;br /&gt;
And also that you have enabled the moodle/webservice:createtoken capability for the Authenticated User Role at System Context&lt;br /&gt;
&lt;br /&gt;
== I got the error &amp;quot;Automatically token generation is not available to site administrators&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
This can be easily solved, administrators must create a token manually in Moodle (Plugins &amp;gt; Web Services &amp;gt; Manage tokens) for the local_mobile service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?id=7798 Moodle for mobile forum]&lt;br /&gt;
* Tracker area [http://tracker.moodle.org/browse/MOBILE Moodle for Mobiles]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=162872 Proposal for Supporting Mobile Themes and Browser Detection] forum discussion&lt;br /&gt;
* An open course, about &amp;quot;[http://tempus-efa.proj.ac.il/moodle/course/view.php?id=102 Teaching using Mobile - Best practices]&amp;quot;&lt;br /&gt;
* [http://www.moodlenews.com/mobile/ Moodle News - Mobile] - a breakdown of the mobile projects and products available&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[de:Moodle Mobile FAQ]]&lt;br /&gt;
[[es:Moodle para móviles FAQ]]&lt;br /&gt;
[[fr:Moodle pour les mobiles]]&lt;br /&gt;
[[ja:モバイルMoodle FAQ]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=118586</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=118586"/>
		<updated>2015-05-18T07:34:22Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop, server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. You will find other downloads for Linux and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle, the Apache web server, MySQL database and PHP scripting language. For the various Moodle versions you can get different installation packages. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
Of course, you can install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and that a development version may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is not intended to be used as a productive server on the Internet. It is only intended for installation on a local computer to test and develop. The configuration is not optimized for security. If you want to run Moodle on an OS X server connected to the internet, please read the instructions [https://docs.moodle.org/en/Step_by_Step_Installation_on_a_Mac_OS_X_Server Step by step installation on a OS X Server].&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple OS X Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 1 GB free&lt;br /&gt;
  + System Software: OS X 10.6.8, 10.7, 10.8, 10.9, 10.10&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; from the web site [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions on this web site.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is delivered in English, any other language must be loaded. The german standard package &#039;&#039;de&#039;&#039; translates all text strings to german, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
The direct link for the language import is http://localhost:8888/moodle28/admin/tool/langimport/&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German. Only it you change the setting you will find the german menus and german settings dialogs your Moodle. Of course, all text in the text boxes on the home page and in the two preloaded courses Moodle4Mac About and How to update as they were originally entered ... if you like, you can change these texts like ....&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customized system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. Your Moodle will be frozen together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you will create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and you can distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx , 172.xxx , or 192.168.xx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
&lt;br /&gt;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is 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. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20150511 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE git://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&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.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_22_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_23_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_24_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_25_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_26_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=118585</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=118585"/>
		<updated>2015-05-18T07:31:51Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Script control ... looking inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop, server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. You will find other downloads for Linux and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle, the Apache web server, MySQL database and PHP scripting language. For the various Moodle versions you can get different installation packages. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
Of course, you can install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and that a development version may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is not intended to be used as a productive server on the Internet. It is only intended for installation on a local computer to test and develop. The configuration is not optimized for security. If you want to run Moodle on an OS X server connected to the internet, please read the instructions [https://docs.moodle.org/en/Step_by_Step_Installation_on_a_Mac_OS_X_Server Step by step installation on a OS X Server].&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple OS X Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 1 GB free&lt;br /&gt;
  + System Software: OS X 10.6, 10.7, 10.8, 10.9, 10.10&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; from the web site [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions on this web site.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is delivered in English, any other language must be loaded. The german standard package &#039;&#039;de&#039;&#039; translates all text strings to german, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
The direct link for the language import is http://localhost:8888/moodle28/admin/tool/langimport/&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German. Only it you change the setting you will find the german menus and german settings dialogs your Moodle. Of course, all text in the text boxes on the home page and in the two preloaded courses Moodle4Mac About and How to update as they were originally entered ... if you like, you can change these texts like ....&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customized system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. Your Moodle will be frozen together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you will create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and you can distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx , 172.xxx , or 192.168.xx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
&lt;br /&gt;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is 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. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20150511 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE git://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28-git ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&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.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_22_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_23_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_24_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_25_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_26_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_29_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 3.0dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=117808</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=117808"/>
		<updated>2015-04-06T12:08:14Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* System requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop, server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. You will find other downloads for Linux and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle, the Apache web server, MySQL database and PHP scripting language. For the various Moodle versions you can get different installation packages. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
Of course, you can install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and that a development version may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is not intended to be used as a productive server on the Internet. It is only intended for installation on a local computer to test and develop. The configuration is not optimized for security. If you want to run Moodle on an OS X server connected to the internet, please read the instructions [https://docs.moodle.org/en/Step_by_Step_Installation_on_a_Mac_OS_X_Server Step by step installation on a OS X Server].&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple OS X Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 1 GB free&lt;br /&gt;
  + System Software: OS X 10.6, 10.7, 10.8, 10.9, 10.10&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; from the web site [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions on this web site.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is delivered in English, any other language must be loaded. The german standard package &#039;&#039;de&#039;&#039; translates all text strings to german, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
The direct link for the language import is http://localhost:8888/moodle28/admin/tool/langimport/&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German. Only it you change the setting you will find the german menus and german settings dialogs your Moodle. Of course, all text in the text boxes on the home page and in the two preloaded courses Moodle4Mac About and How to update as they were originally entered ... if you like, you can change these texts like ....&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customized system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. Your Moodle will be frozen together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you will create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and you can distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx , 172.xxx , or 192.168.xx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
&lt;br /&gt;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is 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. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20141110 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE git://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28 ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&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.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_22_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_23_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_24_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_25_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_26_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=116041</id>
		<title>Installation Package for OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_Package_for_OS_X&amp;diff=116041"/>
		<updated>2014-11-21T10:12:16Z</updated>

		<summary type="html">&lt;p&gt;Krause: /* Script control ... looking inside ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
The complete install packages for Mac OS X are named Moodle4Mac and allow a very easy way to install Moodle on your Mac computer (laptop, desktop, server). Moodle4Mac is available from  [http://download.moodle.org/macosx/ Moodle  packages for Mac OS X]. You will find other downloads for Linux and Window Operating Systems that may involve more customization of configuration files.&lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is based on the software MAMP. MAMP contains everything that is necessary for the operation of Moodle, the Apache web server, MySQL database and PHP scripting language. For the various Moodle versions you can get different installation packages. Please check which Moodle your institution (school, college, university, company) uses on its server so that you can swap your materials between the two platforms easily. &lt;br /&gt;
&lt;br /&gt;
Of course, you can install the latest Moodle development version to find everything about upcoming opportunities and changes. However, please remember that a developer version is not yet a finished product, and that a development version may contain errors. &lt;br /&gt;
&lt;br /&gt;
Moodle4Mac is not intended to be used as a productive server on the Internet. It is only intended for installation on a local computer to test and develop. The configuration is not optimized for security. If you want to run Moodle on an OS X server connected to the internet, please read the instructions [https://docs.moodle.org/en/Step_by_Step_Installation_on_a_Mac_OS_X_Server Step by step installation on a OS X Server].&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
  + Apple OS X Computer &lt;br /&gt;
  + iMac, Mac mini, MacBook, MacBook Air, Mac Pro&lt;br /&gt;
  + Processor:  Intel x86_64 (i5, i7, Xeon, Core2Duo)&lt;br /&gt;
  + RAM: 4 GB or better&lt;br /&gt;
  + Hard Disk: 1 GB free&lt;br /&gt;
  + System Software: OS X 10.6, 10.7, 10.8, 10.9&lt;br /&gt;
&lt;br /&gt;
==Download and install ==&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;  Download the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; from the web site [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] . You will find various image files for the different Moodle versions on this web site.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;  Double click the disk image &#039;&#039;&#039;Moodle4Mac-MAMP.dmg&#039;&#039;&#039; to mount the installation disk. &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_1.png|500px]]&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 OS X, Apache, MySQL, PHP).  MAMP does not save parameters in a registry or in system variables.  If you want to delete Moodle4Mac you only need to move the MAMP folder into the Trash.  For more information about MAMP please look at the [http://mamp.info/ MAMP project page].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Now you are ready to start your Moodle server.  Go to the Applications folder.  Find the MAMP folder and open it.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Double click the MAMP icon to start the server.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6:&#039;&#039;&#039; Start your browser and type   http://localhost:8888/moodle/  or http://127.0.0.1:8888/moodle/  into the address bar. You will start your preinstalled Moodle. You do not need to do any more installation. You are ready! Done ... hey, that was easy, wasn&#039;t it??&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7:&#039;&#039;&#039; 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;
[[Image:Moodle4Mac_4.png|900px]]&lt;br /&gt;
&lt;br /&gt;
==Language packages==&lt;br /&gt;
&lt;br /&gt;
By default Moodle4Mac is delivered in English, any other language must be loaded. The german standard package &#039;&#039;de&#039;&#039; translates all text strings to german, the additional package &#039;&#039;de_du&#039;&#039; adds the informal conversation &#039;&#039;du&#039;&#039;, the additional package &#039;&#039;de_kids&#039;&#039; provides scholastic simplifications.&lt;br /&gt;
&lt;br /&gt;
The direct link for the language import is http://localhost:8888/moodle28/admin/tool/langimport/&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_5.png|900px]]&lt;br /&gt;
&lt;br /&gt;
After importing the additional language pack, the settings for the default language for the user account &#039;&#039;&#039;admin&#039;&#039;&#039; can be switched to German. Only it you change the setting you will find the german menus and german settings dialogs your Moodle. Of course, all text in the text boxes on the home page and in the two preloaded courses Moodle4Mac About and How to update as they were originally entered ... if you like, you can change these texts like ....&lt;br /&gt;
&lt;br /&gt;
==Completely backup your server==&lt;br /&gt;
Just as you installed Moodle4Mac the first time on your computer, you can backup a customized system completely. Because all files and configurations are stored within the directory MAMP, you can easily backup your MAMP directory to an external disk. Your Moodle will be frozen together with all settings and all the courses, and it can be recovered at any time in the same form.&lt;br /&gt;
&lt;br /&gt;
First stop all server processes like httpd and mysqld, then exit the MAMP program. After everything stopped you can copy or move the MAMP directory. If you want to transfer MAMP to one or more other computers, you will create a ZIP archive containing the MAMP directory. This ZIP archive can be copied anywhere ... to an USB memory, to a web server, on a burned CD ...&lt;br /&gt;
&lt;br /&gt;
The target computer must be a Mac. On this Mac, unpack the ZIP archive and move the MAMP folder to the Application folder ... done! Everything is going exactly as in section download and installation. In this way you can prepare your Moodle for a presentation or a training lab, and you can distribute it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_ZIP.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Server in your local network==&lt;br /&gt;
&lt;br /&gt;
In various workshops we used Moodle4Mac as a quick server installation for our local network. Make sure that you change the passwords for Moodle and MySQL before you allow access to this server ... otherwise, you&#039;ll be amazed how creative your user group can be. Please read the safety instructions of Moodle4Mac.&lt;br /&gt;
&lt;br /&gt;
In this section you will see all required settings to use the server in the local network. Only three steps are required. The first step is to change one line in the config.php for Moodle. In the second step you need to adjust the base address in Moodle. And in your third step you open the firewall for &#039;&#039;httpd&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
To get your Moodle to another computer in your local network your Mac must be clearly addressable. You may use a fixed IP address or a DNS name. In local networks usually ip addresses of the private sections 10.xxx , 172.xxx , or 192.168.xx are assigned. If your Moodle4Mac gets an ip address this address must never change. Please do not use any static ip address if you do not know exactly what you do ... in case of doubt ask the administrator of the local network.&lt;br /&gt;
&lt;br /&gt;
You can&#039;t use Moodle4Mac as a local server which is intended to work on different networks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Edit config.php====&lt;br /&gt;
For the following your computer should be a Mac in a computer lab. For this example it has the the fixed ip address 192.168.0.200. You must edit now the configuration &#039;&#039;/Applications/MAMP/htdocs/moodle24/config.php&#039;&#039;  and change the wwwroot from &#039;&#039;localhost&#039;&#039; to &#039;&#039;192.168.0.200&#039;&#039;. You must use your own address for your own network!! &lt;br /&gt;
&lt;br /&gt;
After your changes you should get your Moodle with the address http://192.168.0.200/moodle24/&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;
global $CFG;&lt;br /&gt;
$CFG = new stdClass();&lt;br /&gt;
&lt;br /&gt;
$CFG-&amp;amp;gt;dbtype    = &#039;mysqli&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbhost    = &#039;localhost&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dbname    = &#039;moodle28&#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;prefix    = &#039;mdl_&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dboptions = array (&lt;br /&gt;
    &#039;dbpersit&#039; =&amp;amp;gt; 0, &lt;br /&gt;
    &#039;dbport&#039; =&amp;amp;gt; &#039;&#039;,&lt;br /&gt;
    &#039;dbsocket&#039; =&amp;amp;gt; 1,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// localhost wird auf 192.168.0.200 geändert&lt;br /&gt;
// $CFG-&amp;amp;gt;wwwroot   = &#039;http://localhost:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;wwwroot   = &#039;http://192.168.0.200:8888/moodle28&#039;;&lt;br /&gt;
$CFG-&amp;amp;gt;dataroot  = &#039;/Applications/MAMP/data/moodle28&#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;
require_once(dirname(__FILE__) . &#039;/lib/setup.php&#039;);&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;
&lt;br /&gt;
====Replace internal links in Moodle====&lt;br /&gt;
The original base address &#039;&#039;localhost&#039;&#039; is stored in many places within the database, your Moodle will not work properly with the modified base address. But images can not be displayed because they are accessible only from their correct address. From your local computer you might not see the problems but if you are outside on a computer getting access to the site.&lt;br /&gt;
&lt;br /&gt;
Moodle has a tool that allows you to replace the database entries from http://localhost:8888/moodle24/ to http://192.168.0.200:8888/moodle28/ .&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_6.png|900px]]&lt;br /&gt;
&lt;br /&gt;
You call this tool via the address http://192.168.0.200:8888/moodle28/admin/tool/replace/ &lt;br /&gt;
&lt;br /&gt;
No ... there is no menu option for it, probably because at thoughtless action with this tool also can shred the database ... in the first field enter http://localhost:8888/moodle28/, in the second field http://192.168.0.200:8888/moodle28/ (or the ip address that you have assigned in your installation). Use the correct spelling in both fields! With the hook you acknowledge that you know about the risk ...&lt;br /&gt;
&lt;br /&gt;
====Open the firewall====&lt;br /&gt;
The firewall in OS X 10.6, 10.7, 10.8, and 10.9 can be enabled and disabled the &#039;&#039;System Preferences &amp;gt; Security &amp;gt; Firewall&#039;&#039;. If the firewall is disabled, although Moodle4Mac works without further settings in the network, but your computer is vulnerable to all requests from the outside ... the latter you should not do!&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall1.png|520px]]&lt;br /&gt;
&lt;br /&gt;
The the system firewall of OS X is a packet filter that determines for each program if a data packet should be passed or blocked. If the firewall is enabled every program must be entered on a list to respond to requests from outside. Moodle4Mac (or MAMP) uses the httpd program to deliver the sites. You will find httpd in the MAMP folder ... the path is &#039;&#039;/Application/MAMP/Library/bin/httpd&#039;&#039;. To enter httpd into the whitelist of the firewall you must click forward on this path ... no idea if there would be a configuration file which you can edit. &lt;br /&gt;
&lt;br /&gt;
You need to get this setting for the firewall only once. If httpd is approved then all computers in your local network can access to Moodle ... by the way it is not important which is used by httpd ... port 8888 or port 80.&lt;br /&gt;
&lt;br /&gt;
Do not open the firewall for mysqld because Moodle itself gets a connection to mysql on the server but no user should communicate with mysql directly from the client.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Firewall2.png|520px]]&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network====&lt;br /&gt;
Your web server can be connected with the url http://192.168.0.200:8888/moodle28/ in your local network, where 192.168.0.200 is an example address which your Mac got from the local router. Usually such local numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x and you will be able to do your settings even if they differ from this description. &lt;br /&gt;
&lt;br /&gt;
When you got all settings right then all users from any computer in your network will see your Moodle via http://192.168.0.200:8888/moodle28/. And there will be no problem with any operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_7.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Connect Moodle from your local network with mobile devices====&lt;br /&gt;
The following images show the locale Moodle site with an iPad and an iPhone.&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_8.png|890px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Moodle4Mac_9.png|490px]]&lt;br /&gt;
&lt;br /&gt;
==Some words about the security ...==&lt;br /&gt;
====MAMP is not secure!====&lt;br /&gt;
MAMP can be used for testing and developing web sites locally on a Mac computer. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. MAMP is 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. Be careful!&lt;br /&gt;
&lt;br /&gt;
====How to secure MAMP?====&lt;br /&gt;
Moodle4Mac is a preconfigured package where all the default settings are accessible. The password for the Moodle admin user is known and must necessarily be changed. &lt;br /&gt;
&lt;br /&gt;
But please do not think that this should be enough! Your Moodle could also be attacked through the back door via the database. You definitely need to change the passwords of the database users root and moodle, because these passwords are known. Otherwise any hacker could change the password of the user account admin to get full access to all the information in Moodle. Alternatively, the hacker could also assign another user account to full admin access and he would be able to read all informations ... the main admin would probably not notice of such a change. It is also possible to delete the database completely if you know the root access to the database so that all information could be lost in this case.&lt;br /&gt;
&lt;br /&gt;
====Secure connections with HTTPS====&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;
It is very simple to update your locally installed Moodle. You start the update with a double click and everything happens automatically. All courses rest in Moodle. You do not need to renew your local Moodle completely ... you only get the new Moodle files.&lt;br /&gt;
&lt;br /&gt;
====Update the local Moodle via Git====&lt;br /&gt;
Make sure that the Git program is installed on your Mac (see instructions below). You also need an Internet connection because the files are downloaded from the Moodle update server. A double click on the icon UpdateMoodle.sh starts the script and updating occurs automatically. That&#039;s really all ... could it be easier?&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update1.png]]&lt;br /&gt;
&lt;br /&gt;
The Git program connects to the Moodle server and controls which files are new, which have changed and which have been deleted. The transmission time depends on the internet connection. With Git only really necessary files will be transmitted. If the transfer takes too long, you can abort the process with &amp;lt;ctrl&amp;gt;-c. You can easily start the update again later.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Update2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
====Script control ... looking 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, e.g. TextWrangler. &lt;br /&gt;
&lt;br /&gt;
It is only a text file but it uses a OS X feature to open and execute the script with the Terminal program. You don&#039;t need to learn anything ... doubleclick to update everything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
#&lt;br /&gt;
#  This GIT installer for Mac OS X is part &lt;br /&gt;
#  of the installation package Moodle4Mac&lt;br /&gt;
# &lt;br /&gt;
#  20141110 - Ralf Krause&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &amp;quot;+--------------------------------------------+&amp;quot;&lt;br /&gt;
echo &amp;quot;| GIT updater 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&lt;br /&gt;
&lt;br /&gt;
if ! test -e moodle28/.git ; then&lt;br /&gt;
    ## the first git update must get everything including .git&lt;br /&gt;
    git clone --depth 1 -b MOODLE_28_STABLE git://github.com/moodle/moodle.git moodle28-git&lt;br /&gt;
    if test -e moodle28 ; then&lt;br /&gt;
		if test -e moodle28 ; then&lt;br /&gt;
			if test -e moodle28/config.php ; then&lt;br /&gt;
				cp moodle28/config.php moodle28-git/.&lt;br /&gt;
			fi&lt;br /&gt;
			DATE=`date +%Y%m%d-%H%M`&lt;br /&gt;
			mv moodle28 moodle28-$DATE&lt;br /&gt;
		fi&lt;br /&gt;
        mv moodle28-git moodle28&lt;br /&gt;
    fi&lt;br /&gt;
    ## the old folder can be deleted now&lt;br /&gt;
    ## if you want to do this please remove &#039;##&#039; from the following line&lt;br /&gt;
    ## sudo rm -R moodle28-*&lt;br /&gt;
else&lt;br /&gt;
    ## the next git update only gets the new files&lt;br /&gt;
    cd moodle28&lt;br /&gt;
    git pull&lt;br /&gt;
    cd ..&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different versions of the script UpdateMoodle.sh only differ in two parameters ... first we need to know the right folder for Moodle and second we must use the correct git tag for the Moodle version. The shown script upgrades Moodle 2.8.&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.2 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_22_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.3 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_23_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.4 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_24_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.5 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_25_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.6 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_26_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.7 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_27_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.8 uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;MOODLE_28_STABLE&amp;lt;/span&amp;gt;&lt;br /&gt;
* Moodle 2.9dev uses &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;master&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Install Git====&lt;br /&gt;
&lt;br /&gt;
Download the Git program from  http://git-scm.com/download/ ... it&#039;s free and open source.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git1.png]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Open the disk image and doubleclick the installer git-xxx-osx.pkg. If you want to know more about Git then read the Git documentation on their web site ... but if you only want to update Moodle the script &#039;&#039;&#039;UpdateMoodle.sh&#039;&#039;&#039; should also work without reading &lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle4Mac_Git2.png|500px]]&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;
* [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;
[[Category:Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
[[de:Installationspaket für OS X]]&lt;br /&gt;
[[es:Paquetes de Instalación Completos para Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Moodle_app_additional_features&amp;diff=113981</id>
		<title>Moodle app additional features</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Moodle_app_additional_features&amp;diff=113981"/>
		<updated>2014-08-04T16:11:47Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = Local plugin&lt;br /&gt;
|entry = http://moodle.org/plugins/view.php?plugin=local_mobile&lt;br /&gt;
|tracker = https://tracker.moodle.org/browse/CONTRIB/component/13930&lt;br /&gt;
|discussion = http://moodle.org/mod/forum/view.php?id=&lt;br /&gt;
|maintainer = [[User:Juan Leyva|Juan Leyva]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Local plugin for adding new features to the current Moodle Mobile app ([https://moodle.org/plugins/view.php?plugin=local_mobile Plugin download link])&lt;br /&gt;
&lt;br /&gt;
This add-on provides new features and web services which are currently only available in the latest Moodle version.&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
&lt;br /&gt;
Once installed the plugin creates a new service &amp;quot;Moodle Mobile additional features&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The Mobile app checks if this service is enabled. If not, the Mobile app falls backs to the standard core Mobile app service.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* Support for sites using SSO authentication methods (Shibboleth and CAS)&lt;br /&gt;
* Push notifications&lt;br /&gt;
* Retrieval of private messages and notifications from the site&lt;br /&gt;
* Retrieval of calendar events from the site&lt;br /&gt;
&lt;br /&gt;
=== Enable authentication for sites using SSO methods (like Shibboleth and CAS) ===&lt;br /&gt;
&lt;br /&gt;
Once the plugin is installed, you need to go to Site administration &amp;gt; Plugins &amp;gt; Local plugins &amp;gt; Moodle Mobile additional features&lt;br /&gt;
&lt;br /&gt;
There you can choose the &amp;quot;Type of login&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
- Via the app: Is the default login, the user must introduce his credentials in the app&lt;br /&gt;
&lt;br /&gt;
- Via a browser window: A new browser instance is open in the mobile device pointing to the login form in the Moodle site. The user must introduce his credentials there. This is the option that must be selected for sites using SSO methods (or for sites that wants to force the user to authenticate in the site, not in the app)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;https://www.youtube.com/watch?v=cl8rsyyyg9g&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Push notifications ===&lt;br /&gt;
&lt;br /&gt;
If you want to enable Push notifications in Moodle sites prior to version 2.6 this plugin must be installed.&lt;br /&gt;
&lt;br /&gt;
See [[Mobile app Push Notifications]] for more information&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
1. Unpack the zip file into the local/ directory. A new directory will be created called local/mobile.&lt;br /&gt;
&lt;br /&gt;
2. Go to Site administration &amp;gt; Notifications to complete the plugin installation.&lt;br /&gt;
&lt;br /&gt;
3. Go to Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; External services, edit &amp;quot;Moodle Mobile additional features&amp;quot; and check the &amp;quot;Enabled&amp;quot; field, then save changes.&lt;br /&gt;
&lt;br /&gt;
4. Go to Site administration &amp;gt; Users &amp;gt; Define roles, edit the Authenticated user role and allow the capability moodle/webservice:createtoken.&lt;br /&gt;
&lt;br /&gt;
Note: You need to have upgraded the Moodle Mobile app to version 1.4.4.&lt;br /&gt;
&lt;br /&gt;
If you are currently using the Moodle Mobile app, you will need to log out of all your sites in order for the app to detect the new service.&lt;br /&gt;
&lt;br /&gt;
== Admin users, please read ==&lt;br /&gt;
&lt;br /&gt;
This plugin installs a new service in your Moodle installation, the automatic token creation for this type of services is forbidden for admin users. This means that admin users will not be able to use the Mobile app.&lt;br /&gt;
&lt;br /&gt;
This can be solved easily, administrators must create a token manually in Moodle (Plugins &amp;gt; Web Services &amp;gt; Manage tokens) for the local_mobile service.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[https://moodle.org/plugins/view.php?plugin=local_mobile Plugin entry in the plugins database]&lt;br /&gt;
&lt;br /&gt;
[[Category: Mobile]]&lt;br /&gt;
&lt;br /&gt;
[[de:Mobile App - Zusatzfeatures]]&lt;br /&gt;
[[es:Características adicionales de Moodle Mobile]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Moodle_app_additional_features&amp;diff=113830</id>
		<title>Moodle app additional features</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Moodle_app_additional_features&amp;diff=113830"/>
		<updated>2014-07-21T15:09:47Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = Local plugin&lt;br /&gt;
|entry = http://moodle.org/plugins/view.php?plugin=local_mobile&lt;br /&gt;
|tracker = https://tracker.moodle.org/browse/CONTRIB/component/13930&lt;br /&gt;
|discussion = http://moodle.org/mod/forum/view.php?id=&lt;br /&gt;
|maintainer = [[User:Juan Leyva|Juan Leyva]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Local plugin for adding new features to the current Moodle Mobile app ([https://moodle.org/plugins/view.php?plugin=local_mobile Plugin download link])&lt;br /&gt;
&lt;br /&gt;
This add-on provides new features and web services which are currently only available in Moodle 2.7.&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
&lt;br /&gt;
Once installed the plugin creates a new service &amp;quot;Moodle Mobile additional features&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The Mobile app checks if this service is enabled. If not, the Mobile app falls backs to the standard core Mobile app service.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* Support for sites using SSO authentication methods (Shibboleth and CAS)&lt;br /&gt;
* Push notifications&lt;br /&gt;
* Retrieval of private messages and notifications from the site&lt;br /&gt;
* Retrieval of calendar events from the site&lt;br /&gt;
&lt;br /&gt;
=== Enable authentication for sites using SSO methods (like Shibboleth and CAS) ===&lt;br /&gt;
&lt;br /&gt;
Once the plugin is installed, you need to go to Site administration &amp;gt; Plugins &amp;gt; Local plugins &amp;gt; Moodle Mobile additional features&lt;br /&gt;
&lt;br /&gt;
There you can choose the &amp;quot;Type of login&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
- Via the app: Is the default login, the user must introduce his credentials in the app&lt;br /&gt;
&lt;br /&gt;
- Via a browser window: A new browser instance is open in the mobile device pointing to the login form in the Moodle site. The user must introduce his credentials there. This is the option that must be selected for sites using SSO methods (or for sites that wants to force the user to authenticate in the site, not in the app)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;https://www.youtube.com/watch?v=cl8rsyyyg9g&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Push notifications ===&lt;br /&gt;
&lt;br /&gt;
If you want to enable Push notifications in Moodle sites prior to version 2.6 this plugin must be installed.&lt;br /&gt;
&lt;br /&gt;
See [[Mobile app Push Notifications]] for more information&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
1. Unpack the zip file into the local/ directory. A new directory will be created called local/mobile.&lt;br /&gt;
&lt;br /&gt;
2. Go to Site administration &amp;gt; Notifications to complete the plugin installation.&lt;br /&gt;
&lt;br /&gt;
3. Go to Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; External services, edit &amp;quot;Moodle Mobile additional features&amp;quot; and check the &amp;quot;Enabled&amp;quot; field, then save changes.&lt;br /&gt;
&lt;br /&gt;
4. Go to Site administration &amp;gt; Users &amp;gt; Define roles, edit the Authenticated user role and allow the capability moodle/webservice:createtoken.&lt;br /&gt;
&lt;br /&gt;
Note: You need to have upgraded the Moodle Mobile app to version 1.4.4.&lt;br /&gt;
&lt;br /&gt;
If you are currently using the Moodle Mobile app, you will need to log out of all your sites in order for the app to detect the new service.&lt;br /&gt;
&lt;br /&gt;
== Admin users, please read ==&lt;br /&gt;
&lt;br /&gt;
This plugin installs a new service in your Moodle installation, the automatic token creation for this type of services is forbidden for admin users. This means that admin users will not be able to use the Mobile app.&lt;br /&gt;
&lt;br /&gt;
This can be solved easily, administrators must create a token manually in Moodle (Plugins &amp;gt; Web Services &amp;gt; Manage tokens) for the local_mobile service.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[https://moodle.org/plugins/view.php?plugin=local_mobile Plugin entry in the plugins database]&lt;br /&gt;
&lt;br /&gt;
[[Category: Mobile]]&lt;br /&gt;
&lt;br /&gt;
[[de:Mobile App - Lokales Plugin]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Moodle_app_FAQ&amp;diff=113829</id>
		<title>Moodle app FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Moodle_app_FAQ&amp;diff=113829"/>
		<updated>2014-07-21T15:06:50Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
== How can I use Moodle on mobile devices? ==&lt;br /&gt;
There are currently 3 main ways to use Moodle on mobile devices:&lt;br /&gt;
&lt;br /&gt;
* Users can open Moodle sites in their mobile web browsers.&lt;br /&gt;
* Users can download native apps for their mobile devices.&lt;br /&gt;
* Admins can configure their Moodle site to be Mobile-accessible through server extensions.&lt;br /&gt;
&lt;br /&gt;
=== Mobile Apps ===&lt;br /&gt;
* The official [[Mobile app]] developed by Juan Leyva with support from Jerome Mouneyrac, Moodle HQ and others.&lt;br /&gt;
* [http://www.moodletouch.com MoodleTouch] (aka &#039;&#039;mTouch&#039;&#039;) for iOS, created by Ali OzGur&lt;br /&gt;
* [http://mpage.hk/ mPage] for iOS and Android (work in progress), created by Mass Media HK&lt;br /&gt;
* [http://codeguild.org/app/mbot/ Mbot] for Android, created by Code Guild&lt;br /&gt;
* The [https://docs.moodle.org/23/en/Mobile_app My Moodle app] for iPhone, created by Moodle HQ (no longer being developed)&lt;br /&gt;
* [https://market.android.com/details?id=com.ivoid.droodle Droodle] - an Android client for the Moodle 2.1 platform&lt;br /&gt;
&lt;br /&gt;
=== Server-side ===&lt;br /&gt;
* [http://www.mobilemoodle.org/momo18/ MoMo] (Moodle for Mobiles) - Requires a server extension and a client app; supports most mobile OSes including Symbian.&lt;br /&gt;
* [http://code.google.com/p/moodbile/ Moodbile] - Reference implementation of Moodle Web Services. Under development.&lt;br /&gt;
* [http://iphone.moodle.com.au iPhone4Moodle] - Under development.&lt;br /&gt;
&lt;br /&gt;
==Where can I download the official Mobile app for iPhone and Android?==&lt;br /&gt;
&lt;br /&gt;
The app can be downloaded for free from the Google Play Store and Apple app store.&lt;br /&gt;
&lt;br /&gt;
==How do I get the official Mobile app to work for my Moodle site?==&lt;br /&gt;
&lt;br /&gt;
Firstly, your Moodle site must be using Moodle 2.4 or later.&lt;br /&gt;
&lt;br /&gt;
Secondly mobile web services must be enabled. See [[Enable mobile web services]] for details. &lt;br /&gt;
&lt;br /&gt;
==Where can I select a theme for mobile devices?==&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;Site administration &amp;gt; Appearance &amp;gt; Themes &amp;gt; Theme selector&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
New in Moodle 2.2 onwards is the MyMobile theme especially designed for mobile devices. &lt;br /&gt;
&lt;br /&gt;
== I can&#039;t access my Moodle site using the app ==&lt;br /&gt;
&lt;br /&gt;
Notice that by default Mobile access is disabled in Moodle. The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access.&lt;br /&gt;
&lt;br /&gt;
Also, authentication methods like Shibboleth, CAS or LDAP/SSO are not supported currently. See https://tracker.moodle.org/browse/MOBILE-113 for more information.&lt;br /&gt;
&lt;br /&gt;
You should verify also that Debugging and &amp;quot;Display debug messages&amp;quot; are disabled in your site (go to Administration / Development / Debugging for checking that options)&lt;br /&gt;
&lt;br /&gt;
== Moodle Mobile app says I need 2.4 or higher ==&lt;br /&gt;
&lt;br /&gt;
The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access as follows:&lt;br /&gt;
&lt;br /&gt;
In Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Mobile tick the &#039;Enable web services for mobile devices&#039; checkbox, then click the button to save changes.&lt;br /&gt;
&lt;br /&gt;
Some Moodle sites uses special authentication methods like Shibboleth, CAS or LDAP/SSO that currently are not supported. See https://tracker.moodle.org/browse/MOBILE-113 for more information.&lt;br /&gt;
&lt;br /&gt;
==I can&#039;t view the courses tab as an administrator==&lt;br /&gt;
Moodle Mobile app is not suited for administrators ad the app displays only the courses you are enrolled in (not the courses you can see by capabilities).Note that the targeted user of the app is mainly a student or teacher.If you want to see the courses as an admin, you must be enrolled in the courses. You can use a non visible role or something similar.&lt;br /&gt;
&lt;br /&gt;
== What happened with the remote translation feature? ==&lt;br /&gt;
Remote translation is not available anymore, this feature was deleted because due to core changes in Moodle it neter worked as expected&lt;br /&gt;
&lt;br /&gt;
Language packs comes now with the app bundle, if you want to contribute translating the app you can use [http://lang.moodle.org AMOS tool] for translating, the component name is local_moodlemobileapp&lt;br /&gt;
&lt;br /&gt;
More information here: https://moodle.org/mod/forum/discuss.php?d=252704&lt;br /&gt;
&lt;br /&gt;
== I got the &amp;quot;we lost connection, you need to reconnect. Your token is now invalid.&amp;quot; on my custom version of Moodle Mobile ==&lt;br /&gt;
&lt;br /&gt;
Please, verify that you have followed all the steps here: https://docs.moodle.org/dev/Moodle_Mobile_Developing_a_plugin_tutorial#Set_up_your_Moodle_installation&lt;br /&gt;
&lt;br /&gt;
And also that you have enabled the moodle/webservice:createtoken capability for the Authenticated User Role at System Context&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?id=7798 Moodle for mobile forum]&lt;br /&gt;
* Tracker area [http://tracker.moodle.org/browse/MOBILE Moodle for Mobiles]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=162872 Proposal for Supporting Mobile Themes and Browser Detection] forum discussion&lt;br /&gt;
* An open course, about &amp;quot;[http://tempus-efa.proj.ac.il/moodle/course/view.php?id=102 Teaching using Mobile - Best practices]&amp;quot;&lt;br /&gt;
* [http://www.moodlenews.com/mobile/ Moodle News - Mobile] - a breakdown of the mobile projects and products available&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[de:Mobile Moodle FAQ]]&lt;br /&gt;
[[es:Moodle para móviles FAQ]]&lt;br /&gt;
[[fr:Moodle pour les mobiles]]&lt;br /&gt;
[[ja:モバイルMoodle FAQ]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Moodle_app_FAQ&amp;diff=113828</id>
		<title>Moodle app FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Moodle_app_FAQ&amp;diff=113828"/>
		<updated>2014-07-21T15:05:12Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
== How can I use Moodle on mobile devices? ==&lt;br /&gt;
There are currently 3 main ways to use Moodle on mobile devices:&lt;br /&gt;
&lt;br /&gt;
* Users can open Moodle sites in their mobile web browsers.&lt;br /&gt;
* Users can download native apps for their mobile devices.&lt;br /&gt;
* Admins can configure their Moodle site to be Mobile-accessible through server extensions.&lt;br /&gt;
&lt;br /&gt;
=== Mobile Apps ===&lt;br /&gt;
* The official [[Mobile app]] developed by Juan Leyva with support from Jerome Mouneyrac, Moodle HQ and others.&lt;br /&gt;
* [http://www.moodletouch.com MoodleTouch] (aka &#039;&#039;mTouch&#039;&#039;) for iOS, created by Ali OzGur&lt;br /&gt;
* [http://mpage.hk/ mPage] for iOS and Android (work in progress), created by Mass Media HK&lt;br /&gt;
* [http://codeguild.org/app/mbot/ Mbot] for Android, created by Code Guild&lt;br /&gt;
* The [https://docs.moodle.org/23/en/Mobile_app My Moodle app] for iPhone, created by Moodle HQ (no longer being developed)&lt;br /&gt;
* [https://market.android.com/details?id=com.ivoid.droodle Droodle] - an Android client for the Moodle 2.1 platform&lt;br /&gt;
&lt;br /&gt;
=== Server-side ===&lt;br /&gt;
* [http://www.mobilemoodle.org/momo18/ MoMo] (Moodle for Mobiles) - Requires a server extension and a client app; supports most mobile OSes including Symbian.&lt;br /&gt;
* [http://code.google.com/p/moodbile/ Moodbile] - Reference implementation of Moodle Web Services. Under development.&lt;br /&gt;
* [http://iphone.moodle.com.au iPhone4Moodle] - Under development.&lt;br /&gt;
&lt;br /&gt;
==Where can I download the official Mobile app for iPhone and Android?==&lt;br /&gt;
&lt;br /&gt;
The app can be downloaded for free from the Google Play Store and Apple app store.&lt;br /&gt;
&lt;br /&gt;
==How do I get the official Mobile app to work for my Moodle site?==&lt;br /&gt;
&lt;br /&gt;
Firstly, your Moodle site must be using Moodle 2.4 or later.&lt;br /&gt;
&lt;br /&gt;
Secondly mobile web services must be enabled. See [[Enable mobile web services]] for details. &lt;br /&gt;
&lt;br /&gt;
==Where can I select a theme for mobile devices?==&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;Site administration &amp;gt; Appearance &amp;gt; Themes &amp;gt; Theme selector&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
New in Moodle 2.2 onwards is the MyMobile theme especially designed for mobile devices. &lt;br /&gt;
&lt;br /&gt;
== I can&#039;t access my Moodle site using the app ==&lt;br /&gt;
&lt;br /&gt;
Notice that by default Mobile access is disabled in Moodle. The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access.&lt;br /&gt;
&lt;br /&gt;
Also, authentication methods like Shibboleth, CAS or LDAP/SSO are not supported currently. See https://tracker.moodle.org/browse/MOBILE-113 for more information.&lt;br /&gt;
&lt;br /&gt;
You should verify also that Debugging and &amp;quot;Display debug messages&amp;quot; are disabled in your site (go to Administration / Development / Debugging for checking that options)&lt;br /&gt;
&lt;br /&gt;
== Moodle Mobile app says I need 2.4 or higher ==&lt;br /&gt;
&lt;br /&gt;
The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access as follows:&lt;br /&gt;
&lt;br /&gt;
In Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Mobile tick the &#039;Enable web services for mobile devices&#039; checkbox, then click the button to save changes.&lt;br /&gt;
&lt;br /&gt;
Some Moodle sites uses special authentication methods like Shibboleth, CAS or LDAP/SSO that currently are not supported. See https://tracker.moodle.org/browse/MOBILE-113 for more information.&lt;br /&gt;
&lt;br /&gt;
==I can&#039;t view the courses tab as an administrator==&lt;br /&gt;
Moodle Mobile app is not suited for administrators ad the app displays only the courses you are enrolled in (not the courses you can see by capabilities).Note that the targeted user of the app is mainly a student or teacher.If you want to see the courses as an admin, you must be enrolled in the courses. You can use a non visible role or something similar.&lt;br /&gt;
&lt;br /&gt;
== What happened with the remote translation feature? ==&lt;br /&gt;
Remote translation is not available anymore, this feature was deleted because due to core changes in Moodle it neter worked as expected&lt;br /&gt;
&lt;br /&gt;
Language packs comes now with the app bundle, if you want to contribute translating the app you can use [http://lang.moodle.org AMOS tool] for translating, the component name is local_moodlemobileapp&lt;br /&gt;
&lt;br /&gt;
More information here: https://moodle.org/mod/forum/discuss.php?d=252704&lt;br /&gt;
&lt;br /&gt;
== I got the &amp;quot;we lost connection, you need to reconnect. Your token is now invalid.&amp;quot; on my custom version of Moodle Mobile ==&lt;br /&gt;
&lt;br /&gt;
Please, verify that you have followed all the steps here: https://docs.moodle.org/dev/Moodle_Mobile_Developing_a_plugin_tutorial#Set_up_your_Moodle_installation&lt;br /&gt;
&lt;br /&gt;
And also that you have enabled the moodle/webservice:createtoken capability for the Authenticated User Role at System Context&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?id=7798 Moodle for mobile forum]&lt;br /&gt;
* Tracker area [http://tracker.moodle.org/browse/MOBILE Moodle for Mobiles]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=162872 Proposal for Supporting Mobile Themes and Browser Detection] forum discussion&lt;br /&gt;
* An open course, about &amp;quot;[http://tempus-efa.proj.ac.il/moodle/course/view.php?id=102 Teaching using Mobile - Best practices]&amp;quot;&lt;br /&gt;
* [http://www.moodlenews.com/mobile/ Moodle News - Mobile] - a breakdown of the mobile projects and products available&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[de:Mobile Moodle FAQ]]&lt;br /&gt;
[[fr:Moodle pour les mobiles]]&lt;br /&gt;
[[ja:モバイルMoodle FAQ]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Mobile_app_Push_Notifications&amp;diff=113826</id>
		<title>Mobile app Push Notifications</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Mobile_app_Push_Notifications&amp;diff=113826"/>
		<updated>2014-07-21T14:50:05Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Starting versions (1.4 iOS, iPhone, iPad and 1.4.3 Android) Moodle Mobile support Push Notifications.&lt;br /&gt;
&lt;br /&gt;
1.  Install [https://moodle.org/plugins/view.php?plugin=message_airnotifier this plugin] in 2.4, 2.5 or 2.6* (or simply enable it in 2.7)  &lt;br /&gt;
&lt;br /&gt;
2.  Connect it to a mesaging server, you can use ours in case your Moodle site is registered. Go to Site administration /Plugins /Message outputs /Mobile Notifications and click in Request access key&lt;br /&gt;
&lt;br /&gt;
3.  Users need to connect at least once with the latest version of the app to register their phones with your site.   &lt;br /&gt;
&lt;br /&gt;
4)  Users can configure notificiations in the Moodle messaging preferences (Administration / My profile settings / Messaging)&lt;br /&gt;
&lt;br /&gt;
* For Moodle versions 2.4 and 2.5 the [[Moodle Mobile additional features]] must be also installed&lt;br /&gt;
** Only for Moodle different to 2.7 and onwards: If you upgrade your Moodle installation, you will have to reinstall the plugin since it add a couple of functions to the core Moodle Mobile service. See https://tracker.moodle.org/browse/MDLSITE-2815?focusedCommentId=273741&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-273741 for more information&lt;br /&gt;
&lt;br /&gt;
== Installing your own Notifications infrastructure ==&lt;br /&gt;
&lt;br /&gt;
If you have a customized version of the Mobile app, or you want to use your own Notifications infrastructure then you have to install a private [http://airnotifier.github.io AirNotifier] (backend server for notifciations)&lt;br /&gt;
&lt;br /&gt;
You have to add your app certificates there, see https://github.com/airnotifier/airnotifier/wiki/Installation&lt;br /&gt;
&lt;br /&gt;
The message AirNotifier plugin allow you to point to your custom AirNotifier instance using your own access keys&lt;br /&gt;
&lt;br /&gt;
Remember to install using GIT (branch moodle)&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[[Category: Mobile]]&lt;br /&gt;
&lt;br /&gt;
[[de:Mobile App - Push-Mitteilungen]]&lt;br /&gt;
[[es:Mobile app Notificaciones Push]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Mobile_app_Push_Notifications&amp;diff=113825</id>
		<title>Mobile app Push Notifications</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Mobile_app_Push_Notifications&amp;diff=113825"/>
		<updated>2014-07-21T14:40:05Z</updated>

		<summary type="html">&lt;p&gt;Krause: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Starting versions (1.4 iOS, iPhone, iPad and 1.4.3 Android) Moodle Mobile support Push Notifications.&lt;br /&gt;
&lt;br /&gt;
1.  Install [https://moodle.org/plugins/view.php?plugin=message_airnotifier this plugin] in 2.4, 2.5 or 2.6* (or simply enable it in 2.7)  &lt;br /&gt;
&lt;br /&gt;
2.  Connect it to a mesaging server, you can use ours in case your Moodle site is registered. Go to Site administration /Plugins /Message outputs /Mobile Notifications and click in Request access key&lt;br /&gt;
&lt;br /&gt;
3.  Users need to connect at least once with the latest version of the app to register their phones with your site.   &lt;br /&gt;
&lt;br /&gt;
4)  Users can configure notificiations in the Moodle messaging preferences (Administration / My profile settings / Messaging)&lt;br /&gt;
&lt;br /&gt;
* For Moodle versions 2.4 and 2.5 the [[Moodle Mobile additional features]] must be also installed&lt;br /&gt;
** Only for Moodle different to 2.7 and onwards: If you upgrade your Moodle installation, you will have to reinstall the plugin since it add a couple of functions to the core Moodle Mobile service. See https://tracker.moodle.org/browse/MDLSITE-2815?focusedCommentId=273741&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-273741 for more information&lt;br /&gt;
&lt;br /&gt;
== Installing your own Notifications infrastructure ==&lt;br /&gt;
&lt;br /&gt;
If you have a customized version of the Mobile app, or you want to use your own Notifications infrastructure then you have to install a private [http://airnotifier.github.io AirNotifier] (backend server for notifciations)&lt;br /&gt;
&lt;br /&gt;
You have to add your app certificates there, see https://github.com/airnotifier/airnotifier/wiki/Installation&lt;br /&gt;
&lt;br /&gt;
The message AirNotifier plugin allow you to point to your custom AirNotifier instance using your own access keys&lt;br /&gt;
&lt;br /&gt;
Remember to install using GIT (branch moodle)&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[[Category: Mobile]]&lt;br /&gt;
&lt;br /&gt;
[[de:Mobile App Push-Mitteilungen]]&lt;br /&gt;
[[es:Mobile app Notificaciones Push]]&lt;/div&gt;</summary>
		<author><name>Krause</name></author>
	</entry>
</feed>