Tutorials  /  Linux Basics

Install Bugzilla 5.0.4 on CentOS 7 with Apache & MariaDB

Ccentron Redaktion · July 2025 ·7 min read ·Linux Basics, Tutorial

Bugzilla is a widely adopted, free, and open source bug tracking tool. Many developers and vendors rely on it to systematically refine their software products.

This guide walks you through the installation process of Bugzilla version 5.0.4 on a CentOS 7 server instance.

Prerequisites

  • A clean CentOS 7 x64 instance (e.g., IP: 203.0.113.1).
  • Access to a user account with sudo privileges.
  • The system must be up-to-date using the EPEL YUM repository.

Bugzilla 5.0.4 needs Perl 5.14 or higher, alongside a functioning web server and a database server. In this tutorial, we will set up Perl 5.16.x, Apache 2.4.x, and MariaDB 10.2.x as part of the installation.

VM

Matching infrastructure at centron

No hardware needed to follow along: ccloud³ VMs with full root access start at €3.12 per month, billed by the hour and ready in seconds. Rent a cloud server →

Step 1: Installing Perl 5.16.x and Dependencies

After logging in with sudo rights, install Perl and necessary Perl components via YUM:

Console
sudo yum install perl perl-CPAN perl-DBD-MySQL -y

Verify the installed Perl version meets the requirement (should be 5.14 or newer):

Code
perl -v

Version 5.16.3 should be displayed, which is compatible with Bugzilla 5.0.4.

Next, install additional necessary packages:

Console
sudo yum install gcc gd gd-devel rst2pdf graphviz patchutils -y

Step 2: Setting Up Apache 2.4.x

Use the following commands to install and configure Apache version 2.4.6:

Console
sudo yum install httpd httpd-devel -y
sudo sed -i 's/^/#&/g' /etc/httpd/conf.d/welcome.conf
sudo systemctl start httpd.service
sudo systemctl enable httpd.service

Step 3: Setting Up MariaDB 10.2.x

Start by installing the latest stable MariaDB release:

Console
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
sudo yum install MariaDB-server MariaDB-devel -y
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Secure the MariaDB setup by executing the following:

Console
sudo /usr/bin/mysql_secure_installation

Follow the prompts:

  • Enter current password for root (enter for none): Press Enter
  • Set root password? [Y/n]: Y
  • New password: your-MariaDB-root-password
  • Re-enter new password: your-MariaDB-root-password
  • 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 MySQL using root credentials:

Code
mysql -u root -p

Create a database and user for Bugzilla. Be sure to personalize the credentials:

Code
CREATE DATABASE bugzilla;
CREATE USER 'bugzillauser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON bugzilla.* TO 'bugzillauser'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

Adjust MariaDB's server configuration to accommodate Bugzilla:

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

Add these entries beneath the [mysqld] section:

Console
# Bugzilla
# Allow packets up to 16M
max_allowed_packet=16M
# Allow small words in full-text indexes
ft_min_word_len=2

Exit and save:

Code
:wq!

Restart MariaDB to apply changes:

Console
sudo systemctl restart mariadb.service

Step 4: Download and Set Up Bugzilla 5.0.4

First, grab the Bugzilla 5.0.4 archive from the official Mozilla servers:

Console
cd
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.4.tar.gz

Extract the contents to your preferred directory:

Console
sudo tar -C /opt -zxvf bugzilla-5.0.4.tar.gz

Create a symbolic link to the Bugzilla folder to make future upgrades easier:

Console
sudo ln -s /opt/bugzilla-5.0.4 /var/www/html/bugzilla

Run the setup script to identify missing Perl modules:

Console
sudo /var/www/html/bugzilla/checksetup.pl

You can either install modules individually:

Console
sudo /usr/bin/perl /var/www/html/bugzilla/install-module.pl CGI

Or install all required and optional modules at once:

Console
sudo /usr/bin/perl /var/www/html/bugzilla/install-module.pl --all

Once the installation completes, rerun the setup script to ensure all necessary modules, including DBD::mysql, are in place:

Console
sudo /var/www/html/bugzilla/checksetup.pl

Edit the localconfig file to configure the database settings:

Console
sudo vi /var/www/html/bugzilla/localconfig

