UbuntuUbuntu Based

How To Install Bugzilla on Ubuntu 24.04 LTS

Install Bugzilla on Ubuntu 24.04

Bugzilla is a powerful, open-source bug tracking system developed by Mozilla. It is widely used by software developers and teams to manage bugs, collaborate on projects, and enhance overall productivity. If you’re looking to set up Bugzilla on Ubuntu 24.04 LTS, this guide will walk you through the process step by step, ensuring a smooth installation and configuration.

Introduction to Bugzilla

Bugzilla offers a robust platform for tracking bugs, managing workflows, and facilitating communication among team members. Its features include customizable workflows, advanced search capabilities, and integration with various development tools. By installing Bugzilla on Ubuntu, you can leverage these features to streamline your project management processes.

Prerequisites for Installation

Before diving into the installation process, ensure you have the necessary prerequisites in place:

  • Hardware Requirements: A 64-bit processor and sufficient RAM are essential for running Bugzilla efficiently. A minimum of 2 GB RAM is recommended, though more is better for handling multiple users.
  • Software Requirements: Bugzilla requires Perl, a compatible database like MariaDB, and a web server such as Apache. Ensure these components are installed or ready to be installed.
  • User Privileges: You will need root or sudo privileges to perform the installation.

Step-by-Step Installation Guide

Step 1: Update the System

To ensure your Ubuntu system is up to date, run the following commands in your terminal:

sudo apt update -y
sudo apt upgrade -y

These commands update your package lists and upgrade any available packages, which helps prevent compatibility issues during the installation.

Step 2: Install Perl and Required Modules

Perl is a critical component for Bugzilla. If Perl is not already installed, you can install it using:

sudo apt install perl -y

Next, you need to install the required Perl modules. Bugzilla provides a script called `install-module.pl` to simplify this process. Here’s how to use it:

  1. Navigate to the Bugzilla directory (you will download it later).
  2. Run the following command to install the necessary Perl modules:
perl install-module.pl --all

This command installs all the required Perl modules for Bugzilla.

Step 3: Install MariaDB Database

MariaDB is a popular choice for Bugzilla due to its reliability and performance. To install MariaDB, execute the following command:

sudo apt install mariadb-server -y

After installation, secure your MariaDB server by running:

sudo mysql_secure_installation

Follow the prompts to set a root password, remove anonymous users, disallow remote root login, remove the test database, and reload privilege tables.

Step 4: Create Bugzilla Database and User

To create a database and user for Bugzilla, follow these steps:

  1. Open the MySQL shell:
sudo mysql -u root -p

Enter your root password when prompted.

  1. Create a database for Bugzilla:
CREATE DATABASE bugzilla;
  1. Create a user for Bugzilla and grant privileges:
CREATE USER 'bugzilla'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON bugzilla.* TO 'bugzilla'@'localhost';
FLUSH PRIVILEGES;

Replace `’password’` with a strong password of your choice.

  1. Exit the MySQL shell:
EXIT;

Step 5: Install Bugzilla

  1. Download Bugzilla: Visit the official Bugzilla download page and download the latest version. You can also use `wget` to download it directly from the terminal:
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-.tar.gz

Replace `bugzilla-` with the latest version available.

  1. Extract Bugzilla: Extract the downloaded archive to a suitable directory, such as `/var/www/html/bugzilla`:
sudo tar -xvf bugzilla-.tar.gz -C /var/www/html/

Ensure the directory path matches where you want Bugzilla to reside.

Step 6: Configure Bugzilla

  1. Run `checksetup.pl`: Navigate to the Bugzilla directory and run the setup script:
cd /var/www/html/bugzilla
sudo perl checksetup.pl

This script checks for missing modules and prompts you to install them if necessary.

  1. Configure `localconfig`: Edit the `localconfig` file to set your database details and other parameters:
sudo nano /var/www/html/bugzilla/localconfig

Update the following lines with your database credentials:

$db_name = 'bugzilla';
$db_user = 'bugzilla';
$db_pass = 'password';

Replace `’password‘` with the password you set earlier.

Step 7: Set Up Apache Configuration

  1. Create Virtual Host: Create a new Apache configuration file for Bugzilla:
sudo nano /etc/apache2/sites-available/bugzilla.conf

Add the following configuration:

<VirtualHost *:80>
    ServerName yourdomain.com
    DocumentRoot /var/www/html/bugzilla

    <Directory /var/www/html/bugzilla>
        Options +Indexes +ExecCGI
        DirectoryIndex index.cgi
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/bugzilla_error.log
    CustomLog ${APACHE_LOG_DIR}/bugzilla_access.log combined
</VirtualHost>

Replace `yourdomain.com` with your actual domain name.

  1. Enable Configuration: Enable the new Apache configuration and restart the service:
sudo a2ensite bugzilla.conf
sudo systemctl restart apache2

Troubleshooting Common Issues

During the installation process, you might encounter several common issues:

  • Database Connection Errors: Ensure your database credentials are correct in the `localconfig` file. Also, verify that the MySQL server is running and accessible.
  • Perl Module Installation Issues: If `install-module.pl` fails to install modules, check for network connectivity issues or try installing modules manually using CPAN.
  • Apache Configuration Errors: Check the Apache error logs for specific error messages. Common issues include incorrect file permissions or syntax errors in the configuration file.

Congratulations! You have successfully installed Bugzilla. Thanks for using this tutorial to install the latest version of Bugzilla Bug Tracker on Ubuntu 24.04 LTS. For additional help or useful information, we recommend you check the official Bugzilla website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button