Mantis

From OpenStreetMap Wiki
Jump to navigation Jump to search

Description

Mantis[1] is a FOSS development for issue tracking systems, project management tools and web-based bug tracking systems.

Being FOSS and over the years actively being supported by many smaller development projects generating plugins, it's a mature package that offers today a wide variety of options and features to its users beyond the original intend of just being a bug tracker. With all the plugins being configurable to support planning, group, collaboration, resource management, scheduling, time management, documenation and many more features it's very well suited for coordinated survey and mapping efforts by larger teams such as, but not limited to, companies and LGUs.

1. Installation and configuration of the database[2][3]

Keep in mind our systems are all running Ubuntu 22.04 LTS latest upgrades/updates March 2024

Dependencies

  1. sudo -i Throughout the installation we assume sudo
  2. apt update
  3. apt upgrade
  4. apt install nano wget php php-cli php-fpm php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath
  5. apt -y install apache2 The Apache installation we also use for hosting Potree
  6. apt install mariadb-server mariadb-client

Configuration of SQL

  1. mysql -u root[4]
  2. USE mysql;
  3. ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password;
  4. SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Provide your root password here'); The single quotation marks are part of the command (Don't remove!)
  5. FLUSH PRIVILEGES;
  6. QUIT;
  7. mysql_secure_installation During the questions that come up we followed the default recommended answers

Setting up the Mantis DB

  1. mysql -u root -p
  2. If asked use the password you just set
  3. CREATE USER 'mantisbt'@'localhost' IDENTIFIED BY 'Provide your mantis user password here'; The single quotation marks are part of the command (Don't remove!)
  4. CREATE DATABASE mantisbt;
  5. GRANT ALL PRIVILEGES ON mantisbt.* TO 'mantisbt'@'localhost';
  6. FLUSH PRIVILEGES;
  7. QUIT;

Verify

Try to following command to verify up to now everything is properly setup

  1. mysql -u mantisbt -p

2. Installation and configuration of Mantis

At the moment of this documentation Mantis version 2.26.1 has been deployed[5]

Download and unzip

  1. export VER="2.26.1", latest version check |here
  2. wget https://sourceforge.net/projects/mantisbt/files/mantis-stable/${VER}/mantisbt-${VER}.tar.gz
  3. tar xvf mantisbt-${VER}.tar.gz
  4. mv mantisbt-${VER}/ /srv/mantisbt
  5. chown -R www-data:www-data /srv/mantisbt/
  6. nano /etc/apache2/sites-enabled/mantisbt.conf
  7. Enter the following into this file, please note ServerName and ServerAlias are optional and should be omitted if you're not using any domains.
<VirtualHost *:8082>
        ServerAdmin admin@example.com
        DocumentRoot "/srv/mantisbt"
        ServerName bt.example.com
        ServerAlias www.bt.example.com
        ErrorLog "/var/log/apache2/mantisbt-error_log"
        TransferLog "/var/log/apache2/mantisbt-access_log"
        <Directory "/srv/mantisbt/">
                DirectoryIndex index.php index.html
                Options FollowSymLinks
                AllowOverride None
                Require all granted
                Options MultiViews FollowSymlinks
        </Directory>
</VirtualHost>

You also need to configure Apache to listen to the port *8082 (or any other port)[6]

  1. vi /etc/apache2/ports.conf
  2. Add the line with the corresponding port for your setup
Listen 80
Listen 8082

Verify

  1. apachectl -t
  2. systemctl restart apache2
  3. systemctl status apache2

Basic web interface configuration

  1. Go to http://yourip:8082
  2. Under the Installation Options select the following
    • Type of Database: MySQL Improved
    • Username (Database): mantisbt
    • Password (Database): Provide your mantis user password here Remember step 3 of Configuration of SQL?
    • Database name (Database): mantisbt
  3. Now at the bottom you can click on "Install/Upgrade Database"


The default login is username:administrator and password:root, clearly change this asap

Also either delete the admin directory within mantisbt or chown -R root admin and chmod -R a-rwx admin to avoid abuse. After setting up the system you don't need this directory anymore.

References