How to install MantisBT CMS on Debian 12
To Install MantisBT CMS On Debian 12
Introduction:
Mantis is an open-source bug-tracking system that is available for free which is written in PHP, it is compatible with various database servers. Mantis offers a sophisticated dashboard for efficiently managing assigned bugs. Additionally, it boasts robust access control features, allowing for user access to be tailored on a per-project basis. The system is highly adaptable, permitting customization of issue fields, notifications, and workflow processes.
Installation Procedure:
Step 1: Check the OS version by using following command.
root@linuxhelp:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Step 2: Install the 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:
libc-ares2 libgrpc++1.51 libgrpc29 libprotoc32 libre2-9
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
autopoint debhelper dh-autoreconf dh-strip-nondeterminism dwz gettext
intltool-debian libapache2-mod-php8.2 libarchive-cpio-perl
libarchive-zip-perl libdebhelper-perl libfile-stripnondeterminism-perl
libmail-sendmail-perl libmcrypt4 libsub-override-perl
libsys-hostname-long-perl libzip4 php8.2 php8.2-cli php8.2-common
php8.2-curl php8.2-dev php8.2-gd php8.2-imap php8.2-ldap php8.2-mbstring
php8.2-mysql php8.2-opcache php8.2-readline php8.2-soap php8.2-xml
php8.2-zip pkg-php-tools po-debconf shtool
Suggested packages:
dh-make gettext-doc libasprintf-dev libgettextpo-dev mcrypt dh-php
libmail-box-perl
The following NEW packages will be installed:
autopoint debhelper dh-autoreconf dh-strip-nondeterminism dwz gettext
intltool-debian libapache2-mod-php8.2 libarchive-cpio-perl
libarchive-zip-perl libdebhelper-perl libfile-stripnondeterminism-perl
libmail-sendmail-perl libmcrypt-dev libmcrypt4 libsub-override-perl
libsys-hostname-long-perl libzip4 php php-common php-curl php-dev php-gd
php-imap php-ldap php-mbstring php-mysql php-pear php-soap php-xml php-zip
php8.2 php8.2-cli php8.2-common php8.2-curl php8.2-dev php8.2-gd php8.2-imap
php8.2-ldap php8.2-mbstring php8.2-mysql php8.2-opcache php8.2-readline
php8.2-soap php8.2-xml php8.2-zip pkg-php-tools po-debconf shtool
0 upgraded, 49 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.0 MB of archives.
After this operation, 43.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bookworm/main amd64 autopoint all 0.21-12 [495 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 libdebhelper-perl all 13.11.4 [81.2 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 dh-autoreconf all 20 [17.1 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 libarchive-zip-perl all 1.68-1 [104 kB]
Get:5 http://deb.debian.org/debian bookworm/main amd64 libsub-override-perl all 0.09-4 [9,304 B]
Get:6 http://deb.debian.org/debian bookworm/main amd64 libfile-stripnondeterminism-perl all 1.13.1-1 [19.4 kB]
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php8.2
Setting up dh-strip-nondeterminism (1.13.1-1) ...
Setting up php-zip (2:8.2+93) ...
Setting up php-dev (2:8.2+93) ...
update-alternatives: using /usr/bin/php-config.default to provide /usr/bin/php-c
onfig (php-config) in auto mode
update-alternatives: using /usr/bin/phpize.default to provide /usr/bin/phpize (p
hpize) in auto mode
Setting up debhelper (13.11.4) ...
Setting up php8.2 (8.2.7-1~deb12u1) ...
Setting up pkg-php-tools (1.44) ...
Setting up php (2:8.2+93) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u3) ...
Processing triggers for php8.2-cli (8.2.7-1~deb12u1) ...
Processing triggers for libapache2-mod-php8.2 (8.2.7-1~deb12u1) ...
Step 3: Login to MySQL console by using following command.
root@linuxhelp:~# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 60
Server version: 10.11.4-MariaDB-1~deb12u1 Debian 12
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Step 4: Create database by using following command.
MariaDB [(none)]> create database mantisdb;
Query OK, 1 row affected (0.000 sec)
Step 5: Create user for database by using following command.
MariaDB [(none)]> create user 'mantisuser'@'localhost' identified by 'linux@123';
Query OK, 0 rows affected (0.045 sec)
Step 6: Make the grant privileges by using following command.
MariaDB [(none)]> grant all privileges on mantisdb.* to 'mantisuser'@'localhost';
Query OK, 0 rows affected (0.001 sec)
Step 7: Refresh the privileges by using following command.
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.001 sec)
Step 8: Exit from mysql by using following command.
MariaDB [(none)]> exit
Bye
Step 10: Download the zip file by using following command.
root@linuxhelp:~# wget https://sourceforge.net/projects/mantisbt/files/latest/download
--2024-06-17 06:11:34-- https://sourceforge.net/projects/mantisbt/files/latest/download
Resolving sourceforge.net (sourceforge.net)... 172.64.150.145, 104.18.37.111, 2606:4700:4400::ac40:9691, ...
Connecting to sourceforge.net (sourceforge.net)|172.64.150.145|: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=gAAAAABmb4Y-6KVtQbnDEww1EOFi5ipg6G2sjHcIVSOk9hCdcxWgn34yG55O0ef9B5vaFj3QZP6dtwV45Bz-vTRv6qfPX8XMpA%3D%3D&use_mirror=excellmedia&r= [following]
--2024-06-17 06:11:34-- https://downloads.sourceforge.net/project/mantisbt/mantis-stable/2.26.2/mantisbt-2.26.2.zip?ts=gAAAAABmb4Y-6KVtQbnDEww1EOFi5ipg6G2sjHcIVSOk9hCdcxWgn34yG55O0ef9B5vaFj3QZP6dtwV45Bz-vTRv6qfPX8XMpA%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-06-17 06:11:35-- 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 10.2MB/s in 1.6s
2024-06-17 06:11:38 (10.2 MB/s) - ‘download’ saved [17180250/17180250]
Step 11: Unzip the file 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/manage_custom_field_proj_add.php
inflating: mantisbt-2.26.2/billing_export_to_csv.php
inflating: mantisbt-2.26.2/account_prefs_page.php
inflating: mantisbt-2.26.2/manage_user_reset.php
inflating: mantisbt-2.26.2/api_tokens_page.php
inflating: mantisbt-2.26.2/manage_proj_cat_delete.php
inflating: mantisbt-2.26.2/adm_permissions_report.php
inflating: mantisbt-2.26.2/adm_config_set.php
inflating: mantisbt-2.26.2/manage_proj_subproj_add.php
inflating: mantisbt-2.26.2/print_all_bug_options_update.php
inflating: mantisbt-2.26.2/login_select_proj_page.php
inflating: mantisbt-2.26.2/roadmap_page.php
inflating: mantisbt-2.26.2/tag_view_page.php
inflating: mantisbt-2.26.2/manage_custom_field_delete.php
inflating: mantisbt-2.26.2/manage_config_work_threshold_page.php
inflating: mantisbt-2.26.2/bugnote_edit_page.php
inflating: mantisbt-2.26.2/bug_report.php
inflating: mantisbt-2.26.2/manage_proj_subproj_delete.php
inflating: mantisbt-2.26.2/login_password_page.php
inflating: mantisbt-2.26.2/manage_proj_custom_field_copy.php
Step 12: Move the directory to the document root location by using following command.
root@linuxhelp:~# mv mantisbt-2.26.2 /var/www/mantis
Step 13: Make the ownership to the document root directory by using following command.
root@linuxhelp:~# chown -R www-data:www-data /var/www/mantis
Step 14: Make permission to the document root directory by using following command.
root@linuxhelp:~# chmod -R 755 /var/www/mantis
Step 15: Create the virtual host by using following command.
root@linuxhelp:~# vim /etc/apache2/sites-available/mantis.conf
<Virtualhost *:80>
Servername www.linuxhelp1.com
documentroot /var/www/mantis
<directory /var/www/mantis>
allowoverride all
allow from all
</directory>
</Virtualhost>
Step 16: Disable the default site 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 17: Enable the Mantis virtual host 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 18: Enable the 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 19: Restart the apache by using following command.
root@linuxhelp:~# systemctl restart apache2
Step 20: Goto the browser and search the IP address as shown in below image.
Step 21: Given database credentials as shown in below image.
Step 22: Verify the installation and click continue as shown in below image.
Step 23: Enter the default admin user and password as shown in below image.
Step 24: Default admin password is root.
Step 25: Given the new password as shown in below image.
Step 26: Login with new admin credentials as show in below image.
Step 27: This is the dashboard of Mantisbt CMS on Debian 12.
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 Debian 12. Your feedback is much welcome.
wget https://sourceforge.net/projects/mantisbt/files/latest/download