{"id":7372,"date":"2020-12-10T23:24:38","date_gmt":"2020-12-10T20:24:38","guid":{"rendered":"https:\/\/kifarunix.com\/?p=7372"},"modified":"2024-03-15T09:08:02","modified_gmt":"2024-03-15T06:08:02","slug":"install-mantis-bug-tracker-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-mantis-bug-tracker-on-ubuntu-20-04\/","title":{"rendered":"Install Mantis Bug Tracker on Ubuntu 20.04"},"content":{"rendered":"
Welcome to our tutorial on how to install Mantis Bug Tracker on Ubuntu 20.04. Mantis Bug Tracker (MantisBT)<\/a>, is a popular free web-based bug tracking system. It is written in PHP and supports to multiple database backends including MySQL, MS SQL and PostgreSQL.<\/p>\n\n\n\n MantisBT is PHP based and supports a variety of database backends as mentioned above. In this guide, however, we will install Mantis bug tracker with MySQL 8 as the database backend. This therefore means that you need to a LAMP stack up and running for you to run Mantis bug tracker.<\/p>\n\n\n\n As already mentioned above, in this guide, we will setup MantisBT to use MySQL 8 database backend. As such, begin by installing LAMP stack on Ubuntu 20.04.<\/p>\n\n\n\n We have already covered the installation of LAMP Stack on Ubuntu 20.04 in a separate tutorial whose link is provided below;<\/p>\n\n\n\n Install LAMP Stack on Ubuntu 20.04<\/a><\/p>\n\n\n\n Install other PHP extensions and other packages;<\/p>\n\n\n\n Login to MySQL and create MantisBT database and database user. Be sure to replace the names of the database, database user and the password.<\/p>\n\n\n\n Note that the Database root account is required to setup MantisBT. By default, MySQL 8 root account uses auth_socket authentication plugin and it doesn’t have any password set. Hence, change the authentication plugin to the mysql native plugin and set the password for MySQL root account.<\/p>\n\n\n\n Reload privileges tables and exit the database connection.<\/p>\n\n\n\n Restart MySQL database service.<\/p>\n\n\n\n Download the latest stable MantisBT release from the downloads<\/a> page.<\/p>\n\n\n\n You can simply obtain the url and pull it using wget. For example, to download the current stable release (v2.24.3) as of this writing, simply run the command below;<\/p>\n\n\n\n Extract MantisBT and move it to your default web root directory.<\/p>\n\n\n\n Next, create Apache MantisBT site configuration.<\/p>\n\n\n\n Save and exit the configuration file. Be sure to set the proper settings as per your setup.<\/p>\n\n\n\n Check Apache Syntax configuration;<\/p>\n\n\n\n Disable the default Apache site;<\/p>\n\n\n\n Enable MantisBT site;<\/p>\n\n\n\n Change the ownership of the MantisBT web root directory;<\/p>\n\n\n\n Restart Apache;<\/p>\n\n\n\n To allow external access, you need to open port 80\/tcp on UFW if it is running.<\/p>\n\n\n\n Now access MantisBT using the URL Go through the Pre-Installation Check and ensure everything is good.<\/p>\n\n\n\n Configure MantisBT database connections;<\/p>\n\n\n\n Click Once the installation completes, you should see such an interface.<\/p>\n\n\n\n Rename the admin directory and click Continue<\/strong> to proceed to the login page.<\/p>\n\n\n\n The default login credentials are:<\/p>\n\n\n\n Upon successful login, you land on MantisBT dashboard.<\/p>\n\n\n\n Reset your admin password.<\/p>\n\n\n\n MantisBT issues Dashboard.<\/p>\n\n\n\n You can now continue to explore MantisBT.<\/p>\n\n\n\n MantisBT Administration Guide<\/a><\/p>\n\n\n\n Install Bugzilla Bug Tracker on Ubuntu 20.04<\/a><\/p>\n\n\n\nInstalling Mantis BT on Ubuntu 20.04<\/h2>\n\n\n\n
Install LAMP Stack on Ubuntu 20.04<\/h3>\n\n\n\n
apt install php-{mysql,date,json,mbstring,curl,gd,fileinfo,ldap,cli,intl,xml,zip,bcmath,pear} libpcre3 libpcre3-dev zip<\/code><\/pre>\n\n\n\n
Create MantisBT Database and Database User<\/h3>\n\n\n\n
mysql<\/code><\/pre>\n\n\n\n
create database mantisbt;<\/code><\/pre>\n\n\n\n
create user mantisadmin@localhost identified by 'changeme';<\/code><\/pre>\n\n\n\n
grant all on mantisbt.* to mantisadmin@localhost;<\/code><\/pre>\n\n\n\n
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root' AND plugin = 'auth_socket';\nALTER USER root@localhost identified by 'changeme';<\/code><\/pre>\n\n\n\n
flush privileges;\nquit<\/code><\/pre>\n\n\n\n
systemctl restart mysql<\/code><\/pre>\n\n\n\n
Install Mantis BT<\/h3>\n\n\n\n
Download MantisBT archive<\/h4>\n\n\n\n
wget https:\/\/tenet.dl.sourceforge.net\/project\/mantisbt\/mantis-stable\/2.24.3\/mantisbt-2.24.3.zip<\/code><\/pre>\n\n\n\n
Extract MantisBT Archive<\/h4>\n\n\n\n
unzip mantisbt-2.24.3.zip<\/code><\/pre>\n\n\n\n
mv mantisbt-2.24.3 \/var\/www\/html\/mantisbt<\/code><\/pre>\n\n\n\n
Create Apache MantisBT Site Configuration<\/h4>\n\n\n\n
vim \/etc\/apache2\/sites-available\/mantisbt.conf<\/code><\/pre>\n\n\n\n
<VirtualHost *:80>\n DocumentRoot \"\/var\/www\/html\/mantisbt\"\n\n ServerName mantisbt.kifarunix-demo.com\n\n ErrorLog \"\/var\/log\/apache2\/mantisbt_error_log\"\n CustomLog \"\/var\/log\/apache2\/mantisbt_access_log\" combined\n\n <Directory \"\/var\/www\/html\/mantisbt\/\">\n DirectoryIndex index.php \n Options -Indexes +FollowSymLinks\n AllowOverride All\n Require all granted\n <\/Directory>\n\n<\/VirtualHost><\/code><\/pre>\n\n\n\n
apachectl -t<\/code><\/pre>\n\n\n\n
a2dissite 000-default.conf<\/code><\/pre>\n\n\n\n
a2ensite mantisbt.conf<\/code><\/pre>\n\n\n\n
chown -R www-data: \/var\/www\/html\/mantisbt<\/code><\/pre>\n\n\n\n
systemctl restart apache2<\/code><\/pre>\n\n\n\n
Accessing MantisBT Web Interface<\/h4>\n\n\n\n
ufw allow Apache<\/code><\/pre>\n\n\n\n
http:\/\/server-IP-or-domain<\/code><\/strong>.<\/p>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Install\/Upgrade Database<\/strong><\/code> button to install setup MantisBT DB.<\/p>\n\n\n\n
<\/figure>\n\n\n\n
mv \/var\/www\/html\/mantisbt\/admin{,-old}<\/code><\/pre>\n\n\n\n
<\/figure>\n\n\n\n
\n
administrator<\/code><\/strong><\/li>\n\n\n\n
root<\/code><\/strong><\/li>\n<\/ul>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
Reference<\/h3>\n\n\n\n
Other Guides<\/h3>\n\n\n\n