For U

Monday, 24 November 2014

Bugzilla step by step installation

Installing Bugzilla-4.2 on CENTOS / FEDORA/ RHEL Linux
Step 1: update remi repository
#  rpm –Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
#  rpm –Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
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
# ./checksetup.pl --check-modules
To install all the missing modules just type the following:
            # /usr/bin/perl install-module.pl --all
           
            Recheck of missing modules
# ./checksetup.pl --check-modules
You can install missing modules one by one by the following methods –
1.      /usr/bin/perl install-module.pl <module name>
2.      # cpan
cpan>  install <module name>
3.      Perl –MCPAN –e ‘install “<module name>”’
# ./checksetup.pl
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

            max_allowed_packet=10M
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)
sql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES,    CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY ‘your password for  mysql’;
          Query OK, 0 rows affected (0.00 sec)
sql> FLUSH PRIVILEGES;
sql> quit;
Step 7: Setup the Administrative User for Bugzilla
Rerun checksetup.pl. 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.
$ ./checksetup.pl
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/mod_perl.pl
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.
                                                                         OR

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: .*@gmail.com
In the above example, bugzilla will allow only those email address to be created who have @gmail.com as a suffix.
Now you are good to go with Bugzilla Server. Enjoy. 

No comments:

Post a Comment