Thursday, March 1, 2012

Steps to install Bugzilla 4.2 (latest version) on CENTOS / Fedora / RHEL Linux.

Installing Bugzilla-4.2 on CENTOS / FEDORA/ RHEL Linux

Step 1: update remi repository
#  rpm –Uvh
#  rpm –Uvh

Step 2: yum update

            yum install perl-CPAN

yum install httpd mysql-server mod_perl mod_perl-devel httpd-devel graphviz patchutils gcc perl-DateTime perl-Template-Toolkit perl-Email-Send perl-Email-MIME perl-GD perl-Chart perl-Template-GD perl-GDGraph perl-GDTextUtil perl-PatchReader perl-MIME-tools perl-LDAP perl-Authen-SASL perl-RadiusPerl perl-SOAP-Lite perl-JSON-RPC perl-JSON-XS perl-Test-Taint perl-HTML-Scrubber perl-Email-MIME-Attachment-Stripper perl-Email-Reply perl-TheSchwartz perl-Daemon-Generic perl-Math-Random-Secure perl-YAML perl-Class-Inspector

Step 3: # restorecon –Rv /var/www/html/

Step 4: Now download latest bugzilla-4.2 tar file from the below link.
            Note: The downloaded bugzilla tar file should be moved to /var/www/html/ directory.
            # cd /var/www/html
            Now untar the downloaded bugzilla tar ball
            # tar zxf bugzilla-4.2.tar.gz
            # mv bugzilla-4.2 bugzilla4
            # chown –R 751 bugzilla4
            # chown root:apache –R bugzilla4
            # cd bugzilla4

            check for missing modules
# ./ --check-modules

To install all the missing modules just type the following:
            # /usr/bin/perl --all
            Recheck of missing modules
# ./ --check-modules

You can install missing modules one by one by the following methods –
1.      /usr/bin/perl <module name>
2.      # cpan
cpan>  install <module name>
3.      Perl –MCPAN –e ‘install “<module name>”’

# ./

Note:  You would not be able to install the Encode : Detect module but no need to worry, it is a optional module.

If all the necessary modules are installed properly, then it will ask to edit  ./localconfig file.

# vi ./localconfig

Search for $ db_pass=’ ’ line in localconfig file
Now put type a new password for mysql as shown below.
 $ db_pass=’your password for sql’
Step5: Modify /etc/my.cnf to increase bugzilla attachment size:
            # vi /etc/my.cnf

            Add the below line in my.cnf file


Above will allow attachment size upto 10 mb, you can change the attachment size as per your requirements. 

Step 6: Creating My SQL database bugs for bugzilla server :
            # service mysqld restart
            # mysql

sql> create database bugs;
        Query OK, 1 row affected (0.00 sec)

          Query OK, 0 rows affected (0.00 sec)

sql> quit;

Step 7: Setup the Administrative User for Bugzilla
Rerun It reconfirms that all the modules are present, and notices the altered localconfig file, which it assumes you have edited to your satisfaction. It compiles the UI templates, connects to the database using the ‘bugs’ user you created and the password you defined, and creates the ‘bugs’ database and the tables therein.
If all goes well, it will ask you for an email for the Bugzilla Administrator account and the password for that account.
$ ./

Step 8: Add the following to the httpd.conf file. This assumes you installed Bugzilla in the default path.

#vi /etc/httpd/conf/httpd.conf

find, uncomment and edit the following two lines:
ServerAdmin  root@yoursystemhostname     (line no.262 of your httpd.conf file)
ServerName  yoursystemhostname:80            (line no.276 of your httpd.conf file)

Also find and uncomment the following line:

AddHandler cgi-script .cgi     (you can find this at line no. 799 of your httpd.conf file)

            Type the below two line at the end of httpd.conf file:

PerlSwitches -I/var/www/html/bugzilla -I/var/www/html/bugzilla/lib -w -T
PerlConfigRequire /var/www/html/bugzilla/

Step 9: Now restart Apache web server:

# service httpd restart

Step 10: Open port 80 in firewall table:
# iptables –A INPUT –p tcp --dport 80 –j ACCEPT
# service iptables save

Now you can see your running bugzilla server on

Note: If you are not able to see your bugzilla server on the browser, then just disabled the your system Firewall by entering setup command in the terminal window.
# setup
Select Firewall Configuration menu and disable the Firewall by removing the “ * ” symbol by pressing spacebar in that Enabled bracket, then press OK , Yes and Quit.


Go to System>Administration>Firewall and disable it.

Now type this in the browser window: http://localhost/bugzilla

I hope now your are able to see your bugzilla server home page.

Email configuration for Bugzilla Server: 

Open your bugzilla server ip address in your browser
Log in with bugzilla administrator email id and password which you have setup during the installation.
After login click on Administration tab, then click Parameters, then click Email (on the left hand side menu) and change the following fields:

Mailfrom : your bugzillaserver email id (not bugzilla administrator email)
Smtpserver : your outgoing mailserver address
Smtp_username : your bugzillaserver email id
Smtp_password : bugzillaserver email id password

Then click on Save Changes at the bottom of the page.

Now go to User Authentication menu and go to field createemailregexp (at the bottom of the page), this field is used to give access to a particular email domain address.
For example: .*
In the above example, bugzilla will allow only those email address to be created who have as a suffix.

Now you are good to go with Bugzilla Server. Enjoy. 

1 comment:

  1. Hello Ravindra,

    I am trying to install bugzilla 4.2.1 on RHEL 5.0
    after successfully installation of all perl module I am facing following issue.

    Note : I am using lampp mysql for connection I had following your installation guide
    Reading ./localconfig...
    Checking for DBD-mysql (v4.001) ok: found v4.021
    Had to create DBD::mysql::dr::imp_data_size unexpectedly at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/ line 1240, line 558.
    Use of uninitialized value in subroutine entry at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/ line 1240, line 558.
    Had to create DBD::mysql::db::imp_data_size unexpectedly at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/ line 1270, line 558.
    Use of uninitialized value in subroutine entry at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/ line 1270, line 558.
    There was an error connecting to MySQL:

    Undefined subroutine &DBD::mysql::db::_login called at lib/i386-linux-thread-multi/DBD/ line 149, line 558.

    This might have several reasons:

    * MySQL is not running.
    * MySQL is running, but there is a problem either in the
    server configuration or the database access rights. Read the Bugzilla
    Guide in the doc directory. The section about database configuration
    should help.
    * Your password for the 'bugs' user, specified in $db_pass, is
    incorrect, in './localconfig'.
    * There is a subtle problem with Perl, DBI, or MySQL. Make
    sure all settings in './localconfig' are correct. If all else fails, set


    Please advice me where I am doing mistake..

    Thanks in advance.

    Sanjeev Kr. Singh


Steps to Install Xampp/Lampp on CENTOS 6.x / RHEL / FEDORA

Steps to Install Xampp/Lampp on CENTOS 6.x 1. Update your CentOS                  # yum update 2. Install glibc librarie...