Table of Contents
- Getting Started
- Install LAMP
- Configure MariaDB Database
- Install Bugzilla
- Configure Apache for Bugzilla
- Access Bugzilla
Bugzilla is a free and open source web-based bug tracker and testing software tool developed by the Mozilla Foundation. It is used to track any bugs and code changes in your applications. It is written in Perl, and uses MySQL as its database back-end. Bugzilla software is designed to help you manage the software development process.
Key features of Bugzilla are listed below:
- Email integration capability.
- Optimized, well structured and secure system.
- Easily remember your searches using advanced query tool.
- Easily edit user profiles.
- Comprehensive permission based system.
In this tutorial, we will explain how to install Bugzilla on CentOS 7.
- A server running CentOS 7.
- A non-root user with
sudoprivileges configured on the server.
You will need to update your OS to the latest release and update its installed packages and repositories using the following command:
sudo yum update -y
Next install the EPEL repository on your system:
sudo yum install deltarpm epel-release -y
Let us install the Apache web server, MariaDB, and other required packages on the system.
You can install all of them by running the following command:
sudo yum install httpd mariadb mariadb-server httpd-devel mod_ssl mod_ssl mod_perl mod_perl-devel mariadb-devel php-mysql gcc gcc-c++ graphviz graphviz-devel patchutils gd gd-devel wget perl* -y
Once all the packages are installed including their dependencies, start the Apache and MariaDB services and enable them to start on boot with the following commands:
sudo systemctl start httpd sudo systemctl start mariadb sudo systemctl enable httpd sudo systemctl enable mariadb
Configure MariaDB Database
Our MariaDB installation needs to be secured. To do so, run the
Answer all the questions as shown below, including setting a secure password:
Enter current password for root (enter for none): Enter Set root password? [Y/n]: Y 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 the MariaDB shell with the following command:
mysql -u root -p
Enter the root password when asked, then create a new database for Bugzilla:
MariaDB [(none)]>CREATE DATABASE bugzilla;
Create a database user and password for Bugzilla:
MariaDB [(none)]>CREATE USER 'bugs'@'localhost' IDENTIFIED BY 'password'; MariaDB [(none)]>GRANT ALL PRIVILEGES ON bugzilla.* TO 'bugs'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; MariaDB [(none)]>FLUSH PRIVILEGES; MariaDB [(none)]>exit;
Once you are done, you can proceed to install Bugzilla.
You can download the latest version of the Bugzilla with the
Once the download is complete, extract the downloaded archive with the
tar -xvzf bugzilla-5.0.tar.gz
Move the extracted directory into the Apache web root directory:
sudo mv bugzilla-5.0 /var/www/html/bugzilla
Set proper permissions on the bugzilla directory:
sudo chown -R apache:apache /var/www/html/bugzilla
You will also need to install all necessary Perl modules in your system.
Change into the bugzilla directory:
Install all the required Perl modules with the following command:
sudo /usr/bin/perl install-module.pl --all
Once installation is complete, you will need to edit
sudo nano /var/www/html/bugzilla/localconfig
Change the file as shown below:
$db_host = 'localhost'; $db_name = 'bugzilla'; $db_user = 'bugs'; $db_pass = 'password';
Save and close the file when you are finished.
checksetup.pl perl script to install Bugzilla:
cd /var/www/html/bugzilla/ sudo ./checksetup.pl
Answer all the questions and finalize your setup.
Once everything completes successfully, you should see the following output:
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.
Comment out a line in the
.htaccess file that the Bugzilla installation script created:
sudo sed -i 's/^Options -Indexes$/#Options -Indexes/g' ./.htaccess
Configure Apache for Bugzilla
Let's create a new virtualhost directive for Bugzilla. You can do this by creating the file
Add the following lines:
<VirtualHost *:80> DocumentRoot /var/www/html/bugzilla/ </VirtualHost> <Directory /var/www/html/bugzilla> AddHandler cgi-script .cgi Options +Indexes +ExecCGI DirectoryIndex index.cgi AllowOverride Limit FileInfo Indexes </Directory>
Save the file and restart Apache's
httpd service for the changes to take effect:
sudo systemctl restart httpd
Allow HTTP traffic on port 80 through
firewalld. You can do this by running the following commands:
sudo firewall-cmd --zone=public --add-service=http --permanent sudo firewall-cmd --reload
Once everything is setup properly, it is time to access Bugzilla.
Open your favourite web browser and type the URL
http://your-server-ip, you should see the Bugzilla welcome page as below:
Click on the
Log In button and provide your username and password. You should see the Bugzilla Main page as below:
Congratulations! You have now a working Bugzilla 5.0 installation on CentOS 7. You can now configure your Bugzilla installation using the web interface. Feel free to comment below if you have any questions.