How to install MantisBT CMS on Ubuntu 22.04
- 00:58 lsb_release -a
- 01:07 apt install php php-xml php-mysql php-mbstring php-zip php-soap php-curl php-gd php-ldap php-imap php-common php-dev libmcrypt-dev php-pear
- 01:38 mysql
- 01:57 create database mantisdb;
- 02:39 create user 'mantisuser'@'localhost' identified by 'linux@123';
- 03:29 grant all privileges on mantisdb.* to 'mantisuser'@'localhost';
- 03:42 flush privileges;
- 03:48 \q
- 03:57 wget https://sourceforge.net/projects/mantisbt/files/latest/download
- 04:15 unzip download
- 04:52 mv mantisbt-2.26.2 /var/www/mantis
- 05:20 chown -R www-data:www-data /var/www/mantis
- 05:38 chmod -R 755 /var/www/mantis
- 06:03 vim /etc/apache2/sites-available/mantis.conf
- 06:35 a2dissite 000-default.conf
- 06:51 a2ensite mantis.conf
- 07:11 a2enmod rewrite
- 07:23 systemctl restart apache2
To Install MantisBT CMS On Ubuntu 22.04
Introduction:
Mantis is an open-source bug-tracking system that is freely available and developed in PHP, with compatibility for various database servers. It features an advanced dashboard designed for efficient management of assigned bugs. Furthermore, Mantis includes comprehensive access control capabilities, enabling user permissions to be customized on a per-project basis. The system also offers significant flexibility, allowing for the customization of issue fields, notifications, and workflow processes.
Procedure:
Step – 1 : Check the OS version
root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
Step – 2 : Now install dependencies by using following command
root@linuxhelp:~# apt install php php-xml php-mysql php-mbstring php-zip php-soap php-curl php-gd php-ldap php-imap php-common php-dev libmcrypt-dev php-pear
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libflashrom1 libftdi1-2 libllvm13
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
apache2 apache2-bin apache2-data apache2-utils autoconf automake autopoint autotools-dev binutils binutils-common binutils-x86-64-linux-gnu
build-essential debhelper debugedit dh-autoreconf dh-strip-nondeterminism dpkg-dev dwz fakeroot g++ g++-11 gcc gcc-11 gettext intltool-debian
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapache2-mod-php8.1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
libaprutil1-ldap libarchive-cpio-perl libarchive-zip-perl libasan6 libbinutils libc-client2007e libc-dev-bin libc-devtools libc6 libc6-dbg
Setting up pkg-php-tools (1.42build1) ...
Processing triggers for ufw (0.36.1-4ubuntu0.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for install-info (6.8-4build1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for php8.1-cli (8.1.2-1ubuntu2.18) ...
Processing triggers for libapache2-mod-php8.1 (8.1.2-1ubuntu2.18) ...
Step – 3 : Login to the MySQL console
root@linuxhelp:~# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.39-0ubuntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Step – 4 : Create a database by using following command
mysql> create database mantisdb;
Query OK, 1 row affected (0.03 sec)
Step – 5 : Create a user by using following command
mysql> create user 'mantisuser'@'localhost' identified by 'linux@123';
Query OK, 0 rows affected (0.08 sec)
Step – 6 : Give permission to the user for the database
mysql> grant all privileges on mantisdb.* to 'mantisuser'@'localhost';
Query OK, 0 rows affected (0.01 sec)
Step – 7 : Flush the previleges
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
Step – 8 : Exit from the mysql console
mysql> \q
Bye
Step – 9 : Download the Mantis package by using wget command
root@linuxhelp:~# wget https://sourceforge.net/projects/mantisbt/files/latest/download
--2024-08-20 03:36:37-- https://sourceforge.net/projects/mantisbt/files/latest/download
Resolving sourceforge.net (sourceforge.net)... 104.18.13.149, 104.18.12.149, 2606:4700::6812:d95, ...
Connecting to sourceforge.net (sourceforge.net)|104.18.13.149|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://downloads.sourceforge.net/project/mantisbt/mantis-stable/2.26.2/mantisbt-2.26.2.zip?ts=gAAAAABmw8HugyAE3fiSz9EP3vMPWfVcOGIaGxqpRIQJFul3H3Y-JtOY4Vq_kw0teBoW0OPMctUbH1QKDh2nCjEI6RZBYU1SRw%3D%3D&use_mirror=excellmedia&r= [following]
--2024-08-20 03:36:38-- https://downloads.sourceforge.net/project/mantisbt/mantis-stable/2.26.2/mantisbt-2.26.2.zip?ts=gAAAAABmw8HugyAE3fiSz9EP3vMPWfVcOGIaGxqpRIQJFul3H3Y-JtOY4Vq_kw0teBoW0OPMctUbH1QKDh2nCjEI6RZBYU1SRw%3D%3D&use_mirror=excellmedia&r=
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 204.68.111.105
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|204.68.111.105|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://excellmedia.dl.sourceforge.net/project/mantisbt/mantis-stable/2.26.2/mantisbt-2.26.2.zip?viasf=1 [following]
--2024-08-20 03:36:39-- https://excellmedia.dl.sourceforge.net/project/mantisbt/mantis-stable/2.26.2/mantisbt-2.26.2.zip?viasf=1
Resolving excellmedia.dl.sourceforge.net (excellmedia.dl.sourceforge.net)... 202.153.32.19, 2401:fb00:0:1fe:8000::5
Connecting to excellmedia.dl.sourceforge.net (excellmedia.dl.sourceforge.net)|202.153.32.19|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17180250 (16M) [application/octet-stream]
Saving to: ‘download’
download 100%[========================================================================>] 16.38M 9.66MB/s in 1.7s
2024-08-20 03:36:43 (9.66 MB/s) - ‘download’ saved [17180250/17180250]
Step – 10 : Extract the downloaded package by using following command
root@linuxhelp:~# unzip download
Archive: download
creating: mantisbt-2.26.2/
inflating: mantisbt-2.26.2/xmlhttprequest.php
inflating: mantisbt-2.26.2/manage_plugin_update.php
inflating: mantisbt-2.26.2/file_download.php
inflating: mantisbt-2.26.2/bug_view_advanced_page.php
Step – 11 : Move the extracted folder to the Apache default document root directory path
root@linuxhelp:~# mv mantisbt-2.26.2 /var/www/mantis
Step – 12 : Change the ownership for the directory recursively using following command
root@linuxhelp:~# chown -R www-data:www-data /var/www/mantis
Step – 13 : Change the permission for the directory recursively using following command
root@linuxhelp:~# chmod -R 755 /var/www/mantis
Step – 14 : Create a virtual host file
root@linuxhelp:~# vim /etc/apache2/sites-available/mantis.conf
Add the following lines
<Virtualhost *:80>
Servername www.linuxhelp1.com
documentroot /var/www/mantis
<directory /var/www/mantis>
allowoverride all
allow from all
</directory>
</Virtualhost>
Step – 15 : Disable Apache default welcome page by using following command
root@linuxhelp:~# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
systemctl reload apache2
Step – 16 : Enable Mantis site by using following command
root@linuxhelp:~# a2ensite mantis.conf
Enabling site mantis.
To activate the new configuration, you need to run:
systemctl reload apache2
Step – 17 : Enable rewrite module by using following command
root@linuxhelp:~# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
systemctl restart apache2
Step – 18 : Restart Apache to apply changes
root@linuxhelp:~# systemctl restart apache2
Step – 19 : Then go to the browser. And search with your server ip address.

Step – 20 : Here enter the database credentials. Then click install and upgrade database button

Step – 21 : Check and install database

Step – 22 : Now we will reach the mantis Login page. Enter default username as Administrator, and Password as root.

Step – 23 : This is the mantis Dashboard page. You can add your project, and track bugs with php.

Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to install MantisBT CMS on Ubuntu 22.04. Your feedback is much welcome.
Comments ( 0 )
No comments available