How to install MantisBT on FreeBSD

This article was written for MantisBT 1.2.8 and FreeBSD 8.2

Pre-Requisites

 * Basic FreeBSD server with configured PHP web application stack. See How to build a FreeBSD server, the following references may also be useful:
 * The FreeBSD Handbook by the FreeBSD Project ("The Handbook"),
 * Bulding a Server with FreeBSD 7 by Bryan Hong ("Hong"),
 * Absolute FreeBSD by Michael Lucas ("Lucas"),

Install Procedure

 * Login to the Maestro Server as user maestro
 * Download MantisBT 1.2.8 from http://www.mantisbt.org/ and extract to /usr/local/www/mantisbt-1.2.8/
 * Review /usr/local/www/mantisbt-1.2.8/doc/INSTALL
 * Set permissions


 * Create Apache configuration file /usr/local/etc/apache22/Includes/mantisbt.conf

Alias /mantisbt /usr/local/www/mantisbt-1.2.8/ AcceptPathInfo On  AllowOverride None Order Allow,Deny Allow from all 


 * Edit /usr/local/www/mantisbt-1.2.8/config.inc.php and edit as needed.

$g_hostname     = 'localhost'; $g_db_username  = 'mantis'; $g_db_password  = 'MantisbtPassword'; $g_database_name = 'mantis'; $g_db_type      = 'mysql'; $g_administrator_email = 'mnestor@scc.com'; $g_webmaster_email     = 'mnestor@scc.com'; $g_from_name           = 'Maestro MantisBT'; $g_from_email          = 'mnestor@scc.com';   # the "From: " field in emails $g_return_path_email   = 'mnestor@scc.com';   # the return address for bounced mail $g_window_title        = 'Maestro MantisBT';


 * su to root, set permissions on the Mantis directory so it is writable by the Apache server (www user) and restart Apache to read the new Maestro config file

> su -
 * 1) cd /usr/local/www/
 * 2) chown -R www:www mantisbt-1.2.8/
 * 3) /usr/local/etc/rc.d/apache22 reload


 * Create Mantis database

TODO: CREATING MANTISBT SCC DATABASE TO BE COMPLETED


 * Verify basic functionality and change the default admin password
 * Use a web browser to access the MantisBT URL (e.g., http://www.scc.com/mantisbt/).
 * Login with username admin and administration password.

Updating
Backup previous version of Mantis modify /usr/local/etc/php.ini date.timezone = "US/Mountain" Edit config_inc.php appropriately $g_database_name = 'mantis'; $g_db_username = 'mantis'; $g_db_password = '******'; Change admin dir to other name Edit Mantis Apache config file so Apache serves new version (e.g. # vi /usr/local/etc/apache22/Includes/mantisbt.conf) Re-start Apache (e.g., # /usr/local/etc/rc.d/apache22 restart)
 * 1) cd /usr/ports
 * 2) portmaster databases/mantis
 * 1) cd /usr/local/www/mantis
 * 2) mv ./admin ./admin.orig