How to Install Bugzilla Bug Tracker on Ubuntu Server 20.04. Bugs are errors or defects found in any computer system. They will stay in your software until someone removes them. It is important to removes your system bugs and issues as it might lead to unhappy customers, revenue loss or stops your project development. To manage bugs effectively, you need a bug tracking solution, like a modern bug tracking tool. In this tutorial we will introduce what is Bugzilla bug tracker is together with it’s features and move onto installation phase on ubuntu 20.04. Let’s start!
What is Bugzilla
Bugzilla is a free, open source and one of the most popular bug tracking tools. Bugzilla is called Defect Tracking System or Bug Tracking System for your project management. That systems allow developers to keep track of outstanding bugs in their product effectively. It is written in Perl language and uses MariaDB as a database backend. It is self hosted and designed for small to large projects. It is used by many organizations, including, Eclipse, Apache, Mozilla Foundation, WebKit, KDE, LibreOffice, etc. The bug tracking system allows developers to monitor and track of outstanding problems with their products. You can also use it as a test management tool because it can be integrated with other Test case management tools such as Quality Center, Testlink, etc.
How to Install Bugzilla Bug Tracker on Ubuntu Server 20.04
Install Required Dependencies
Bugzilla is written in Perl language, so you will need to install the Perl package and other required dependencies on your server. You can install all of them by running the following command:
After installing all the dependencies, verify the Perl version using the following command:
perl -v
You will get the Perl version in the following output:
This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-gnu-thread-multi
(with 50 registered patches, see perl -V for more detail)
Copyright 1987-2019, Larry Wall
Install Apache Webserver
Now you will need to install the Apache webserver to host Bugzilla on the internet. You can install it by running the following command:
apt-get install apache2 -y
Once the Apache web server is installed, start the Apache service and enable it to start at system reboot:
systemctl start apache2
systemctl enable apache2
After installing the Apache web server, you can proceed to install the MariaDB database server.
Bugzilla uses the MariaDB as a database backend. So you will need to install the MariaDB on your server. You can install it by running the following command:
apt-get install mariadb-server mariadb-client -y
Once the MariaDB is installed, start the MariaDB service and enable it to start at system reboot:
systemctl start mariadb
systemctl enable mariadb
Next, secure the MariaDB installation using the following command:
mariadb-secure-installation
You will be asked to set a new password, remove the test database, disallow remote root login and remove the anonymous users as shown below:
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Change the root password? [Y/n] y
New password:
Re-enter new 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
Once your MariaDB is secured, log in to the MariaDB shell using the following command:
mysql -u root -p
Once you are logged in, create a database and user for Bugzilla with the following command:
CREATE DATABASE bugzilladb;
CREATE USER 'bugzillauser'@'localhost' IDENTIFIED BY 'securepassword';
Next, grant all the privileges to the Bugzilla database with the following command:
GRANT ALL PRIVILEGES ON bugzilladb.* TO 'bugzillauser'@'localhost';
Here flush the privileges and exit from the MariaDB shell with the following command:
FLUSH PRIVILEGES;
EXIT;
Then edit the MariaDB configuration file and tweak some settings:
nano /etc/mysql/mariadb.conf.d/50-server.cnf
Add the following lines inside the [mysqld] section:
max_allowed_packet=16M
ft_min_word_len=2
Save and close the file when you are done. Then, restart the MariaDB service to apply the changes:
Next, comment out the $var variable in Util.pm file:
sed -i 's/^.*$var =~ tr/#&/' /var/www/html/bugzilla/Bugzilla/Util.pm
Enable the required Apache modules with the following command:
a2enmod headers env rewrite expires cgi
Restart the Apache service to apply the changes:
systemctl restart apache2
Run the checksetup.pl script again to validate the database connection and to build the needed database tables and other configuration settings.
./checksetup.pl
You will be asked to set an administrator account as shown below:
Looks like we don't have an administrator set up yet. Either this is
your first time using Bugzilla, or your administrator's privileges
might have accidentally been deleted.
Enter the e-mail address of the administrator: hitjethva@gmail.com
Enter the real name of the administrator: Hitesh Jethva
Enter a password for the administrator account:
Please retype the password to verify:
hitjethva@gmail.com is now set up as an administrator.
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.
checksetup.pl complete.
If everything is fine, you will get the following output:
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://bugzilla.example.com/localconfig.
TEST-WARNING Failed to run gdlib-config; can't compare GD versions.
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, open your web browser and access the Bugzilla web interface using the URL http://bugzilla.example.com. You will be redirected to the Bugzilla welcome page:
Click on the Login button, provide your admin username, password and click on the Log in button. You should see the Bugzilla dashboard on the following page:
How to Install Bugzilla Bug Tracker on Ubuntu Server 20.04 Conclusion
Congratulations! You have successfully installed the Bugzilla bug tracker on Ubuntu 20.04 server. You can now host Bugzilla in your development environment and manage your application bugs via the Bugzilla dashboard.
I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.