]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - INSTALL.Mac OS X
Installation notes specific to Mac OS X 10.1 or greater.
[SourceForge/phpwiki.git] / INSTALL.Mac OS X
1 Using PhpWiki 1.2 with Mac OS X / Darwin
2
3 PhpWiki works quite well and retains almost complete functionality when used with a default installation of Mac OS X 10.1 (or greater), with only a few minor exceptions to as noted below. Setting up a database for the Wiki backend is probably the most difficult part of the PhpWiki installation as it will require use of the Terminal utility; therefore it is recommended that you at least have some familiarity with the unix command prompt. However, the setup is straightforward and you should be able to complete the install by following the instructions in the INSTALL document included with the PhpWiki download.
4
5 If you intend to compile the required database software or PHP module yourself you should download and install the Developer tools from Apple, which includes the necessary cc compiler, and at least temporarily activate the superuser (root) account. The steps necessary to do this are relatively more complicated and are beyond the scope of this document.
6
7
8 Database
9 --------
10 A suitable database for PhpWiki is not included with Mac OS X 10.1. If you decide to use one of the more popular (and free) database packages such as mySQL or PostgreSQL with PhpWiki, fortunately there are precompiled versions of the software available. Some distributions even come with Mac OS X installers which will significantly reduce the amount of work you will have to do in the unix environment.
11
12 The MySQL 3.23.46 binary installation works well with Mac OS X 10.1 and PhpWiki. After you install and test mySQL follow the instructions given in INSTALL.mysql to prepare a new database for use with PhpWiki.
13
14
15 Apache PHP Module
16 -----------------
17 The default PHP module for Apache as supplied by Apple does work with PhpWiki but is missing support for the zlib and GD libraries. Wiki will still produce a valid ZIP file when an administrator saves a ZIP dump of the database but it will not use any compression.
18
19 If you want compressed ZIP dumps you will have to install a version of PHP that does support the zlib library, or compile PHP yourself.
20
21 PHP with GD library support is required to use "text2png", an experimental plugin for Wiki 1.3.
22
23
24 Obtaining and Installing mySQL and PHP.so
25 -----------------------------------------
26 Mark Liyanage has graciously provided precompiled Mac OS X versions of mySQL, an updated PHP module for Apache and some installation instructions on his web site. He has also written some tips if you want to compile these programs for yourself.
27
28     http://www.entropy.ch/software/macosx/
29
30 Note that whether you use the built-in PHP module or another PHP module, it must be activated in Apache's httpd.conf before you can use PHP. Take a look at Mark's PHP installation instructions or read the Apache documentation for more information. 
31
32 Other distributions of mySQL or PostgreSQL which can be used with Mac OS X are listed at versiontracker.com.
33
34  
35 PhpWiki Configuration Notes
36 ---------------------------
37 Move the phpwiki folder into the directory used by the web server. In Mac OS X 10.1 this folder will be "/Library/WebServer/Documents" (unless you previously changed it to somewhere else in the configuration file "/private/etc/httpd/httpd.conf").
38
39 Follow the generalized installation instructions described in INSTALL but with the changes below.
40
41 1. The Mac OS X Apache web server runs as user "www" and this works fine with PhpWiki so long as "Everyone" has at least read-only access in the phpwiki folder's Get Info.
42
43 If you want to perform serial dumps instead of ZIP dumps you need to set at least one directory to be accessible read-write by the http server. The easiest solution is probably to create a new folder called "dumps" inside the phpwiki folder, then give the user "www" read-write access to it in the terminal:
44
45 sudo chown www:www /System/Library/phpwiki/dumps
46 sudo chmod u+wrx /System/Library/phpwiki/dumps
47
48 2. A few lines need to be inserted into Apache's configuration in order to use "nice" URLs with PhpWiki such as:
49
50     http://somehost/wiki?GoodStyle
51     http://somehost/wikiadmin?PhpWikiAdministration
52
53 Open the terminal and type in the following to edit the web server configuration (enter your administration password when prompted):
54
55 sudo pico /etc/httpd/httpd.conf
56
57 Scroll down to the <IfModule mod-alias.c> section. Copy the comment line "#PhpWiki 1.2 aliases" and the six lines below it, then paste it into the mod_alias section as shown below.
58
59 <IfModule mod_alias.c>
60
61     #
62     # Note that if you include a trailing / on fakename then the server will
63     # require it to be present in the URL.  So "/icons" isn't aliased in this
64     # example, only "/icons/".  If the fakename is slash-terminated, then the 
65     # realname must also be slash terminated, and if the fakename omits the 
66     # trailing slash, the realname must also omit it.
67     #
68     Alias /icons/ "/usr/share/httpd/icons/"
69
70 #PhpWiki 1.2 aliases
71     Alias /wikiadmin/ "/Library/WebServer/Documents/phpwiki/admin.php?"
72     Alias /wikiadmin "/Library/WebServer/Documents/phpwiki/admin.php"
73     Alias /wiki/images/ "/Library/WebServer/Documents/phpwiki/images/"
74     Alias /wiki/images "/Library/WebServer/Documents/phpwiki/images"
75     Alias /wiki/ "/Library/WebServer/Documents/phpwiki/index.php?"
76     Alias /wiki "/Library/WebServer/Documents/phpwiki/index.php"
77
78
79 To save your changes and exit, press 'control-x', then 'y' and the 'return' key.
80 Restart the Web Sharing server from the System Preferences "Sharing" control panel or from the terminal:
81
82 sudo apachectl graceful
83
84 If you have problems after all of this, try contacting the
85 phpwiki-talk list at phpwiki-talk@lists.sourceforge.net.
86
87 Carsten Klapp
88 carstenklapp@mac.com