Hello friends. In this post, you will learn how to install Mantis Bug Tracker on Debian 11.
Install LAMP on Debian 11
Mantis is a web application, so we need a web server and a database manager like MariaDB. To do all this in a single command line run.
sudo apt update
sudo apt install apache2 mariadb-server php libapache2-mod-php php-{mysql,date,json,mbstring,curl,gd,ldap,intl,xml,zip,bcmath,pear} libpcre3 libpcre3-dev
With this, you have a LAMP. Then we have to create a new database and user for Mantis.
Access the MariaDB console
sudo mysql -u root -p
Create the database
create database mantis;
Then the user with the password.
grant all privileges on mantis.* to 'user'@'localhost' identified by 'password';
Apply the changes and exit the console.
flush privileges;
exit;
Please don’t hesitate to change the database name, user, and password to whatever you want.
Download Mantis bug tracker in Debian 11
Now we can download the application. To achieve this, we must use the wget
command.
wget https://sourceforge.net/projects/mantisbt/files/mantis-stable/2.25.2/mantisbt-2.25.2.zip
Unzip it using unzip
. If you don’t have it, you can install it:
sudo apt install unzip
Now unzip it
unzip mantisbt-2.25.2.zip
Move the resulting folder to the Apache Document Root.
sudo mv mantisbt-2.25.2 /var/www/html/mantisbt
Make Apache the owner of the folder and assign the correct permissions to it.
sudo chown -R www-data: /var/www/html/mantisbt
sudo chmod 755 -R /var/www/html/mantisbt
Now create a new virtual host for Apache to better process Mantis.
sudo nano /etc/apache2/sites-available/mantisbt.conf
And add the following
<VirtualHost *:80>
DocumentRoot "/var/www/html/mantisbt"
ServerName mantis.unixcop.test
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>
Replace ServerName
with your domain.
Save the changes and close the editor.
Enable the new site and the rewrite
module.
sudo a2ensite mantisbt.conf
sudo a2enmod rewrite
Finally, restart Apache.
sudo systemctl restart apache2
Install Mantis bug tracker on Debian 11
Open your web browser and go to your domain to start the installation wizard.
There, the first thing you will see is the requirements to be met by the server.
Further down, you will have to enter the credentials of the database we created earlier.
After the installation will start and if all goes well you will see this message
Then you will see the login screen. Log in with administrator and the password root.
Now you will see the dashboard.
Enjoy it.
Conclusion
In this post, we have explained how to install Mantis Bug Tracker in Debian 11. Thanks for your attention.