12

Install Mantis Bug Tracker on Rocky Linux 8 /CentOS 8

 3 years ago
source link: https://computingforgeeks.com/install-mantis-bug-tracker-on-rocky-centos-linux/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Install Mantis Bug Tracker on Rocky Linux 8 /CentOS 8

Welcome to our guide on how to install Mantis Bug Tracker on CentOS 8 / Rocky Linux 8. A bug tracking system, also known as a defect tracking system is a software that helps one to keep track of reported bugs in software development projects. This is always a necessary tool for any professional software development infrastructure.

Mantis Bug Tracker(MantisBT) being one of the popular Bug Tracking systems, is a free and open-source web-based tool used for bug tracking. It is a simple, easy-to-use, and user-friendly software written in PHP language. It is built with a lot of tools to help you resolve bugs and issues quickly. These features include; role-based access control, notification via email, category support, projects and sub-projects, issue relationship graph, customizable dashboard e.t.c

Mantis Bug Tracker has the following key features:

  • revision control integration
  • optional wiki and chat integration
  • document management
  • project, sub-project, and category support
  • customizable issue pages and workflow
  • reporting and graphing
  • user-based security
  • e-mail and RSS feed support
  • advanced search tools
  • time tracking
  • user and issue grouping
  • mobile access through MantisTouch[9]
  • customizable fields and personal start pages

Step 1: Install LAMP Server on CentOS 8 / Rocky Linux 8

We will need to install the LAMP Server (Apache, MariaDB, PHP e.t.c) on CentOS 8 / Rocky Linux 8.

Here there is a single command to get all these installed on CentOS 8 / Rocky Linux 8.

sudo dnf install httpd mariadb-server php php-mysqli php-mbstring php-curl unzip -y

With all these packages installed, start and enable Apache and MariaDB using the below commands:

sudo systemctl start httpd
sudo systemctl start mariadb
sudo systemctl enable httpd
sudo systemctl enable mariadb

Step 2: Create a MantisBT Database

In this guide, we will use the installed MariaDB to create a backend database for Mantis Bug Tracker.

Harden MariaDB:

sudo mysql_secure_installation

Proceed as below to harden MariaDB.

.........
Enter current password for root (enter for none): just press enter
.....
Set root password? [Y/n] y
New password: set a password
Re-enter new password: re-enter the password
.......
Remove anonymous users? [Y/n] y
 ... Success!
..........
Disallow root login remotely? [Y/n] y
 ... Success!
............
Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
..........
Reload privilege tables now? [Y/n] y
 ... Success!
..........

Login to MariaDB shell using the password set above

mysql -u root -p

Now create a database for MantisBT

CREATE DATABASE mantisdb;
GRANT ALL PRIVILEGES ON mantisdb.* TO 'mantis'@'localhost' IDENTIFIED BY 'Passw0rd';

Then flush privileges and exit the MariaDB shell.

FLUSH PRIVILEGES;
 EXIT;

Restart MariaDB.

sudo systemctl restart mariadb

Step 3: Install Mantis Bug Tracker on CentOS 8 / Rocky Linux 8.

We are now set to install MantisBT on CentOS 8 / Rocky Linux 8. We first need to download the latest stable version of MantisBT from the MantisBT official downloads page.

Alternatively, obtain the download link and download Mantis Bug Tracker using the Wget command. Ensure that Wget is installed on your system using sudo yum install wget

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

With the file downloaded, extract it to your default web root directory /var/www/html/

unzip mantisbt-2.25.2.zip

Move the extracted file to /var/www/html/ as below.

sudo mv mantisbt-2.25.2 /var/www/html/mantisbt

Change the ownership of the file to Apache as below.

sudo chown -R apache:apache /var/www/html/mantisbt

Step 4: Create Mantis Bug Tracker Apache Site Configuration.

We need to create a configuration file for MantisBT.

sudo vi /etc/httpd/conf.d/mantisbt.conf

In the file, add the below content.

<VirtualHost *:80>
    DocumentRoot "/var/www/html/mantisbt"

    ServerName mantisbt.example.com

    ErrorLog "/var/log/httpd/mantisbt_error_log"
    CustomLog "/var/log/httpd/mantisbt_access_log" combined

        <Directory "/var/www/html/mantisbt/">
            DirectoryIndex index.php 
            Options -Indexes +FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

</VirtualHost>

Now restart Apache:

sudo systemctl restart httpd

Check the status of the service:

$ systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─php-fpm.conf
   Active: active (running) since Sat 2021-09-04 05:52:17 EDT; 11s ago
     Docs: man:httpd.service(8)
 Main PID: 5415 (httpd)
   Status: "Running, listening on: port 80"
    Tasks: 213 (limit: 9688)
   Memory: 24.6M
   CGroup: /system.slice/httpd.service
           ├─5415 /usr/sbin/httpd -DFOREGROUND
           ├─5417 /usr/sbin/httpd -DFOREGROUND
           ├─5418 /usr/sbin/httpd -DFOREGROUND
           ├─5419 /usr/sbin/httpd -DFOREGROUND
           └─5420 /usr/sbin/httpd -DFOREGROUND

Sep 04 05:52:16 rockylinux8.linuxvmimages.local systemd[1]: httpd.service: Succeeded.
Sep 04 05:52:16 rockylinux8.linuxvmimages.local systemd[1]: Stopped The Apache HTTP Server.
Sep 04 05:52:16 rockylinux8.linuxvmimages.local systemd[1]: Starting The Apache HTTP Server...
Sep 04 05:52:17 rockylinux8.linuxvmimages.local systemd[1]: Started The Apache HTTP Server.
Sep 04 05:52:17 rockylinux8.linuxvmimages.local httpd[5415]: Server configured, listening on: port 80

Step 5: Configure SELinux and Firewall on CentOS 8 / Rocky Linux 8.

SELinux is enabled by default on CentOS 8 / Rocky Linux 8 systems. So for it to allow MantisBT to run, we must configure it as below:

sudo setsebool httpd_can_network_connect on -P
sudo chcon -R -u system_u -t httpd_sys_rw_content_t -r object_r /var/www/html/mantisbt

Next, we allow ports 80 and 443 through the firewall.

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload

Step 6: Access the Mantis Bug Tracker Web Interface

With all the above settings done correctly, we are now set to access the MantisBT web interface. The page will be accessed using the URL http://IP_Address or http://HOSTNAME

On this page, scroll down and provide your database name(matisdb), the username(mantis), password(Passw0rd), and timezone(Nairobi). Then click on Install/Upgrade Database as shown.

Once the installation is complete, you will be required to log in to MantisBT. Here use the default logins for Mantis Bug Tracker. Username: administrator password: root

On successful login, you will see this screen. It is recommended to change your administrator password. Set a new password by filling in the required details and click on update user when done.

You will be required to log in again using the newly created password for the user: administrator as shown.

On successful login, you should be able to see the MantisBT issues dashboard as shown.

Navigate between tabs on the left panel. The view tab contains unassigned and resolved bugs

The view issues tab shows all the information about the bugs.

On the manager tab, you can manage users, projects, configuration files e.t.c

With this simple interface, MantisBT is easy to use for anyone.

Conclusion.

This marks the end of our guide on how to install Mantis Bug Tracker on CentOS 8 / Rocky Linux 8. You are now set to implement the Mantis Bug tracker in your development environment and collaborate with teams. I hope this guide was helpful

See more on this page:


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK