Document Actions

Mantis Install Guide

by David Hostetler [modified 20090122:11:39 (Thu)] [posted 20071111:02:17 (Sun)]

step-by-step guide to installing and configuring Mantis on gentoo

Process

  1. install/configure mysql DB (assumes you've already got mysql installed)
    • we're going to create the mantis database manually, though I think there is an SQL script included with mantis that accomplishes the same thing.  Pick your poison.  We'll login to mysql as a root/admin user, so you need to know the user/password for that, which will have been established when you initially installed mysql.  Then we'll create the mantis DB, and assign privileges to an initial mysql user dedicated to that DB.
    • mysql -u root --password
      
    • mysql> create database mantis;
      mysql> use mantis;
      mysql> grant select, insert, update, delete, index, create, alter, drop on mantis.* to mantis@localhost identified by '<password>';
      mysql> flush privileges;
      mysql> quit;
  2. install mantis
    • echo "www-apps/mantisbt ~x86" >> /etc/portage/package.keywords
    • emerge -avt mantisbt
    • if you're using vhosts with apache, the emerge doesn't actually create a usable mantis instance, you have to use webapp-config to finish:
      • first, edit the webapp-config configuration file to ensure its defaults are appropriate
        • vim /etc/vhosts/webapp-config
      • now use webapp-config to install the instance of the application
        • webapp-config -I -h <vhostname> -u <username> -g <groupname> --secure -d <vhost_subdir> mantisbt 1.1.6
        • where '<vhost_subdir>' is a directory name under your vhost's rootdir where you want the mantis instance to live, and '1.1.6' is the version of mantis that you're installing
        • <username> and <groupname> are used to establish ownership of the files once they're installed.  You should specify the user/group under which your webserver (apache) runs.  Alternatively, omit these arguments and ensure that the corrsponding values are set correctly in /etc/vhosts/webapp-config.
        • An example of the above command is as follows:
        • webapp-config -I -h negativesum -u apache -g apache --secure -d raw/mantis mantisbt 1.1.6
      • if that works successfully, you'll find all of the mantis files in <vhost_dir>/<vhost_subdir>.
      • use 'man webapp-config' and /etc/vhosts/webapp-config for further details
  3. install 3rd party stuff
    • emerge --ask dev/php5/jpgraph
    • that will put jpgraph src files in /usr/share/php5/jpgraph (if you're on PHP5, which you should be)
  4. run mantis web installation
    • point your browser at http://yoursite/mantis/admin/install.php
    • follow the instructions on the resulting page
    • note that the 'Admin' user/pass is the one that you specified in the 'grant ...' mysql command above, whereas the Database user/pass is the one that will be used by mantis to make its initial mysql connections.  These needn't be the same, but since we already manually created the mantis mysql user in the steps above, it's both ok and advisable to use it for both.

  5. configure mantis
    • customize <mantis>/config_inc.php
    • most of the fields are self-explanatory
    • add the following to enable graphing:
      • $g_use_jpgraph = ON;
        $g_jpgraph_path = '/usr/share/php5/jpgraph/';
  6. point your browser at http://yoursite/mantis/admin/check.php to see if things are kosher.
  7. login (via http://yoursite/mantis) using the default user/pass of 'administrator/root', and then immediately create a new administrator level user.  An email gets sent for the new user, use the URL included in the email to verify the new user.  Then login as that new user and delete the default 'administrator' user.

  8. if you want to enable anonymous viewing of the (non-private) contents:
    1. See the mantis manual entry on the topic
    2. basically, create a new user named 'anonymous'
      • Access Level: Typically viewer or reporter depending on the requirement.
      • Enabled: true
      • Protected: true
    3. set the following configuration options in config_inc.php:
      • $g_allow_anonymous_login = ON;
        $g_anonymous_account = 'anonymous';
        

Finished!