How to install and configure Bugzilla on CentOS 7 step by step guide



install and configure Bugzilla on centos Linux |In this article we learn what is Bugzilla and how to install and configure Bugzilla on centos server.

                                How to install and configure Bugzilla on CentOS 7 step by step guide


What is Bugzilla?

Bugzilla is a free and open source bug following and programming testing tool which is written in perl and use mysql as a backend database. It is very useful tool to track the bug and change code of the application.

Pre-requisite to install Bugzilla on centos server

Before installing the Bugzilla first we have to ensure that all packages are up to date using the below command.
#yum update –y


After the we need to install EPEL repol by using the below command.
#yum install epel-release yum-utils –y

Installation LAMP stack

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

[root@localhost ~]# yum install httpd mariadb mariadb-server httpd-devel mod_ssl mod_ssl mod_perl mod_perl-devel mariadb-devel php-mysql gcc gcc-c++ graphviz graphviz-devel patchutils gd gd-devel wget perl* -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 Bugzilla 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 Bugzilla database and user using the below steps.

# mysql -u root -p

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

Installation of Bugzilla on centos server

To download Bugzilla we need to execute the below command.
#wget http://ftp.mozilla.org/pub/webtools/bugzilla-5.0.tar.gz

After download this compressed file we need to extract the file.To extract this file we need to execute the below command.
#tar -xvzf bugzilla-5.0.tar.gz

Move the extracted directory into the Apache web root directory using the below command.
#mv bugzilla-5.0 /var/www/html/bugzilla

After move the directory we need to chage the ownership of the bugzilla directory using the below command.
#chown -R apache:apache /var/www/html/bugzilla


After that we need to install all required perl module into the system.To install all required module first we need to change the bugzilla directory using the below command.
#cd /var/www/html/bugzilla/
Then execute the below command.
#/usr/bin/perl install-module.pl --all

After completion of installation we need to edit localconfig file as below.
#vi /var/www/html/bugzilla/localconfig
Change the database parameter as shown below
$db_host = 'localhost';
$db_name = 'bugzilladb';
$db_user = 'bug';
$db_pass = 'bug';
Save and close the file.

After that run the checksetup.pl perl script to install Bugzilla.
#cd /var/www/html/bugzilla/
#./checksetup.pl

After that create new virtual host for bugzilla under /etc/httpd/conf.d/bugzilla.conf  and add the below lines into the bugzilla.conf file.

<VirtualHost *:80>
DocumentRoot /var/www/html/bugzilla/
</VirtualHost>
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes
</Directory>

Then restart the apache service .
After that access the below url to access the bugzilla web interface.
http:// server-ip-address/bugzilla

That’s all. If this article is helpful about to know how to install and configure Bugzilla on centos 7 please share it!!

Please Donate To Bitcoin Address: [[address]]
Donation of [[value]] BTC Received. Thank You.
[[error]]
SHARE

Admin

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

3 comments:

  1. Hi,
    Want to install Bugzilla running Centos 7.7.1908, perl (v5.16.3) and mariadb (v5.5.64)


    I followed the instruction except with bugzilla v5.0.6.
    checksetup.pl returns

    DBD::mysql::db do failed: The used table type doesn't support FULLTEXT indexes [for Statement "CREATE FULLTEXT INDEX `bugs_fulltext_short_desc_idx` ON `bugs_fulltext` (short_desc)"] at Bugzilla/DB.pm line 848, line 747.
    Bugzilla::DB::_bz_add_table_raw('Bugzilla::DB::Mysql=HASH(0x63e07d8)', 'bugs_fulltext', 'HASH(0x65504e0)') called at Bugzilla/DB.pm line 809
    Bugzilla::DB::bz_add_table('Bugzilla::DB::Mysql=HASH(0x63e07d8)', 'bugs_fulltext', 'HASH(0x65504e0)') called at Bugzilla/DB.pm line 518
    Bugzilla::DB::bz_setup_database('Bugzilla::DB::Mysql=HASH(0x63e07d8)') called at Bugzilla/DB/Mysql.pm line 575
    Bugzilla::DB::Mysql::bz_setup_database('Bugzilla::DB::Mysql=HASH(0x63e07d8)') called at ./checksetup.pl line 123

    Please share any insight to help with resolution.

    Thanks!

    ReplyDelete
  2. Did some further searching and I need to use MariaDB version 10.x plus
    Upgraded and checksetup.pl happily runs to completion.
    Thanks

    ReplyDelete
  3. I have done same configuration but when i tried to access my bugzilla server i am getting error.

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

    More information about this error may be available in the server error log.

    ReplyDelete