Installing the Mantis Bug Tracking System


Amandeep Jawa (deep AT worker DASH bee DOT com)
Worker Bee Software
Document Version 0.9

Introduction:
This document describes how to install the Mantis bug tracking system. It was created while installing Mantis on Red Hat Linux 7.2 but should be easily modified for other Linuxes & nonetheless provide good information for Windows. It is in no way intended to supercede offical documentation from the Mantis web site http://mantisbt.sourceforge.net.

Contents:
This document is divided into the following sections.

  1. Installing PHP & MySQL
  2. Verifying HTTPD, PHP & MySQL
  3. Installing Mantis
  4. Securing Mantis

Software Requirements:

Note that this file was actually tested with the following installed RPMs on a Red Hat 7.2 Linux installation:

Document Conventions:
This document was created with the following conventions:


Installing PHP & MySQL

Before you install Mantis you should ensure that you have a fully functioning web server (HTTPD) installation with PHP/MySQL support. If you have already installed MySQL and PHP skip this section & start with the verify section below. If you are doing a fresh install, start here.

  1. Login to your server machine as root user.
  2. (Optional) Create a downloads directory to store your rpms in: mkdir /root/downloads
  3. (Optional) Create a mysql directory to store your MySQL rpms in: mkdir /root/downloads/mysql
  4. Now download the following MySQL rpms from your favorite RPM site (or www.mysql.com). Note that the versions listed below represent the one I found on the web, newer ones may exist. Store the files in the downloads/mysql directory you created (if you made one).
  5. Now install each of the MySQL rpms:
  6. As recommended, run the two lines given in the message to set your root password. Make sure you remember the root password:
  7. (Optional) Create a php directory to store your php rpms in: mkdir /root/downloads/php
  8. Now download the following php rpms from your favorite RPM site. Note that the versions listed below represent the one I found on the web, newer ones may exist. Store the files in the downloads/php directory you created (if you made one).
  9. Now install each of the php rpms:
  10. You have now installed php & MySQL
Back to contents

Verifying HTTPD, PHP & MySQL

Before you install Mantis you should ensure that you have a fully functioning web server (HTTPD) installation with PHP/MySQL support. If you are absolutely sure that your HTTPD/PHP/MySQL configuration is working you can skip this section, but this section is very simple & is therefore recommended. All of our tests were done with Apache as our HTTPD server but other HTTPD servers should work the same.

  1. Verify that your web server installation is working correctly check one of its pages such as http://<YOUR SERVER'S IP ADDRESS>. At the very least you should get some default page - like the Apache test page.
  2. Now verify that your HTTPD/PHP connection is working:
  3. Now verify that your Apache/PHP/MySQL connection is working:
Back to contents

Installing Mantis

Now that you have an HTTPD server, MySQL & php installed, you can now install Mantis.

  1. Login to your server machine as root user.
  2. (Optional) Create a downloads directory to store Mantis in: mkdir /root/downloads
  3. (Optional) Create a mantis directory to store your Mantis downloads in: mkdir /root/downloads/mantis
  4. Download the Mantis installer from http://mantisbt.sourceforge.net/download.php3, as of this writing, the current version is 0.17.0. Store the files in the downloads/mantis directory you created (if you made one).
  5. Unpack the Mantis tarball:
  6. Copy the unpacked directory to whatever directory you are using as your web root directory: mv mantis-0.17.0 <YOUR WEB ROOT>, for example on my system that is mv mantis-0.17.0 /var/www/html
  7. For simplicity, rename the directory you just moved to mantis: mv <YOUR WEB ROOT> mantis-0.17.0 <YOUR WEB ROOT> mantis
  8. If you are using the default MD5 password encryption you can skip the next few steps & continue following instructions here. If you wish to change the password encryption configuration continue.
  9. Edit the db_generate.sql file in the <YOUR WEB ROOT>/mantis/sql directory with your favorite text editor.
  10. Now create a Mantis database using the mysql commandline interface:
  11. Now create the Mantis database tables:
  12. Now we will configure Mantis:
  13. You have now completed basic installation of Mantis - check this by opening the following url in a web bowser: http://<YOUR HOST + DOMAIN NAME>/mantis/ for example on my machine that is http://ducky.deepdomain.com/mantis/. You should see a login page. Note if you get a page full of errors that look like this:
    Warning: Cannot add header information - headers already sent by (output started at /var/www/html/mantis/config_inc.php:20) in /var/www/html/mantis/core_print_API.php on line 18
    
    Warning: Cannot add header information - headers already sent by (output started at /var/www/html/mantis/config_inc.php:20) in /var/www/html/mantis/core_print_API.php on line 20
    
    Warning: Cannot add header information - headers already sent by (output started at /var/www/html/mantis/config_inc.php:20) in /var/www/html/mantis/core_print_API.php on line 21
    
    
    It means that there are extra blank lines at the end of your config_inc.php file. Delete them & try again.
Back to contents

Securing Mantis

By default the Mantis installation creates an administrative user with the passoword root - since this is common knowledge, it is unsecure. We will create a new administrative user with a new password & then delete the default one to make your installatiuon more secure.

  1. Create a new adminstrative user.
  2. Now delete the original administrator user:
  3. You have now successfully installed & configured Mantis - enjoy.
Back to contents



Amandeep Jawa  Worker Bee Software