How to install MantisBT on CentOS 7 step by step guide



Install MantisBT(Bug Tracker) on linux | In this article we learn what is MantisBT and how to install MantisBT(Bug Tracker) on centos/RHEL/Oracle(6/7) linux server.


What is MantisBT(Bug Tracker)?

MantisBT(Bug Tracker) is free and open source web based bug tracking system which is written in php.Its web interface is very simple to customize to trace the software bug.


Installation LAMP stack

Before installing and setup MantisBT we need to install LAMP stack. To install LAMP stack we execute the below command.

[root@localhost ~]# yum install httpd mariadb mariadb-server php php-common php-mysql php-gd php-xml php-mbstring php-mcrypt php-xmlrpc unzip wget –y

After installing the all required packages we start the service . To start the service we execute the below command.

[root@localhost ~]# systemctl start httpd
[root@localhost ~]# systemctl start mariadb

Configuration  of Mariadb database for MantisBT on centos server

After installing the database we need to secure the database using the below command.
#mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

After that restart the service using the below command.

#systemctl restart mariadb

Now create the MantisBT database and user using the below steps.

# mysql -u root -p

MariaDB [(none)]> create database mantisdb;
MariaDB [(none)]> CREATE USER mantis@localhost IDENTIFIED BY "mantis";
MariaDB [(none)]> GRANT ALL ON mantisdb.* TO mantis@localhost;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit

Install MantisBT on centos server

Now we download the latest version of the MantisBT from their official website.To download the MantisBT package we need to execute the below command.

Once the download is completed, we extract the downloaded archive using the below command.

#unzip mantisbt-2.5.1.zip
Now create a directory called mantis under “/var/ww/html” and move the extracted file to this directory and change the ownership of the directory using the below steps.

#Mkdir –p /var/ww/html/mantis
#mv mantisbt-2.5.1  /var/www/html/mantis
#chown -R apache:apache /var/www/html/mantis

Configure virtual host for mantisBT

We need to configure apache virtual host for mantis .To do this create a file called mantis.conf under the “/etc/httpd/conf.d” and add the below lines.
<VirtualHost *:80>
  ServerAdmin admin@example.net
  ServerName example.net
 DocumentRoot /var/www/html/mantis
 <Directory />
    Options FollowSymLinks
    AllowOverride All
 </Directory>
 <Directory /var/www/html/mantis>
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from All
 </Directory>
 TransferLog /var/log/httpd/mantis_access.log
 ErrorLog /var/log/httpd/mantis_error.log
</VirtualHost>

Now save and quit the file and restart the apache service.
we need to allow http and https service in the firewall. To do this we need to execute the below command.
[root@localhost ~]#firewall-cmd –permanent –add-service=http
 [root@localhost ~]#firewall-cmd –reload

To finish the final installation we need open the browser and type the url as below.
http:// server –ip address/mantis/mantisbt-2.5.1
preinstallation check for mantisbt
preinstallation check for MantisBT on CentOS 7

to fill up all database related info the press upgrade and install and will get the next below screen.
final step to install MantisBT on CentOS 7
final step to install MantisBT on CentOS 7

Then press continue button and you will get the login screen . type username as administrator and password as root.
You will get the below screen.
How to install MantisBT on CentOS 7 step by step guide
How to install MantisBT on CentOS 7 step by step guide

That’s all . if this article is helpful about to know how to install MantisBT on CentOS/RHEL/Oracle 7 please share it.


SHARE

Admin

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment