Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
doc:installosx:english [2007/04/28 02:33]
fran
doc:installosx:english [2009/07/06 20:36] (current)
Line 1: Line 1:
-Main Author: [[alcorn@gmail.com | Antonio Alcorn ]] Contributor(s): [[http://p2paid.org | angelo Embuldeniya]]+Main Author: [[alcorn@gmail.com | Antonio Alcorn ]] Contributor: [[http://p2paid.org | Angelo Embuldeniya]] Maintainer:  [[http://timmcnamara.co.nz/| Tim McNamara]]
  
-==== Installing Sahana on Mac OS X ====+===== Installing Sahana on Mac OS X =====
  
-[[http://www.sahana.lk | Sahana]] is designed to run on any system running PHP and MySQL. On Mac OS X, it requires just a few tweaks to get up and running.+[[http://www.sahana.lk | Sahana]] requires just a few tweaks to get up and running.
  
-Sahana requires the following to be installed on Mac OS X: +==== Phase Recap ====
-  o php 4.3 or later +
-  o MySQL 4.or later +
-  o Apache web server 1.3 or later +
-  o latest php4-gd libs +
-  o phpMyAdmin+
  
 +You should have installed the following during [[ doc:installation| Phase 1]]:
 +  * php 5.0 or later
 +  * MySQL 4.1 or later
 +  * Apache web server 1.3 or later
 +  * latest php4-gd libs
 +  
 +[[http://www.phpmyadmin.net | phpMyAdmin]] is also recommended.
  
-===== Steps =====+==== Mac OSX Specific Notes ====
  
-  * Download the "source" package for your preferred release from [[http://www.sahana.lk/node/11 here]]+If you have Mac OS X 10.4 (Tiger) or later, it's usually shipped with php4, but the installation is slightly quirky. Previous versions of the OS didn't ship with PHP at all. In either case you'll need to download and install the "[[http://www.entropy.ch/software/macosx/php/#install | PHP 5 on Mac OS X 10.4, PPC and Intel]]" package from [[http://www.entropy.ch/home/ | Marc Liyanage's site]].
  
-  * Unpack the tarball. You should get folder called sahanaMove this folder into the "Sites   directory in your home folderLinking to a specific section is possibletoo(See note below)+If you want to use local mysql database, you'll need to install that as wellGo [[http://dev.mysql.com/downloads/mysql/4.1.html | here]] and scroll down to the Mac OS X downloads. Download the "Standarddisk image for your platformRun the installer, and while you're at it double-click the handy prefPane supplied on the disk image to install it. The initial default mysql user is called rootwith a blank passwordmysqladmin will be located at /usr/local/mysql/bin/mysqladmin, so, for example, to create your database for sahana the command might look like:
  
-  * In Terminal, set the permissions for the confand www/tmpdirectories under sahana to be writable by the webserver. In Mac OS X, the webserver runs as 'nobody', so we'll set them to world-writable. For example:+  /usr/local/mysql/bin/mysqladmin -u root create sahana_db
  
-  o powerbook:~ antonio$ chmod 777 Sites/sahana/conf/   +You might also want to install a copy of [[http://www.phpmyadmin.net | phpMyAdmin]].
-  o powerbook:~ antonio$ chmod 777 Sites/sahana/www/tmp/+
  
  
-  * If you have Mac OS X 10.4 (Tiger) or later, it's usually shipped with php4, but the installation is slightly quirky. Previous versions of the OS didn't ship with PHP at all. In either case you'll need to download and install the "[[http://www.entropy.ch/software/macosx/php/#install | PHP 5 on Mac OS X 10.4, PPC and Intel]]" package from [[http://www.entropy.ch/home/ | Marc Liyanage's site]].+===== Next Steps =====
  
-  * If you want to use a local mysql databaseyou'll need to install that as wellGo [[http://dev.mysql.com/downloads/mysql/4.1.html | here]] and scroll down to the Mac OS X downloads. Download the "Standard" disk image for your platform. Run the installerand while you're at it double-click the handy prefPane supplied on the disk image to install itThe initial default mysql user is called root, with a blank password. mysqladmin will be located at /usr/local/mysql/bin/mysqladmin, so, for example, to create your database for sahana the command might look like:+  * Unpack the tarball. A folder ''sahana''should be extracted.  Move this folder into the ''Sites'' directory of your your ''home'' folder. Linking to a specific section is possible, too(See note below) 
 + * In Terminal, grant the webserver write permission to the ''conf/'' and ''www/tmp/'' directories under sahanaIn Mac OS Xthe webserver runs as 'nobody'so we'll set them to world-writableFor example:
  
-  /usr/local/mysql/bin/mysqladmin -u root create sahana_db+  powerbook:~ antonio$ chmod a+w Sites/sahana/conf  
 +  powerbook:~ antonio$ chmod a+w Sites/sahana/www/tmp/
  
-You might also want to install a copy of [[http://www.phpmyadmin.net | phpMyAdmin]]+  * Sahana <del>makes extensive</del> has removed PHP's optional "short tags" feature in its code (the <? ...//code//... ?> or <?=//something to print//?> syntax)Short tags are disabled in the default installation of php5. While the developers are moving through a transition to Version 1.0, it pays to enable this feature.
  
 +To fix this, edit ''/usr/local/php5/lib/php.ini'' and look for:
  
-  * Sahana makes extensive use of PHP's optional "short tags" feature (the <? ...//code//... ?> or <?=//something to print//?> syntax). Short tags are disabled in the default installation of php5. To fix this, edit /usr/local/php5/lib/php.ini and look for this line:+  short_open_tag Off
  
-  o short_open_tag = Off+and change it to:
  
-...and change it to: +  short_open_tag = On
- +
-  o short_open_tag = On+
  
 then save the changes. then save the changes.
  
 +  * Go to ''System Preferences > Sharing > Services'' and turn ''Personal Web Sharing'' **on**. If you already had it on, turn it off and then on again. This restarts the Apache process and forces it to reload httpd.conf and php.ini.
  
-  * Go to System Preferences > Sharing > Services and turn on Personal Web Sharing. If you already had it on, turn it off and then on again. This restarts the apache process and forces it to reload httpd.conf and php.ini. +  * Point your browser to ''http://localhost/~yourusername/sahana/www/'' and go through the web installer. You should be ready to go!
- +
-  * Point your browser to http://localhost/~yourusername/sahana/www/ and go through the web installer. You should be ready to go! +
- +
- +
- +
  
 +==== Configuring Apache ====
  
-===Notes:===+By default, the Apache installation included with Mac OS X maps ''http://localhost/~yourusername/'' to ''/Users/yourusername/Sites/'', and ''http://localhost/'' to ''/Library/WebServer/Documents/''. If you want to install sahana with a "nice" namespace, edit ''/etc/httpd/httpd.conf''
  
-    * By default, the apache installation included with Mac OS X maps http://localhost/~yourusername/      to /Users/yourusername/Sites/, and http://localhost/ to /Library/WebServer/Documents/. If you want to install sahana with a "nice" namespace, you can edit /etc/httpd/httpd.conf and find the following line:+Find the following line:
  
 +  DocumentRoot "/Library/WebServer/Documents/"
  
-      o DocumentRoot "/Library/WebServer/Documents/"+You could change it to where you have unpacked Sahana. For example:
  
-You could change it to something like:+  DocumentRoot "/Users/yourusername/Sites/sahana/www/"
  
-      o DocumentRoot "/Users/yourusername/Sites/sahana/www/" +Restart Apache by going to ''System Preferences > Sharing > Services'' and turn ''Personal Web Sharing'' **off** then **on** againThis browsing to ''http://localhost/'' would bring you to your Sahana installation.
-    +
-And restart apacheThen, if you put the sahana folder in your Sites folder, browsing to http://localhost/ would bring you to your Sahana installation.+
  
  
  

Navigation
QR Code
QR Code doc:installosx:english (generated for current page)