How to Install MantisBT on Manjaro

MantisBT is a web-based bug tracking system that allows you to manage and track issues with your software. In this tutorial, we will walk you through the steps to install MantisBT on the Manjaro operating system.

Prerequisites

Step 1: Installing the Required Packages

We need to install the required packages for MantisBT to work properly. Open the terminal and run the following command:

sudo pacman -S apache mariadb php php-apache

This command installs the Apache web server, MariaDB database, PHP, and the necessary module to connect Apache and PHP.

Step 2: Setting up a Database for MantisBT

In this step, we will create a new database and grant privileges to a user. Open the terminal and run the following command:

sudo mysql -u root -p

After entering the MySQL root user password, create a new database by running:

CREATE DATABASE mantisdb;

Then, create a new user and grant privileges to the user. Replace newuser and password with your preferred username and password.

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON mantisdb.* TO 'newuser'@'localhost' WITH GRANT OPTION;

Exit the MySQL shell.

Step 3: Downloading and Extracting MantisBT

Download the latest version of MantisBT from the official website: https://www.mantisbt.org/download.php

Once the download is complete, extract the downloaded file to the document root of your Apache web server. Run the following command to extract:

sudo tar -xvf mantisbt-2.x.x.tar.gz -C /srv/http/

Note: The directory /srv/http/ is the default document root in Manjaro. Please adjust the path to where your web server is serving from.

Step 4: Configuring MantisBT

MantisBT requires some configuration to connect to the database we created earlier. In the same directory that you extracted MantisBT, you will find a config_inc.php.sample file.

Rename the file to config_inc.php.

sudo mv config_inc.php.sample config_inc.php

Open the config_inc.php file with any text editor and modify the database configuration according to your setup.

$g_hostname      = 'localhost';
$g_db_username   = 'newuser';
$g_db_password   = 'password';
$g_database_name = 'mantisdb';

Note: You can edit other configuration parameters in this file, such as email settings and LDAP authentication.

Step 5: Setting Permissions

In order for your web server to access MantisBT files, you need to set the correct permissions. Run the following command:

sudo chown -R http:http /srv/http/mantisbt*

This command sets the ownership of the MantisBT directory to HTTP, which is the user account that Apache uses to execute its processes.

Step 6: Accessing MantisBT

Now you are ready to access MantisBT through your browser. Visit http://localhost/mantisbt, and you should be greeted with the MantisBT login page.

Conclusion

In this tutorial, you have learned how to install MantisBT on Manjaro by setting up a web server, database, downloading MantisBT, configuring it and accessing it through a browser. You can now use MantisBT to manage and track issues with your software project.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!