6 C
Texas
angeloma
Senior Writer and partner

Install Mantis Bug Tracker on Ubuntu 18.04?

f you are a developer you know that bugs are always present in the process of building a program. Especially if we work as a team on certain projects. Therefore, it is necessary to have software that can distribute the workflow of the project or simply track these problems. That is why today I will show you how to install Mantis Bug tracker on a server with Ubuntu 18.04.

Mantis Bug Tracker is an open source application that is used to test automated solutions, keeping a historical record of alterations and managing work teams remotely.

On the other hand, Mantis Bug Tracker allows the team to report errors and organize who can take care of them. Users are able to get started in minutes and start managing their projects while collaborating with their teammates and clients effectively.

So, let us start.

1.- Install Apache web server and PHP

- Advertisement -

Mantis Bug Tracker requires a web server to work. You can use Apache or Nginx but in this case, I will use Apache because it is very easy to use.

So, open a terminal and run:

:~$ sudo apt install apache2

1.- Install Apache2
1.- Install Apache2

After that, enable and start the Apache web server service.

:~$ sudo systemctl enable apache2
:~$ sudo systemctl start apache2

2.- Enabling apache2 service
2.- Enabling apache2 service

Next, you have to install PHP and wget. The program is built using PHP as the programming language. Wget is a CLI tool for download files.

:~$ sudo apt install php php-cli php-fpm php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath

3.- Install PHP
3.- Install PHP

Then, you have to test the PHP installation. Create a file in the /var/www/html/ folder named test.php.

:~$ sudo nano /var/www/html/test.php

Now, put the following:

<?php
phpinfo();
?>

4.- PHP info
4.- PHP info

Now, save the changes by pressing CTRL + O and next close the file by pressing CTRL + X.

Next, restart Apache.

:~$ sudo systemctl restart apache2

After that, open the web browser and go to http://SERVER_IP/test.php.

5.- PHP info function
5.- PHP info function

So, PHP and Apache are correctly installed.

2. Install MariaDB

The next step to install Mantis Bug Tracker is to install a database driver. Currently, Mantis is compatible with MariaDB, MySQL, and PostgreSQL. I will choose MariaDB because it is in the official repositories.

:~$ sudo apt install mariadb-server

6.- Install MariaDB
6.- Install MariaDB

After that, set a root password using the mysql_secure_installation script.

:~$ sudo mysql_secure_installation

7.- Using the mysql_secure_installation script
7.- Using the mysql_secure_installation script

You can also make other settings by answering each question. I’ll do it this way: Y, N, Y, Y.

Then, it is necessary to create a new database and user for Mantis.

:~$ sudo mysql -u root -p
CREATE DATABASE mantisdb;
GRANT ALL PRIVILEGES ON mantisdb.* TO 'mantisuser'@'localhost' IDENTIFIED BY 'mantispss';
FLUSH PRIVILEGES;
exit;

8.- Creating a new database for Mantis
8.- Creating a new database for Mantis

3. Install Mantis Bug Tracker

At the time of writing this post the latest stable version of Mantis is 2.19.0 so let’s download it.

:~$ wget https://liquidtelecom.dl.sourceforge.net/project/mantisbt/mantis-stable/2.19.0/mantisbt-2.19.0.zip

9.- Download mantis
9.- Download mantis

Next, decompress it.

:~$ unzip mantisbt-2.19.0.zip

And move it to the /srv folder.

:~$ sudo mv mantisbt-release-2.19.0/ /srv/mantis/

10.- Moving the folder
10.- Moving the folder

Set the right permissions to the folder.

:~$ sudo chown -R www-data:www-data /srv/mantisbt-2.19.0/
:~$ sudo chmod -R 755 /srv/mantisbt-2.19.0/

11.- set the right permissions
11.- set the right permissions

Create a new virtual host for Mantis.

:~$ sudo nano /etc/apache2/sites-enabled/mantis.conf

Then, add the following.

<VirtualHost *:80>
        ServerAdmin [email protected]
        DocumentRoot "/srv/mantisbt-2.19.0"
        ServerName bt.osradar.lan
        ServerAlias www.bt.osradar.lan
        ErrorLog "/var/log/apache2/mantisbt-error_log"
        TransferLog "/var/log/apache2/mantisbt-access_log"
        <Directory "/srv/mantisbt-2.19.0">
                DirectoryIndex index.php index.html
                Options FollowSymLinks
                AllowOverride None
                Require all granted
                Options MultiViews FollowSymlinks
        </Directory>
</VirtualHost>

12.- Creating a new virtualhost
12.- Creating a new virtual host

So, restart apache.

:~$ sudo systemctl restart apache2

And complete the installation using the web interface.

4. Complete the installation

Now, go to the web browser and complete the installation.

13.- Install Mantis Bug Tracker
13.- Install Mantis Bug Tracker

After that, you have to add the MySQL credentials.

14.- MySQL credentials
14.- MySQL credentials

If everything is OK, at the end of the page, you will see this.

15.- It's ok
15.- It’s ok

Next, log in. The user is administrator and the password is root.

16.- Mantris Log in
16.- Mantris Log in

Finally, you will see the main screen.

17.- Dashboard
17.- Dashboard

So, that’s it.

Conclusion

The Mantis installation process is quite simple but it will help you to manage and locate project bugs in an easy and agile way.

Please share this post with your friends.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article