Update the values to match your setup:

Code
$webservergroup = 'apache';
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugzilla';
$db_user = 'bugzillauser';
$db_pass = 'yourpassword';

Save the file and rerun the setup script to complete the installation:

Console
sudo /var/www/html/bugzilla/checksetup.pl

You’ll be prompted to enter admin details such as:

  • Email address: admin@example.com
  • Name: John Doe
  • Password: your-admin-password

Make sure Apache has ownership of Bugzilla files:

Console
sudo chown -R apache:apache /opt/bugzilla-5.0.4

Create an Apache virtual host file for Bugzilla:

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

Add the following configuration:

Code
<VirtualHost *:80>
  ServerAdmin admin@example.com
  DocumentRoot /var/www/html/bugzilla/
  ServerName bugzilla.example.com
  ServerAlias www.bugzilla.example.com
  <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.example.com-error_log
  CustomLog /var/log/httpd/bugzilla.example.com-access_log common
</VirtualHost>

Save the file and restart Apache:

Console
sudo systemctl restart httpd.service

Step 5: Configure the Firewall

Update your firewall to permit HTTP traffic:

Console
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --reload

Step 6: Verify and Access Bugzilla

Use the test script to validate the Bugzilla installation:

Console
sudo /var/www/html/bugzilla/testserver.pl http://203.0.113.1

Expected output includes:

  • 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 /localconfig.
  • TEST-OK GD version and libgd version 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.

Now visit http://203.0.113.1/ in your browser. Click “Log In” and enter the admin credentials to access and manage Bugzilla.

Step 7: (Optional) Enable Apache mod_perl for Performance

Install mod_perl and its development package to enhance Apache’s handling of Perl:

Console
sudo yum install mod_perl mod_perl-devel -y

Check if it’s loaded:

Code
apachectl -M | grep perl

The output should include:

  • perl_module (shared)

Edit the mod_perl configuration file:

Console
sudo vi /etc/httpd/conf.d/perl.conf

Display line numbers and uncomment these:

Code
:set nu

Uncomment lines 15 and 24, and add the following at the end:

Code
PerlSwitches -w
PerlSwitches -T
PerlConfigRequire /var/www/html/bugzilla/mod_perl.pl

Restart Apache to apply the configuration:

Console
sudo systemctl restart httpd.service

Conclusion

By following these detailed steps, you've successfully set up Bugzilla 5.0.4 on a CentOS 7 instance. From installing the necessary software stack (Perl, Apache, MariaDB) to configuring the web interface and database, your system is now ready to manage bug tracking effectively. You can further enhance performance using Apache’s mod_perl module. Access the Bugzilla dashboard via your server IP and start organizing your software development process with this powerful tool.

Jetzt 200 € Guthaben sichern

Testen Sie Ihr Setup auf ccloud³

Registrieren Sie sich in der ccloud³ und erhalten Sie 200 € Startguthaben für Ihr Projekt – z. B. für eine PostgreSQL-VM mit automatischen Backups.

centron Redaktion Technische Redaktion

Das Redaktionsteam von centron schreibt Anleitungen aus dem Betriebsalltag: getestet auf unserer eigenen Plattform, betrieben im Rechenzentrum in Hallstadt bei Bamberg.

Kategorie Linux Basics
Teilen
Noch offene Fragen?

Unser Team hilft Ihnen bei Ihrem konkreten Setup weiter – von Menschen, die die Plattform selbst betreiben.

War dieses Tutorial hilfreich?

Ihre Antwort wird anonym gespeichert und hilft uns, die Tutorials zu verbessern.

Kommentare

Noch keine Kommentare – stellen Sie die erste Frage zu diesem Tutorial.

Zum Kommentieren anmelden

Kommentare stehen centron-Kunden offen. Melden Sie sich in Ihrem Konto an, um eine Frage zu diesem Tutorial zu stellen.

Weiterlesen

Das könnte Sie auch interessieren

Jetzt kostenlos anfangen

Melden Sie sich an und erhalten Sie in den ersten 60 Tagen ein Guthaben von 200 € bei centron.

Dieses Werbeangebot gilt nur für neue Konten. Angebot ausschließlich für Gewerbetreibende.

Jetzt loslegen Sales kontaktieren