HOW-TO: Install the latest Bugzilla on CentOS

I just went through installing Bugzilla on CentOS at work. I had to follow several guides online in order to get it installed and configured correctly. I thought I combine all of my findings into one simple guide.

I will be installing the latest Bugzilla at the moment which is 4.5.2 on a fresh install of CentOS 6.5 64-Bit.

Ok, Lets get started. Launch Terminal and switch to root:

su

Bugzilla

In order to get Bugzilla up and running, we need to install Apache, MySql, and also gcc for compiling the Bugzilla packages.

Installing Apache

yum install httpd mod_ssl

Install MySql in Bugzilla

After the install is done, open port 80 in the Firewall

iptables -I INPUT -p tcp --dport 80 -j ACCEPT

Save the changes to the firewall

service iptables save

Start the Apache service

service httpd start

Lets make sure that Apache will restart every time you restart the machine:

/sbin/chkconfig httpd on

Apache on Bugzilla

Lets test our Apache server by opening a browser windows and type our localhost IP, 127.0.0.1:

Apache on CentOS

Install MySql

install mysql-server mysql php-mysql

MySql on CentOS

Lets make sure MySql starts at boot

chkconfig mysqld on

Auto start MySql on CentOS

Start MySql

service start mysqld

Start MySql in CentOS

Set up MySql for root access

mysql -u root

Set the root user password

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('some_new_password');

Once done, exit MySql

exit

Install gcc and prep packages

yum install gcc perl* mod_perl-devel

Install gcc in CentOS

Install Bugzilla

Now that we have all the prep work done and ready, lets go ahead and download the latest Bugzilla

wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.5.2.tar.gz

Download latest Bugzilla for CentOS

unpack the download to the apache directory

tar zxvf bugzilla-4.5.2.tar.gz -C /var/www/html/

browse to the directory we just unpacked the file to and rename it to bugzilla

cd /var/www/html/
mv -v bugzilla-4.4 bugzilla

Login to MySql as root with the root password we set up earlier and create a new Database for Bugzilla

mysql -uroot -p
create database bugzilla_DB;

Grant all privileges to the database we just created to a newly created database user that we will be calling bugz and password bugz

grant all on bugzilla_DB.* to bugz@localhost identified by 'bugz';

Exit MySql

\q

We should be in the bugzilla directory still. Lets check for all required bugzilla modules before the install:

./checksetup.pl

After the check is done, we will see some missing modules that needs to be installed:

Bugzilla install on CentOS

Type the command below to install all missing modules automatically:

/usr/bin/perl install-module.pl --all

Lets do a check again to make sure all the modules did install

./checksetup.pl

If all is good, we will get a message to edit the localconfig file for installation.

Bugzilla install on CentOS

Edit the localconfig file with your favorite text editor. Since I have GUI, I used gedit for a simple quick edit

gedit ./localconfig

Make sure you input the correct database name, user, and password we created earlier in the localconfig file

Bugzilla install in CentOS

Run ./checksetup.pl again

./checksetup.pl

If all is well, checksetup.pl should now successfully configure Bugzilla.

Bugzilla install on CentOS

Now we need to add Bugzilla to our Apache config file. Open httpd.conf with a text editor

gedit /etc/httpd/conf/httpd.conf

Add the following to the end of httpd.conf file

<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>

Bugzilla install on CentOS

Lastly, we need to edit .htaccess file and comment out “Options -Indexes” line at the top by adding “#”

Bugzilla install on CentOS

Lets restart our apache server and test our installation

service httpd restart

Bugzilla 4.5.2 on CentOS 6.5

If all goes well, we should see our successfully installed Bugzilla when we browse to localhost 🙂

Hope this helps. Let me know if you have any questions.

////
Show Comments