First, let’s begin by installing the necessary packages. Type the following:
yum install perl* mod_perl-devel -y
After the installation of the necessary packages is over, execute the following command in order to download the latest version of Bugzilla (adapt the URL to match the current version):
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.4.tar.gz
Unpack it to the desired directory:
tar zxvf bugzilla-4.2.2.tar.gz -C /var/www/html/
Enter the directory that contains the unpacked Bugzilla installation and rename the “bugzilla-${VERSION}” directory to something more convenient for web access:
cd /var/www/html/
mv -v bugzilla-4.4 bugzilla
Login to mysql using ‘root’ as user and your mysql ‘root’ password, and create a database for the Bugzilla installation:
mysql -uroot -p
mysql> create database bugzilla_DB;
Grant all privileges on the database you just created to a newly created user and identify it by his own password:
mysql> grant all on bugzilla_DB.* to some_user@localhost identified by 'random_password';
and exit mysql:
mysql> \q
Run the following command to find the necessary modules:
./checksetup.pl
After the checksetup.pl script is done, install the necessary and the optional modules by executing:
# /usr/bin/perl install-module.pl --all
Once the modules are installed, run the checksetup.pl script again to generate the localconfig file:
./checksetup.pl
Use your favorite text editor (in this case vim) and edit the $db_name, $db_user and $db_pass entries in the ‘localconfig’ file and fill them with the mysql database information we set earlier:
vim ./localconfig
Again, run the checksetup script to set initial configuration:
./checksetup.pl
Next, these few lines need to be appended to the apache config file:
vim /etc/httpd/conf/httpd.conf
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes
</Directory>
Save the file and execute the following command to restart the webserver:
service httpd restart
That’s it! Open http://<IP_ADDRESS_OR_HOSTNAME>/bugzilla
and start organizing your software development!
NOTE: In case of “500 Internal Server Error” on your first try to access Bugzilla, please check for the “Options” line in the .htaccess file and comment it out.