How to install Bugzilla 4.4.2 with SMTP TLS

Install required packages

$yum install perl* httpd* mysql-server* mod_perl-devel -y

Download the latest bugzilla-4.4.2

$ cd /var/www/html
$ wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.4.2.tar.gz
$ tar zxvf bugzilla-4.4.2.tar.gz
$ mv bugzilla-4.4.2 bugzilla

Starting mysqld service

$/etc/init.d/mysqld start

Set password to mysql

$mysqladmin -u root password NEWPASSWORD

Install required modules for TLS

$cd /var/www/html/bugzilla
$./checksetup.pl --check-modules
$/usr/bin/perl install-module.pl --all
$./install-module.pl Email::Send::SMTP::TLS

Run checksetup script again to generate localconfig file

$ ./checksetup.pl

The only thing you need to modify the localconfig file is MySQL database db password by changing the $db_pass variable as shown below.

$vim ./localconfig
$db_pass = 'YOURPASSWORD';

Run checksetup script to set initial configuration

$ ./checksetup.pl

Modify /etc/my.cnf to increase bugzilla attachment size.Set the Max_allowed_packet to 30M in the /etc/my.cnf to increase bugzilla attachment size.

$vim /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

# Allow packets up to 30MB
max_allowed_packet=30M

Restart mysql service

$service mysqld restart

Create database and allow permission

$service mysqld restart
$mysql -u root -p
mysql> create database bugs;
mysql> GRANT SELECT, INSERT,UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES,CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY 'alepo123';
mysql> FLUSH PRIVILEGES;
mysql> COMMIT;
mysql> \q

Add the following two lines to httpd.conf

$vim /etc/httpd/conf/httpd.conf

Add the following lines in last

<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit
</Directory>

Restart httpd service

$service httpd restart

If you are getting error as you don’t have permission to access use following steps

$cd /var/www/html/bugzilla
$mv .htaccess .htaccess-old

Verify the Group in httpd.conf matches the webservergroup in localconfig

# cd /var/www/html/bugzilla/
# grep webservergroup localconfig
$webservergroup = 'apache';
# grep Group /etc/httpd/conf/httpd.conf
Group apache

Restart httpd service

$service httpd restart

Start the apache, go to http://{your-ip-address}/bugzilla and login using the administrator account you created above

For sending mail with TLS do following steps

for changing mail_delivery_method login with administrator go to –> Administration –> Parameters –> Email –> mail_delivery_method from drop box select “SMTP::TLS”

Edit Mailer.pm file

$vim /var/www/html/bugzilla/Bugzilla/Mailer.pm

Changing Bugzilla/Mailer.pm from this:

if ($method eq "SMTP") {
        push @args, Host  => Bugzilla->params->{"smtpserver"},
                    username => Bugzilla->params->{"smtp_username"},
                    password => Bugzilla->params->{"smtp_password"},
                    Hello => $hostname,
                    Debug => Bugzilla->params->{'smtp_debug'};
    }

to this:

if ($method eq "SMTP" || $method eq 'SMTP::TLS' ) {
        push @args, Host  => Bugzilla->params->{"smtpserver"},
                    username => Bugzilla->params->{"smtp_username"},
                    password => Bugzilla->params->{"smtp_password"},
                    User => Bugzilla->params->{"smtp_username"},
                    Password => Bugzilla->params->{"smtp_password"},
                    Hello => $hostname,
                    Debug => Bugzilla->params->{'smtp_debug'};
    }
Advertisements
Posted in Linux
2 comments on “How to install Bugzilla 4.4.2 with SMTP TLS
  1. Pavan says:

    its not showing Sendmail:TLS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: