Welcome to our tutorial on how to installing Mantis Bug Tracker. Mantis Bug Tracker (MantisBT), is a popular free web-based bug tracking system. It is written in PHP and supports to multiple database backends including MySQL, MS SQL and PostgreSQL.
Installing Mantis Bug Tracker on Debian 10
MantisBT is PHP based and supports a variety of database backends as mentioned above. In this guide, however, we will install Mantis bug tracker with MariaDB as the database backend. This therefore means that you need to a LAMP stack up and running for you to run Mantis bug tracker on Debian 10.
Install LAMP Stack on Debian 10
As already mentioned above, in this guide, we will setup MantisBT to use MySQL 8 database backend. As such, begin by installing LAMP stack on Debian 10.
We have already covered the installation of LAMP Stack on Debian 10 in a separate tutorial whose link is provided below;
Install LAMP Stack on Debian 10
The guide reference above uses PHP 7.3. However, if you need to install PHP 7.4, add SURY PPA repos and proceed as follows;
apt -y install lsb-release apt-transport-https ca-certificates wget
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
apt update
Next, install PHP 7.4 and other other PHP extensions and other packages;
apt install php libapache2-mod-php php-{mysql,date,json,mbstring,curl,gd,ldap,intl,xml,zip,bcmath,pear} libpcre3 libpcre3-dev zip
Create MantisBT Database and Database User
Login to MySQL and create MantisBT database and database user. Be sure to replace the names of the database, database user and the password.
mysql
If you have enabled password authentication;
mysql -u root -p
Then create database and database user;
create database mantisbt;
create user mantisadmin@localhost identified by 'changeme';
grant all on mantisbt.* to mantisadmin@localhost;
Reload privileges tables and exit the database connection.
flush privileges;
quit
Restart MariaDB database service.
systemctl restart mariadb
Installing Mantis Bug Tracker
Download MantisBT archive
Download the latest stable MantisBT release from the downloads page.
You can simply obtain the url and pull it using wget. For example, to download the current stable release (v2.24.3) as of this writing, simply run the command below;
wget https://tenet.dl.sourceforge.net/project/mantisbt/mantis-stable/2.24.3/mantisbt-2.24.3.zip
Extract MantisBT Archive
Extract MantisBT and move it to your default web root directory.
unzip mantisbt-2.24.3.zip
mv mantisbt-2.24.3 /var/www/html/mantisbt
Create Apache MantisBT Site Configuration
Next, create Apache MantisBT site configuration.
vim /etc/apache2/sites-available/mantisbt.conf
<VirtualHost *:80>
DocumentRoot "/var/www/html/mantisbt"
ServerName mantisbt.kifarunix-demo.com
ErrorLog "/var/log/apache2/mantisbt_error_log"
CustomLog "/var/log/apache2/mantisbt_access_log" combined
<Directory "/var/www/html/mantisbt/">
DirectoryIndex index.php
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Save and exit the configuration file. Be sure to set the proper settings as per your setup.
Check Apache Syntax configuration;
apachectl -t
Disable the default Apache site;
a2dissite 000-default.conf
Enable MantisBT site;
a2ensite mantisbt.conf
Change the ownership of the MantisBT web root directory;
chown -R www-data: /var/www/html/mantisbt
Restart Apache;
systemctl restart apache2
Accessing MantisBT Web Interface
To allow external access, you need to open port 80/tcp on UFW if it is running (ufw is).
ufw allow Apache
Now access MantisBT using the URL http://server-IP-or-domain
.
Go through the Pre-Installation Check and ensure everything is good.
Configure MantisBT database connections;
Click Install/Upgrade Database
button to install setup MantisBT DB.
Once the installation completes, you should see such an interface.
Rename the admin directory and click Continue to proceed to the login page.
mv /var/www/html/mantisbt/admin{,-old}
The default login credentials are:
- Username:
administrator
- Password:
root
Upon successful login, you land on MantisBT dashboard.
Reset your admin password.
MantisBT issues Dashboard.
You can now continue to explore MantisBT.
That marks the end of our guide on how to install Mantis Bug Tracker on Debian 10.
Reference
Other Guides
Install Bugzilla Bug Tracker on Ubuntu 20.04
Install Bugzilla Bug Tracker on CentOS 8