Complete Install Packages for Mac OS X: Difference between revisions

From MoodleDocs
m (removing categories)
 
(101 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Complete install packages for Mac OS X are available from  [http://download.moodle.org/macosx/ Moodle Downloads]. You will find a separate card for the Mac OS X downloads. They are designed for new and local installations on a Mac computer/server. There are other downloads for Linux, and Window Operating Systems that may involve more customization of configuration files.
#REDIRECT [[Installation Package for OS X]]


The complete install packages for Mac OS X are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes. These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor. The instructions on the download page provide guidance on which version is likely to be most suitable.
[[de:Installationspaket für OS X]]
 
[[es:Paquetes de Instalación Completos para Mac OS X]]
'''Note 1:''' The latest complete install package version components, may not be backwardly compatible. Always check version compatibility of each component if you intend to develop materials on a later version of Moodle than the version installed on your "main" Moodle site. In short, complete install packages are designed for first time install on a "clean" machine.
 
'''Note 2:''' If you want a secure, public server with OS X, you may be interested to use the normal web server that comes preinstalled with every Mac Computer--see this [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client | Step-by-Step Guide for Installing Moodle]]. Please remember that the complete package Moodle4Mac is ready to use and really nothing must be installed.
 
 
==System requirements==
  + Apple Mac Computer
  + iMac, Mac mini, MacBook, iBook, PowerBook, Mac Pro, Xserve
  + Processor:  Intel Core 2 Duo or PPC (G3, G4, G5)
  + RAM: 256 MB or better
  + Hard Disk: 250 MB free
  + System Software: Mac OS X 10.3 or 10.4
 
==Install complete package Moodle4Mac==
===Download and install Moodle4Mac===
'''Step 1:'''  [http://download.moodle.org/macosx/ Download] the zipped disk image file from the Moodle download page.  Please choose the correct file for your processor type.  The zip archive should be unzipped automatically when the download is complete.  If the download file is not unzipped please do this manually.
 
'''Step 2:'''  Doubleclick the file Moodle4Mac.dmg to mount the installation disk.
 
[[Image:Moodle4Mac_1.png]]
 
 
'''Step 3:''' Move the folder '''MAMP''' into the folder '''Applications'''. Moodle4Mac is based on MAMP (Mac, Apache, MySQL, PHP).  MAMP makes no entries in any registry and no settings for the system variables.  If you want to know more about MAMP please read the project page http://mamp.info/
 
 
'''Step 4:''' Now you are ready to start your web server.  Go to the Applications folder.  Find the MAMP folder and open it.  Doubleclick the icon MAMP to start the server.
 
[[Image:Moodle4Mac_2.png]]
 
 
'''Step 5:''' Start your browser and type <nowiki> http://127.0.0.1:8888 or http://localhost:8888 </nowiki> in the address bar. You will  start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn't it??
 
[[Image:Moodle4Mac_3.jpg]]
 
 
'''Step 6:''' Please login with the username '''admin''' and the password '''12345''' and you will be the main administrator of your new local Moodle.
 
===Some words about the security ...===
Because everybody can read the predefined passwords of Moodle and MAMP you should know that the installation is not good for public servers. It's not secure!! Please read this:  [http://www.network0.org/2006/09/23/how-to-secure-mamp/ How to secure MAMP?]. There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion on the [http://www.living-e.com/MAMP-PRO/ MAMP server].
<br />&nbsp;
 
==Using Moodle4Mac as a local server in your network==
 
In some workshops we used Moodle4Mac as a quick server installation for our local network. You should change the admin passwords (Moodle and MySQL) before you do this. There are only two steps to get the server connection from every computer in your network. One step is the change of only one line in the Moodle config.php, and the second step is that you must open the firewall of the Mac OS X. This chapter shows how you can do this.
 
===Edit the file config.php===
 
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer remains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer.
 
If your computer has the ip address 192.168.0.20 then you must change the configuration from ''localhost'' to ''192.168.0.20''. In the following example you will see this address in the line $CFG-&gt;wwwroot.
<pre>
&lt;?php  /// Moodle Configuration File
 
unset($CFG);
 
$CFG-&gt;dbtype    = 'mysql';
$CFG-&gt;dbhost    = 'localhost';
$CFG-&gt;dbname    = 'moodle18';
$CFG-&gt;dbuser    = 'moodle';
$CFG-&gt;dbpass    = 'moodle';
$CFG-&gt;dbpersist =  false;
$CFG-&gt;prefix    = 'mdl_';
 
// Use the ip address of your computer instead of localhost
$CFG-&gt;wwwroot  = 'http://192.168.0.20:8888/moodle18';
$CFG-&gt;dirroot  = '/Applications/MAMP/htdocs/moodle18';
$CFG-&gt;dataroot  = '/Applications/MAMP/data/moodle18';
$CFG-&gt;admin    = 'admin';
 
$CFG-&gt;directorypermissions = 00777;  // try 02777 on a server in Safe Mode
 
$CFG-&gt;unicodedb = true;  // Database is utf8
 
require_once("$CFG-&gt;dirroot/lib/setup.php");
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
?&gt;
</pre>
 
===Open the firewall===
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.
 
To open the firewall please go to '''System Preferences > Sharing > Firewall'''. Choose '''New...''', fill in TCP port 8888, and set the rule name '''Moodle4Mac'''.
 
[[Image:Moodle4Mac_Firewall1.png]]
 
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.
 
[[Image:Moodle4Mac_Firewall2.png]]
 
===Connect Moodle from your network ...===
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN.  Usually such numbers start with 192.168.x.x.  All users from any computer in your network can use your Moodle via this address.
 
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don't do this!!
 
[[Image:Moodle4Mac_Network1.png]]
 
[[Image:Moodle4Mac_Network2.png]]
 
==How To Update Your Moodle4Mac==
 
It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.
 
The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package.
===Update the local Moodle via CVS===
 
Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.
 
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That's all .... really .... it's easy!!
 
Please look for the document '''UpdateMoodle.sh'''. If you doubleclick this file you will see that the system utility '''Terminal''' opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.
 
[[Image:Moodle4Mac_Update1.png]]
 
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is "empty". The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.
 
[[Image:Moodle4Mac_Update2.png]]
 
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.
 
If the update takes too long you may break with <strg>-C. It doesn't matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.
 
===Look Inside ... ===
 
If you want to see what is inside the document '''UpdateMoodle.sh''' please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.
 
[[Image:Moodle4Mac_Update3.png]]
 
I chose the system utility '''Terminal''' to open the file '''UpdateMoodle.sh''' and to run the script it contains automatically. So everything can be done with a doubleclick. It's easy and everybody can do it!!
 
<pre>
#! /bin/sh
#
#  This CVS updater for Mac OS X is part
#  of the installation package Moodle4Mac
#
#  20070429 - Ralf Krause
#
 
export CVS_RSH=ssh
 
echo
echo "+--------------------------------------------+"
echo "| CVS update for your local Moodle server    "
echo "+--------------------------------------------+"
echo
 
cd /Applications/MAMP/htdocs/moodle18/
 
### delete all files named .DS_Store
find . -name ".DS_Store" -type f -print0 | xargs -0 rm -f
 
### file ~/.cvspass must exist
if ! test -e ~/.cvspass ; then
    touch ~/.cvspass
fi
 
### login to the cvs server only for the first time
if ! grep "uk.cvs.moodle.org" ~/.cvspass > /dev/null ; then
    echo "CVS password is empty ... please only press <return> to start"
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login
    echo
fi
 
echo "Connecting to the CVS server. Download will take a few moments!"
echo "If the CVS update runs too long you may break with <strg>-C"
echo
cvs -q update -dP -r MOODLE_18_STABLE
 
</pre>
 
The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 1.8
* Moodle 1.6 uses <span style="color:red;">MOODLE_16_STABLE</span>
* Moodle 1.7 uses <span style="color:red;">MOODLE_17_STABLE</span>
* Moodle 1.8 uses <span style="color:red;">MOODLE_18_STABLE</span>
* Moodle 1.9 dev uses <span style="color:red;">HEAD</span>
 
===More about Moodle and CVS ... ===
 
Please look at the documentation [[CVS for Administrators]] if you want to learn more. Remember that the CVS server for Moodle changed on 25th April 2007 so you have to update your scripts if you already installed an older version. Moodle had problems with the old CVS server so they had to change it.
 
If you are using an older package Moodle4Mac you must not reload the whole package and you must not reinstall all your local courses again. You only have to download the archive [http://download.moodle.org/macosx/ChangeCVSServer.zip ChangeCVSServer.zip]. It contains the script ChangeCSVSServer.sh ... please run it once and it changes all the CVS data automatically. You also will find new scripts UpdateMoodle.sh for Moodle 1.6, 1.7, 1.8, and 1.9 dev. You must use the correct version of the new script UpdateMoodle.sh for all your future updates. Please delete the old script from your MAMP folder.
<br />&nbsp;
 
===Install Xcode Tools on your Mac===
 
Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.
 
If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.
 
[[Image:Moodle4Mac_Update4.png]]
 
If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.
 
[[Image:Moodle4Mac_Update5.png]]
 
If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.
 
After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.
<br />&nbsp;
 
==See also==
* [http://mamp.info  MAMP = Mac + Apache + MySQL + PHP]
* [http://en.wikipedia.org/wiki/MAMP MAMP in Wikipedia]
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]]
* [[CVS for Administrators]]
* [[Configuring aspell on Mac OS X]]
 
[[Category: Mac OS X]]

Latest revision as of 07:01, 16 October 2015