Bugzilla Installation in Centos 8 Step by Step Guide | Arkit

In this post we are going to see Bugzilla Installation in Centos 8 Step by Step guide. Bugzilla is a robust, featureful and mature bug tracking system. Its a Open source tool. 

Bugzilla is…

  • Under active development
  • Used in high-volume, high-complexity environments by Mozilla and others
  • Supported by a dedicated team
  • Packed with features that many expensive solutions lack
  • Trusted by world leaders in technology
  • Installable on many operating systems, including Windows, Mac and Linux

Prerequisites 

  1. Minimum 4GB RAM
  2. CPU at least 2 Cores if it is a VM (3 GHz)
  3. HDD: Minimum 50GB
  4. Perl latest version should be installed 
  5. Database MySQL, MariaDB, PostgreSQL, Oracle  and SQLite you can use.
  6. Web server is Apache.

Bugzilla installation process

Enable the EPEL repository to install the required and dependent packages in Centos 8

dnf install epel-relase
dnf config-manager --set-enabled powertools

Now Install required packages using dnf command

dnf install perl perl-CPAN perl-DBD-MySQL gcc gd gd-devel graphviz patchutils perl-perl-CGI perl-DateTime perl-DateTime-TimeZone perl-Template-Toolkit perl-Email-Sender perl-Email-MIME perl-List-MoreUtils perl-Math-Random-ISAAC perl-JSON-XS perl-GD wget curl httpd httpd-devel

enable the web server services using below command

systemctl enable httpd

MariaDB  Database Installation

vi /etc/yum.repos.d/maria.repo
[mariadb]
name = MariaDB
baseurl=http://yum.mariadb.org/10.5/centos8-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Install below package which is dependency and install mariadb server and client software

dnf install galera-4 -y
dnf --disablerepo=appstream install MariaDB-server MariaDB-client -y

Start the MariaDB server service

systemctl enable mariadb; systemctl start mariadb;

run below command to configure MariaDB for the first time

mysql_secure_installation

Create the Bugzilla Database and database user

mysql

create database bugs;
grant all on bugs.* to bugs@localhost identified by 'bugzilla';

Reload the privileges’ to take effect

flush privileges;
exit;

Add single line of config item in MariaDB conf file as recommended by bugzilla

vi /etc/my.cnf.d/server/cnf

[mysqld]
max_allowed_packet=16M

Then restart MariaDB service

systemctl restart mariadb

Download and install Bugzilla bug-tracker packages

Downloading latest stable version is so simple. 

wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.6.tar.gz

Extract downloaded package

tar -xvf buzilla-5.0.6.tar.gz

Move the package to web server location and verify dependency status

mv bugzilla-5.0.6 /var/www/html/bugzilla
cd /var/www/html/bugzilla/
./checksetup.pl
* This is Bugzilla 5.0.6 on perl 5.26.3
* Running on Linux 4.18.0-305.7.1.el8_4.x86_64 #1 SMP Tue Jun 29 21:55:12 UTC 2021

Checking perl modules...
Checking for CGI.pm (v3.51) ok: found v4.38
Checking for Digest-SHA (any) ok: found v6.02
Checking for TimeDate (v2.23) ok: found v2.24
Checking for DateTime (v0.75) ok: found v1.50
Checking for DateTime-TimeZone (v1.64) ok: found v2.19
Checking for DBI (v1.614) ok: found v1.641
Checking for Template-Toolkit (v2.24) ok: found v2.29
Checking for Email-Sender (v1.300011) ok: found v1.300031
Checking for Email-MIME (v1.904) ok: found v1.949

If you do not find all the required perl modules are installed then install using below command

/usr/bin/perl install-module.pl --all

Configure the Database connection parameters

To point to correct database you need to edit config file and mention connection details

vi /var/www/html/bugzilla/localconfig

$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = 'bugzilla';
$db_port = 3306;
$db_sock = '';
$db_check = 1;

Save the config file and exit 

run setup Perl file to complete the setup

/var/www/html/bugzilla/checksetup.pl
Reading ./localconfig...
Checking for DBD-mysql (v4.001) ok: found v4.046
Checking for MySQL (v5.0.15) ok: found v10.5.11-MariaDB

Removing existing compiled templates...
Precompiling templates...done.
Fixing file permissions...

Now that you have installed Bugzilla, you should visit the 'Parameters'
page (linked in the footer of the Administrator account) to ensure it
is set up as you wish - this includes setting the 'urlbase' option to
the correct URL.
checksetup.pl complete.

Create bugzilla apache configuration file

vi /etc/httpd/conf.d/bugzilla.conf

<VirtualHost *:80>
ServerName bugzilla.techarkit.local
DocumentRoot /var/www/html/bugzilla/

<Directory /var/www/html/bugzilla/>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes Options AuthConfig
</Directory>

ErrorLog /var/log/httpd/bugzilla.error_log
CustomLog /var/log/httpd/bugzilla.access_log common
</VirtualHost>

Change ownership of the bugzilla directory content to allow apache user to browse from webbrowser

chown -R apache: /var/www/html/bugzilla

check syntax errors if any

httpd -t

Restart apache web server services to take effect

systemctl restart httpd

Disable SELinux and Allow Firewall ports

setenforce 0
sed -i 's/=enforcing/=disabled/g' /etc/selinux/config
firewall-cmd --permanent --add-service=http
firewall-cmd --reload

Test bugzilla before going to access actual web console

/var/ww/html/bugzilla/testserver/pl http://localhost

Sample output will be below

TEST-OK Webserver is running under group id in $webservergroup.
TEST-OK Got padlock picture.
TEST-OK Webserver is executing CGIs via mod_cgi.
TEST-OK Webserver is preventing fetch of http://localhost/localconfig.
Argument "gdlib-config: warning: this script is deprecated; please..." isn't numeric in numeric eq (==) at ./testserver.pl line 150.
TEST-FAILED GD version 2.71, libgd version gdlib-config: warning: this script is deprecated; please use the pkg-config file instead.
2.2.5; Major versions do not match.
TEST-OK GD library generated a good PNG image.
TEST-OK Chart library generated a good PNG image.
TEST-OK Template::Plugin::GD is installed.

Access Bugzilla web console

http://bugzilla.techarkit.local

bugzilla page

That’s about it. Bugzilla installation in Centos 8 Step by Step Guide. 

Related Articles

Magento 2 Installation guide

Thanks for your wonderful Support and Encouragement

Ravi Kumar Ankam

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

1 Response

  1. yunus says:

    Good article. it was really useful.
    Any idea why the email content in plain/text not in html format, how do we change it to html format.

Leave a Reply

Your email address will not be published. Required fields are marked *