This document describes what the install.sh script does when you install FogBugz 6 for Unix. It is intended to help system administrators understand how the script modifies their system, and should help you understand how FogBugz is set up so that you can diagnose and correct problems. Although we don't recommend setting up FogBugz manually, it is possible to do so by following the instructions in this document.
Before doing anything else, the install script checks for the system requirements like PHP 5.1 or greater with the necessary libraries like MySQL, Mono 1.2.3 or greater, Pear and curl.
0. Understanding the File Layout
When you untar FogBugz you'll see three directories. Website contains the PHP source code and is the only directory which is served up by your web server. FileUploads was used by FogBugz 2.0 and 3.0 to hold copies of files which have been uploaded as bug attachments; now, in FogBugz 4.x and above, these files are moved to the database. If you are upgrading these files will trickle into the database slowly, although this is completely transparent. The Accessories folder contains any and all other sundry files shipped with FogBugz .
For security reasons, neither FileUploads nor Accessories should be in a directory that is served by the web server!
1. Install Certain PHP Modules
The script uses PEAR, the "PHP Extension and Application Repository," to install the latest versions of several PHP modules. (pear must be in your path. 'which pear' will tell you if it is or not). The versions shown below in parentheses are the versions we tested at the time FogBugz 6 for Unix was released; later versions will probably work but have not necessarily been tested.
Auth 1.5.4
Auth_SASL 1.0.2
HTTP_Client 1.1.1
HTTP_Request 1.4.2
Mail 1.1.14
Mail_Mime 1.5.2
Net_SMTP 1.2.10
Net_Socket 1.0.8
Net_URL 1.0.15
Structures_Graph 1.0.2
XML_Tree 1.1
2. Add a Custom PHP Module, fogutil.so
FogBugz relies on a small custom PHP module called fogutil.so to provide certain functionality. This module, shipped in the Accessories directory, is a binary file compiled for your particular operating system.
We do not ship the source to this file. This is the reason that your system needs to be on the approved list of Unix variants in order to run FogBugz.
fogutil.so is copied to the php modules directory, then chmod'ed to 755. The install script adds the line extension=fogutil.so to the php.ini file, a change which will probably require that you restart Apache.
3. Setting Permissions
The install script sets ownership and permissions for various files and directories so that the user account under which Apache is running has permission to access everything it needs:
chgrp apache FileUploads
chmod g+rw FileUploads
touch Accessories/application.data
chmod g+rw Accessories/application.data
chgrp -R apache Website Accessories
chmod -R g+r Website Accessories
chmod +x Accessories/fogbugzmaintd
4. Adding a Directory to httpd.conf
Apache is configured so that the http://.../FogBugz URL points to ../Website/default.php on disk by adding this section to the httpd.conf file:
Alias /FogBugz "/path/to/FogBugz/Website"
<Directory "/path/to/FogBugz/Website">
Options
AllowOverride All
DirectoryIndex default.php
</Directory>
5. Restart Apache
The install script attempts to restart apache to get it to reload its settings and php extensions.