Install Bugzilla Bug Tracking System on CentOS 7

Table of Contents


Bugzilla is a free and open source web-based bug tracker and testing software tool developed by the Mozilla Foundation. It is used to track any bugs and code changes in your applications. It is written in Perl, and uses MySQL as its database back-end. Bugzilla software is designed to help you manage the software development process.

Key features of Bugzilla are listed below:

  1. Email integration capability.
  2. Optimized, well structured and secure system.
  3. Easily remember your searches using advanced query tool.
  4. Easily edit user profiles.
  5. Comprehensive permission based system.

In this tutorial, we will explain how to install Bugzilla on CentOS 7.


  • A server running CentOS 7.
  • A non-root user with sudo privileges configured on the server.

Getting Started

You will need to update your OS to the latest release and update its installed packages and repositories using the following command:

sudo yum update -y

Next install the EPEL repository on your system:

sudo yum install deltarpm epel-release -y

Install LAMP

Let us install the Apache web server, MariaDB, and other required packages on the system.

You can install all of them by running the following command:

sudo 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

Once all the packages are installed including their dependencies, start the Apache and MariaDB services and enable them to start on boot with the following commands:

sudo systemctl start httpd
sudo systemctl start mariadb
sudo systemctl enable httpd
sudo systemctl enable mariadb

Configure MariaDB Database

Our MariaDB installation needs to be secured. To do so, run the mysql_secure_installation script:

sudo mysql_secure_installation

Answer all the questions as shown below, including setting a secure password:

Enter current password for root (enter for none): Enter
Set root password? [Y/n]: Y
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y

Log into the MariaDB shell with the following command:

mysql -u root -p

Enter the root password when asked, then create a new database for Bugzilla:

MariaDB [(none)]>CREATE DATABASE bugzilla;

Create a database user and password for Bugzilla:

MariaDB [(none)]>CREATE USER 'bugs'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]>GRANT ALL PRIVILEGES ON bugzilla.* TO 'bugs'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
MariaDB [(none)]>exit;

Once you are done, you can proceed to install Bugzilla.

Install Bugzilla

You can download the latest version of the Bugzilla with the wget command:


Once the download is complete, extract the downloaded archive with the tar command:

tar -xvzf bugzilla-5.0.tar.gz

Move the extracted directory into the Apache web root directory:

sudo mv bugzilla-5.0 /var/www/html/bugzilla

Set proper permissions on the bugzilla directory:

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

You will also need to install all necessary Perl modules in your system.

Change into the bugzilla directory:

cd /var/www/html/bugzilla/

Install all the required Perl modules with the following command:

sudo /usr/bin/perl --all

Once installation is complete, you will need to edit localconfig file:

sudo nano /var/www/html/bugzilla/localconfig

Change the file as shown below:

$db_host = 'localhost';
$db_name = 'bugzilla';
$db_user = 'bugs';
$db_pass = 'password';

Save and close the file when you are finished.

Run the perl script to install Bugzilla:

cd /var/www/html/bugzilla/
sudo ./

Answer all the questions and finalize your setup.

Once everything completes successfully, you should see the following output:

Creating initial dummy product 'TestProduct'...

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. complete.

Comment out a line in the .htaccess file that the Bugzilla installation script created:

sudo sed -i 's/^Options -Indexes$/#Options -Indexes/g' ./.htaccess

Configure Apache for Bugzilla

Let's create a new virtualhost directive for Bugzilla. You can do this by creating the file /etc/httpd/conf.d/bugzilla.conf:

sudo /etc/httpd/conf.d/bugzilla.conf

Add the following lines:

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

Save the file and restart Apache's httpd service for the changes to take effect:

sudo systemctl restart httpd

Allow HTTP traffic on port 80 through firewalld. You can do this by running the following commands:

sudo firewall-cmd --zone=public --add-service=http --permanent
sudo firewall-cmd --reload

Access Bugzilla

Once everything is setup properly, it is time to access Bugzilla.

Open your favourite web browser and type the URL http://your-server-ip, you should see the Bugzilla welcome page as below:

Bugzilla Welcome Page

Click on the Log In button and provide your username and password. You should see the Bugzilla Main page as below:

Bugzilla Main Page


Congratulations! You have now a working Bugzilla 5.0 installation on CentOS 7. You can now configure your Bugzilla installation using the web interface. Feel free to comment below if you have any questions.

  • Hi, I have followed your steps to the dot but i still get error accessing bugzilla. It gives me error message of: "Forbidden You don't have permission to access /index on this server."

    What should i do? thank you.

Log In, Add a Comment