Commentary Archive October 2009

Mantis: Setting Up in a Hosted Environment

The Mantis Bug Tracker setup is simple when running in a local environment, where you can control everything. in a LAMP system (Linux, Apache, MySQL, PHP), the Mantis BT installer is capable of most of the install. Only one additional step (creation of a MySQL userid) may be needed. See Secure MySQL Setup for details.

In a hosted environment, there is more work to do. This description is based on using cPanel. The steps are as follows:

  1. create a new database for Mantis. From the Control Panel, select MySQL Databases. Under Databases, enter a new name and click the Add Database button.

  2. create a new User (or two for the secure setup). Under "Users" on the same page, enter the new user name, and click "Add User".

  3. Link the new user(s) to the database. In the "Databases" section, you should see an entry for the new database. Note that it will be prefixed by your user account name (e.g., xyz_mantis). Underneath that, there will be a dropdown menu listing all or your database users (similarly with names like xyz_mantisweb). In the simple case, select the "all" privileges checkbox and click "Add User to Database" button. The database is now ready to use. The listing will look similar to that below:

    Picture 5

  4. Copy the Mantis code to the hosted site. I usually ftp the code from my development site to the host. For a standard install, you can use the File Manager to upload the distribution .zip file to the "public_html" folder on your host. The folder can then be extracted by clicking on it, and selecting the "Extract Files from Folder" link.

  5. Make the new Mantis folder writable (to allow for initial setup). Select the Mantis folder in the File Manager, and select the "Change Permissions" link. Make the folder writable by clicking the checkbox at the intersection of "world" and "write" and clicking "Change". 

  6. Run the Mantis installer to complete the installation. Access the web page at http://<your host>/mantisbt/admin/install.php. This should check your server and present you with a list of options to initialize the system. The boxes should be filled in as follows:

    Type of Database
    Hostname (for Database Server)
    Username (for Database)
    Password (for Database)
    Database name (for Database)
    Admin Username (to create Database)
    Admin Password (to create Database)
    Print SQL Queries instead of Writing to the Database
    If you created a single user with all permissions, this is complete. Click the "Install/Upgrade Database" button to continue. In the dual user scenario, the user with all permissions goes in the lower set of username/password fields (Admin), and the lesser permissions goes in the upper block. 

    Note that you will see at least one "Possible Problem" while installing the database. The installer will complain about not being able to log in to MySQL without specifying a database, as well as not being able to create the database. These messages can be ignored.

  7. Make the new Mantis folder read-only again. Select the Mantis folder in the File Manager, and select the "Change Permissions" link. Make the folder unwritable by clicking the checkbox at the intersection of "world" and "write" and clicking "Change". 

Mantis should be fully functional now.


Copyright 2006, Logical Outcome Ltd.