Installing MantisBT – A Bug Tracking System

Learn | Teach Open Source Technologies

Installing MantisBT – A Bug Tracking System

By: Muhammad Farrukh Siddique

=======================================
MantisBT version: 1.2.17
CentOS version: 6.2
Apache version: 2.2.15
PHP version: 5.3.3
MySQL version: 5.1.73
=======================================
————————————–

Disable SELinux and configure iptables accordingly.

to disable SELinux open file

# vim /etc/sysconfig/selinux

change the enforcing status to disables, as below:

SELINUX=disabled

save and quit

—————————————

Set /etc/hosts file accordingly

# vim /etc/hosts

<IP Address> server server.mantis.local

save and quit

—————————————

Now install Required Packages:

# yum install httpd php php-pdo php-mysql php-gd php-mbstring mysql mysql-server
—————————————-

Set timezone in php.ini accordingly, otherwise you will see red warning on install page.

# vim /etc/php.ini

date.timezone = Asia/Karachi

save and quit

—————————————-

Now start mysql

# service mysqld start

Add database for mantisbt

# mysql

> create database bugtracker;
> GRANT ALL ON bugtracker.* to mantisbt@localhost IDENTIFIED BY ‘mantisbt’;
> flush privileges;
> quit

—————————————-

Now donwload mantisbt latest release to date:

# cd /var/www/html

# wget http://sourceforge.net/projects/mantisbt/files/mantis-stable/1.2.17/mantisbt-1.2.17.tar.gz/download

Uncompress the file

# tar -zxvf mantisbt-1.2.17.tar.gz

Rename

# mv mantisbt-1.2.17 mantisbt

Now change the ownership

# chown -R apache.root mantisbt

Enable index.php in Apache

# vim /etc/httpd/conf/httpd.conf

DirectoryIndex index.php index.html

save and exit

—————————————-

Now start Apache

You can access the installation file by accessing below link:

http://ip-address/mantisbt

Add database user: mantisbt
Add database passwrod: mantisbt

Now click on install button and after few moments manitsbt will be installed.

Remove the admin folder from /var/www/html/mantisbt

Finally access the mantisbt:

http://ip-address/manitsbt

username: Administrator
Password: root

You can also create a VirtualHost in Apache with proper DNS configurations to avoid using IP Address.

——————————————————————
Now replace the config_inc.php with sample file

# cd /var/www/html/mantisbt

# mv config_inc.php config_inc.php.bak

# mv config_inc.php.sample config_inc.php

Now edit database accordingly:

# vim config_inc.php

# — Database Configuration —
$g_hostname = ‘localhost’;
$g_db_username = ‘mantisbt’;
$g_db_password = ‘mantisbt’;
$g_database_name = ‘bugtracker’;
$g_db_type = ‘mysql’;

save and exit

Restart Apache

# service httpd restart