Mantis
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
sudo -i
Throughout the installation we assume sudoapt update
apt upgrade
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
apt -y install apache2
The Apache installation we also use for hosting Potreeapt install mariadb-server mariadb-client
Configuration of SQL
mysql -u root
[4]USE mysql;
ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password;
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Provide your root password here');
The single quotation marks are part of the command (Don't remove!)FLUSH PRIVILEGES;
QUIT;
mysql_secure_installation
During the questions that come up we followed the default recommended answers
Setting up the Mantis DB
mysql -u root -p
- If asked use the password you just set
CREATE USER 'mantisbt'@'localhost' IDENTIFIED BY 'Provide your mantis user password here';
The single quotation marks are part of the command (Don't remove!)CREATE DATABASE mantisbt;
GRANT ALL PRIVILEGES ON mantisbt.* TO 'mantisbt'@'localhost';
FLUSH PRIVILEGES;
QUIT;
Verify
Try to following command to verify up to now everything is properly setup
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
export VER="2.26.1"
, latest version check |herewget https://sourceforge.net/projects/mantisbt/files/mantis-stable/${VER}/mantisbt-${VER}.tar.gz
tar xvf mantisbt-${VER}.tar.gz
mv mantisbt-${VER}/ /srv/mantisbt
chown -R www-data:www-data /srv/mantisbt/
nano /etc/apache2/sites-enabled/mantisbt.conf
- 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]
vi /etc/apache2/ports.conf
- Add the line with the corresponding port for your setup
Listen 80
Listen 8082
Verify
apachectl -t
systemctl restart apache2
systemctl status apache2
Basic web interface configuration
- Go to http://yourip:8082
- 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
- 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
- ↑ https://mantisbt.org/
- ↑ https://computingforgeeks.com/install-and-configure-mantis-bug-tracker-on-ubuntu/
- ↑ https://stackoverflow.com/questions/64841185/error-1356-hy000-view-mysql-user-references-invalid-tables-or-columns-o
- ↑ https://stackoverflow.com/questions/64841185/error-1356-hy000-view-mysql-user-references-invalid-tables-or-columns-o/78136511#78136511
- ↑ https://sourceforge.net/projects/mantisbt/
- ↑ https://tecadmin.net/running-apache-on-multiple-ports/