Atlantic.Net Blog

How to Setup Mantis Bug Tracker on Debian 10

Hitesh Jethva
by Atlantic.Net (160posts) under VPS Hosting
0 Comments

Mantis is one of the most popular web-based bug tracking systems used to track software defects. It also supports release and issues tracking for managing various releases of a project. Mantis is written in PHP and supports several databases including MySQL, PostgreSQL, and MS SQL. It comes with a lot of built-in tools that help you to collaborate with teams to resolve bugs easily from a web-based interface.

If you are looking for a self-hosted bug tracking system, then MantisBT is the best choice for you.

In this tutorial, we will show you how to install and configure the Mantis bug tracking system on Debian 10.

Prerequisites

  • A fresh Debian 10 VPS on the Atlantic.Net Cloud Platform
  • A valid domain name pointed to your server IP
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Debian 10 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your Debian 10 server, run the following command to update your base system with the latest available packages.

apt-get update -y

Step 2 – Install Nginx, MariaDB and PHP

First, you will need to install the Nginx web server, MariaDB, PHP and other PHP extensions to your server. You can install all required packages with the following command:

apt-get install nginx mariadb-server php php-fpm php-mysql php-cli php-ldap php-zip php-curl php 
php-cli php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-pear php-bcmath unzip -y

After installing all the packages, tweak the PHP settings by editing the file php.ini:

nano /etc/php/7.3/fpm/php.ini

Change the following settings:

file_uploads = On
allow_url_fopen = On
short_open_tag = On
cgi.fix_pathinfo = 0
memory_limit = 512M
upload_max_filesize = 100M
max_execution_time = 300
max_input_vars = 1600
date.timezone = America/Chicago

Save and close the file when you are finished.

Step 3 – Configure MariaDB Database

Mantis uses MariaDB as a database backend, so you will need to create a database and user for Mantis.

First, log in to MariaDB with the following command:

mysql

Once logged in, create a database and user with the following command:

CREATE DATABASE mantisdb;
GRANT ALL PRIVILEGES ON mantis.* TO 'mantisuser'@'localhost' IDENTIFIED BY 'secure-
password';

Next, flush the privileges and exit from the MariaDB shell with the following command:

FLUSH PRIVILEGES;
EXIT;

Step 4 – Download MantisBT

First, visit the Sourceforge website and download the latest version of MantisBT with the following command:

wget https://sourceforge.net/projects/mantisbt/files/mantis-stable/2.24.1/mantisbt-2.24.1.zip

Once the download is completed, unzip the downloaded file with the following command:

unzip mantisbt-2.24.1.zip

Next, move the extracted directory to the Nginx root directory with the following command:

mv mantisbt-2.24.1 /var/www/html/mantisbt

Next, set proper permissions and ownership to the mantisbt directory:

chown -R www-data:www-data /var/www/html/mantisbt
chmod -R 755 /var/www/html/mantisbt

Step 5 – Configure Nginx for MantisBT

Next, you will need to create an Nginx virtual host configuration file to host Mantis. You can create it with the following command:

nano /etc/nginx/sites-available/mantisbt

Add the following lines:

server {
listen 80;
server_name mantisbt.example.com;
root /var/www/html/mantisbt;
index index.php;

access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log;

client_max_body_size 100M;

autoindex off;

location / {
index index.html index.php;
try_files $uri /index.php$is_args$args;
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
include fastcgi_params;
fastcgi_intercept_errors on;
}
}

Save and close the file, then enable the Mantis virtual host with the following command:

ln -s /etc/nginx/sites-available/mantisbt /etc/nginx/sites-enabled/

Next, verify Nginx for any syntax errors using the following command:

nginx -t

You should get the following output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Finally, restart the Nginx service to apply the changes:

systemctl restart nginx

Step 6 – Access Mantis Web UI

Now, open your web browser and access the Mantis web interface using the URL http://mantisbt.example.com. You should see the following page:

Provide your database information and timezone and click on the Install/Upgrade Database button. You should see the following page:

Now, click on the Continue button. You should see the Mantis login page:

Provide default username as administrator and click on the Login button. You should see the following page:

Provide default password as root and click on the Login button. You should see the following page:

Change your current password and click on the Update User button. You should see the following page:

Conclusion

In the above guide, you learned how to install Mantis bug tracking system on Debian 10. You can now start implementing Mantis in the development environment and manage your project and code from the central location. Try out Mantis on your VPS Hosting account from Atlantic.Net!

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources