How To Install Bugzilla on Ubuntu 24.04 LTS
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:
- Navigate to the Bugzilla directory (you will download it later).
- 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:
- Open the MySQL shell:
sudo mysql -u root -p
Enter your root password when prompted.
- Create a database for Bugzilla:
CREATE DATABASE bugzilla;
- 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.
- Exit the MySQL shell:
EXIT;
Step 5: Install Bugzilla
- 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.
- 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
- 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.
- 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
- 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.
- 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.