Bugzilla is a powerful and widely used bug tracking system that allows organizations to effectively track bugs, issues, and change requests in their software products. With its robust features and open-source nature, Bugzilla has become the go-to choice for thousands of organizations worldwide. In this article, we will guide you through the installation process of Bugzilla on Debian 11, ensuring that you have a reliable bug tracking system up and running in no time.
Prerequisites
Before we begin the installation process, there are a few prerequisites that you need to have in place:
- A server running Debian 11: Ensure that you have a server with Debian 11 installed and ready for configuration.
- A valid domain name: Point your domain name to the IP address of your server for easy access to the Bugzilla web interface.
- Root access: Make sure you have root access to your server, as we will be performing system-wide configurations and installations.
Install Required Dependencies
To get started, we need to update all system packages to their latest versions. Open your terminal and run the following command:
apt-get update -y
Once the update is complete, we can proceed with installing the required Perl modules. Run the following command:
apt-get install build-essential libdatetime-timezone-perl libappconfig-perl libdate-calc-perl libtemplate-perl libmime-tools-perl libdatetime-perl libemail-sender-perl libemail-mime-perl libemail-mime-perl libdbi-perl libdbd-mysql-perl libcgi-pm-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl libapache2-mod-perl2 libapache2-mod-perl2-dev libchart-perl libxml-perl libxml-twig-perl perlmagick libgd-graph-perl libtemplate-plugin-gd-perl libsoap-lite-perl libhtml-scrubber-perl libjson-rpc-perl libdaemon-generic-perl libtheschwartz-perl libtest-taint-perl libauthen-radius-perl libhtml-formattext-withlinks-perl libgd-dev graphviz sphinx-common rst2pdf libemail-address-perl libemail-reply-perl libfile-slurp-perl libencode-detect-perl libmodule-build-perl libnet-ldap-perl libfile-which-perl libauthen-sasl-perl libfile-mimeinfo-perl -y
This command will install all the necessary Perl modules required by Bugzilla.
Install Apache and MariaDB
Bugzilla requires both Apache and MariaDB to function properly. To install these packages, run the following command:
apt-get install apache2 mariadb-server mariadb-client -y
Once the installation is complete, start the Apache and MariaDB services:
systemctl start apache2 systemctl start mariadb
With the services up and running, we can move on to configuring the MariaDB database.
Configure MariaDB Database
Bugzilla requires a dedicated database and user. To set these up, log in to the MariaDB shell:
mysql
Once logged in, create a new database and user with the following commands:
CREATE DATABASE bugzilla; CREATE USER 'buguser'@'localhost' IDENTIFIED BY 'password';
Grant all privileges to the Bugzilla database for the newly created user:
GRANT ALL PRIVILEGES ON bugzilla.* TO 'buguser'@'localhost';
Flush the privileges and exit the MariaDB shell:
FLUSH PRIVILEGES; EXIT;
Next, we need to tweak the MariaDB configuration file. Open the file /etc/mysql/mariadb.conf.d/50-server.cnf
using your preferred text editor:
nano /etc/mysql/mariadb.conf.d/50-server.cnf
Add the following lines under the [mysqld]
section:
max_allowed_packet=16M ft_min_word_len=2
Save and close the file, then restart the MariaDB service to apply the changes:
systemctl restart mariadb
With the database configured, we can now proceed to install and configure Bugzilla.
Install and Configure Bugzilla
To install Bugzilla, we need to download the latest version and extract it to the appropriate directory. Run the following commands:
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.6.tar.gz mkdir /var/www/html/bugzilla tar xf bugzilla-5.0.6.tar.gz -C /var/www/html/bugzilla --strip-components=1
Next, we need to edit the localconfig
file inside the Bugzilla directory:
cd /var/www/html/bugzilla nano localconfig
In the localconfig
file, make the following changes:
$create_htaccess = 1; $webservergroup = 'www-data'; $use_suexec = 1; $db_driver = 'mysql'; $db_host = 'localhost'; $db_name = 'bugzilla'; $db_user = 'buguser'; $db_pass = 'password';
Save and close the file. Now, run the checksetup.pl
script to set up Bugzilla:
./checksetup.pl
The script will prompt you to enter the administrator email address, real name, and password. Provide the necessary information, and the setup process will be completed.
Next, we need to install all the required Perl modules by running the following command:
/usr/bin/perl install-module.pl --all
To ensure that the Bugzilla directory has the correct ownership, run the following command:
chown -R www-data:www-data /var/www/html/bugzilla/
Finally, verify the Bugzilla setup by running the checksetup.pl
script again:
./checksetup.pl
If everything is configured correctly, you will see a success message indicating that Bugzilla is set up and ready to use.
Configure Apache for Bugzilla
To configure Apache for Bugzilla, we need to create a virtual host configuration file. Open your preferred text editor and create a new file:
nano /etc/apache2/sites-available/bugzilla.conf
Add the following content to the file:
<VirtualHost *:80>
ServerName bugzilla.example.com
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/apache2/bugzilla.error_log
CustomLog /var/log/apache2/bugzilla.access_log common
</VirtualHost>
Save and close the file.
To activate the Bugzilla virtual host and enable the required Apache modules, run the following commands:
a2ensite bugzilla.conf
a2enmod headers env rewrite expires cgi
Finally, restart the Apache service to apply the configuration changes:
systemctl restart apache2
You can check the status of the Apache service to ensure it is running correctly:
systemctl status apache2
If everything is set up correctly, you should see a status message indicating that the Apache service is active and running.
Access Bugzilla Web Interface
Now that Bugzilla is installed and configured, you can access the web interface to start using it. Open your web browser and enter the URL http://bugzilla.example.com
(replace bugzilla.example.com
with your domain name).
You will be greeted with the Bugzilla login page. Enter your administrator email and password to log in. Once logged in, you will have access to the Bugzilla dashboard, where you can manage and track bugs, issues, and change requests effectively.
Conclusion
Congratulations! You have successfully installed Bugzilla on Debian 11, allowing you to track bugs and collaborate with developers and teams within your organization. Bugzilla provides a robust and efficient bug tracking system that can greatly enhance your software development process.
To take your bug tracking system to the next level, consider partnering with Shape.host for reliable and scalable cloud hosting solutions. Their Cloud VPS services offer the flexibility and performance you need to ensure your Bugzilla instance is always available and performing optimally. Visit Shape.host to learn more about their hosting solutions.
Feel free to reach out to us if you have any questions or need further assistance. Happy bug tracking!