Mantis Bug Tracker
Last Updated on 2025-02-02 21:35 by Sture
Descriptions
MantisBT is a web-based bug-tracking system made available to the public in November 2000. Over time, it has matured and gained much popularity, and now it has become one of the most popular open-source bug/issue tracking systems. MantisBT is developed in PHP, with support for multiple database backends, including MySQL, MS SQL, and PostgreSQL.
MantisBT, as a PHP script, can run on any operating system that is supported by PHP and has support for one of the DBMSes that are supported. MantisBT runs fine on Windows, Linux, macOS, and Unix operating systems.
Requirements
Install required PHP modules with:
user@freebsdsrv:~ $ sudo pkg install php84 php84-mysqli php84-mbstring php84-ctype php84-filter php84-session php84-tokenizer php84-curl php84-GD php84-fileinfo php84-soap php84-xml [enter]
...
user@freebsdsrv:~ $
Download phpMyAdmin Code
Download the current version of phpMyAdmin code with:
user@freebsdsrv:~ $ fetch https://sourceforge.net/projects/mantisbt/files/mantis-stable/2.27.0/mantisbt-2.27.0.tar.gz [enter]
mantisbt-2.27.0.tar.gz 15 MB 417 kBps 37s
user@freebsdsrv:~ $
Extract the Mantis Bug Tracker code
user@freebsdsrv:~ $ sudo tar zxvf mantisbt-2.27.0.tar.gz -C /usr/local/www/ [enter]
x mantisbt-2.27.0/
x mantisbt-2.27.0/bug_monitor_add.php
x mantisbt-2.27.0/bug_view_advanced_page.php
x mantisbt-2.27.0/account_prof_menu_page.php
x mantisbt-2.27.0/tag_create.php
...
x mantisbt-2.27.0/manage_proj_cat_delete.php
x mantisbt-2.27.0/bug_actiongroup_ext_page.php
x mantisbt-2.27.0/tag_view_page.php
x mantisbt-2.27.0/manage_proj_create.php
user@freebsdsrv:~ $
Delete the downloaded file mantisbt-2.27.0.tar.gz with:
user@freebsdsrv:~ $ rm mantisbt-2.27.0.tar.gz [enter]
user@freebsdsrv:~ $
Configuration
Rename the Mantis Bug Tracker directory with:
user@freebsdsrv:~ $ sudo mv /usr/local/www/mantisbt-2.27.0/ /usr/local/www/mantisbt/ [enter]
user@freebsdsrv:~ $
Change file owner and group on the Mantis Bug Tracker directory with:
user@freebsdsrv:~ $ sudo chown -R root:www /usr/local/www/mantisbt ; sudo ls -l /usr/local/www/mantisbt/ [enter]
user@freebsdsrv:~ $
Change file owner and group on the Mantis Bug Tracker directory with:
user@freebsdsrv:~ $ sudo chmod 775 /usr/local/www/mantisbt ; sudo ls -l /usr/local/www/ [enter]
...
drwxr-xr-x 16 root www 226 Sep 29 19:11 mantisbt/
...
user@freebsdsrv:~ $
Create an Apache Include file to make Mantis Bug Tracker available on the website with:
user@freebsdsrv:~ $ sudo ee /usr/local/etc/apache24/Includes/mantisbt.conf [enter]
Add the following text;
Alias /mantisbt/ "/usr/local/www/mantisbt/"
<Directory "/usr/local/www/mantisbt/">
DirectoryIndex index.php
Options None
AllowOverride Limit
# range of access allowed
Require ip 127.0.0.1 192.168.1.0/24
</Directory>
N.B.: Access is only allowed from computers connected to the network 192.168.1.0/24, the same network as this FreeBSD server!
Restart Apache
Restart Apache for the changes to take effect:
user@freebsdsrv:~ $ sudo service apache24 restart [enter]
Performing sanity check on apache24 configuration:
Syntax OK
Stopping apache24.
Waiting for PIDS: 9059.
Performing sanity check on apache24 configuration:
Syntax OK
Starting apache24.
user@freebsdsrv:~ $
Create the WordPress MariaDB Database
Log in to the MariaDB console with:
user@freebsdsrv:~ $ sudo mysql -u root -p [enter]
Enter password: <-- DBpassWD [enter]
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 11.4.4-MariaDB FreeBSD Ports
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
root@localhost [(none)]>
Create a Mantis Bug Tracker database with:
root@localhost [(none)]> CREATE DATABASE bugtracker; [enter]
Query OK, 1 row affected (0.000 sec)
root@localhost [(none)]>
Create a database user and password to manage the sudo mysql -u root -p database with:
root@localhost [(none)]> GRANT ALL PRIVILEGES ON 'bugtracker'.* TO 'btdbuser'@'localhost' IDENTIFIED BY 'btDBpassWd' WITH GRANT OPTION; [enter]
Query OK, 0 rows affected (0.859 sec)
root@localhost [(none)]>
Flush privileges with:
root@localhost [(none)]> FLUSH PRIVILEGES; [enter]
Query OK, 0 rows affected (0.000 sec)
root@localhost [(none)]>
Exit the MariaDB console with:
root@localhost [(none)]> exit [enter]
Bye
user@freebsdsrv:~ $
Access the Mantis Bug Tracker README file via https://192.168.1.50/mantisbt/README.md
Access the Mantis Bug Tracker install file via https://192.168.1.50/mantisbt/admin/install.php
Warning: If the error message Can’t retrieve web page at… is displayed during the web-based installation, then perform the following workaround:
user@freebsdsrv:~ $ sudo ee +504 /usr/local/www/mantisbt/admin/install.php [enter]
Change $t_hard_fail = true; to $t_hard_fail = false;
…and continue the installation process.
Access the Mantis Bug Tracker dashboard via https://192.168.1.50/mantisbt/.
Log in as user ‘administrator’ with password ‘root’ and then change the administrator password.
The “admin” directory should be removed after you have verifyed that all is OK.
Remove the “admin” directory with:
user@freebsdsrv:~ $ sudo rm -R /usr/local/www/mantisbt/admin [enter]
user@freebsdsrv:~ $