Bug management is a crucial part of the software development process. Mantis Bug Tracker (MantisBT) is an easy-to-use and robust open source bug tracking system that allows you to track and manage bugs. This topic describes how to deploy MantisBT on a simple application server.
Prerequisites
A simple application server is created based on a LAMP application image, and the password of the preset MySQL database is obtained. For more information, see Build a LAMP development environment.
Step 1: Download MantisBT
Connect to a LAMP simple application server.
For more information, see Connect to a Linux server.
-
Run the following command to go to the website root directory:
cd /<Website root directory>The website root directory is different in the LAMP 6.1.0 and LAMP 7.4 application images.
For LAMP 6.1.0 application image, the website root directory is /home/www/htdocs.
For LAMP 7.4 application image, the website root directory is /data/wwwroot/example.
In this example, the LAMP 7.4 application image is used. Run the following command:
cd /data/wwwroot/example Run the following command to download the MantisBT package:
sudo wget https://downloads.sourceforge.net/project/mantisbt/mantis-stable/1.3.20/mantisbt-1.3.20.zip --no-check-certificateRun the following command to decompress the MantisBT package:
sudo unzip mantisbt-1.3.20.zipRun the following command to move all extracted MantisBT files to the website root directory:
sudo mv ./mantisbt-1.3.20/* ./To ensure system security, we recommend that you create a standard user to run MantisBT.
In this example, a standard user named www is created.
sudo useradd wwwRun the following command to change the owner of the files in the website root directory:
sudo chown -R www:www ./*
Step 2: Install and log on to MantisBT
-
On your computer, use a browser to access
http://<Public IP address of the LAMP simple application server>/index.php.NoteObtain the public IP address of the LAMP simple application server by clicking the card of the server to go to the Overview page.
-
Use a web browser to access
http://. The page displays the Pre-Installation Check results, which include the PHP version (7.4.21), UTF-8 support, Safe Mode, and a check for residual old configuration files such as/index.php config_inc.phpandcustom_constants_inc.php. The status for all check items is GOOD, indicating that the current environment meets the installation requirements for MantisBT.
-
-
In the Installation Options section, enter the database information for the LAMP server.
Enter the database password in the Password (for Database) field. You can find this password by following the instructions in View application information. Use the following values for the other fields: select
MySQL Improvedfor Type of Database, and enterlocalhostfor Hostname,rootfor Username, andbugtrackerfor Database name. -
At the bottom of the page, click Install/Upgrade Database.
-
After the page loads, scroll to the bottom of the Check and Install Database page and click create.
The Installation Complete page appears, confirming that MantisBT was installed successfully. The page prompts you to log in as an administrator and click the create link to create your first project.
-
Create a configuration file.
-
In the Write Configuration File(s) section, copy the configuration code. Because the installer cannot automatically write to the
config/config_inc.phpfile, you must add the generated code to it manually. This code includes settings like$g_hostname,$g_db_type,$g_database_name,$g_username,$g_db_password,$g_default_timezone, and$g_crypto_master_salt. Ensure the values match your environment. Run the following command to create a configuration file:
sudo vi /data/wwwroot/example/config/config_inc.phpPress the I key to enter the edit mode.
Paste the configuration information obtained in 5.a into the file.
Press the Esc key, enter :wq, and then press the Enter key to save the file.
-
-
Enter
http://<Public IP address of the LAMP simple application server>/login_page.phpin your local browser. On the logon page of MantisBT, use the default accountadministratorand default passwordrootto log on to MantisBT. -
In the upper-right corner of the page, click My Account to change the password of
administrator.administratoris the default account. After you log in for the first time, we recommend that you change the password. -
Click Update User.
You are redirected to the My View page on the Mantis Bug Tracker homepage. This confirms that you have successfully logged in as an administrator and can begin using MantisBT.