Tuesday, June 15, 2010

Installation of bugzilla on centos 5.1

Take backup from server(For bugzilla ugrading) :
In server take mysql backup
mysqldump -u user_name -p user_passwd bugs > bugs_backup.spl
`bugs_backup.spl` file contains all bugzilla bugs backup.

Mysql Configuration:
yum install mysql mysql-devel mysql-server

chech mysql is running or not. if not runing /etc/init.d/mysqld start

/usr/bin/mysqladmin -u admin_user password 'admin_password'
mysql -u root_user -p root_passwd
mysql>CREATE USER 'bugs'@'localhost' IDENTIFIED BY 'bugzilla_db_passwd';
mysql>create database bugs;
mysql> show databases;
mysql> GRANT ALL ON *.* TO bugs@localhost IDENTIFIED BY "bugzilla_db_passwd";

Now bugs database i created and a dbuser created with name 'bugs' for bugzilla access.
Bugzilla Installation:
mkdir /bugs

download bugzilla latest version (here i used bugzilla 3.2 version)
mv bugzilla-3.2.tar.gz /bugs

yum install gd-devel
yum install ImageMagick-perl ImageMagick-devel

perl -MCPAN -e 'install "Bundle::Bugzilla"' (Follow bellow steps. if any options is not mentioned for inputs just press enter)

Are you ready for manual configuration? [yes] yes
CPAN build and cache directory? [/home/phaneendra.gb/.cpan] /bugs
(1) Africa
(2) Asia
(3) Australasia
(4) Central America
(5) Europe
(6) North America
(7) Oceania
(8) South America
Select your continent (or several nearby continents) [] 4
(1) ftp://mirrors.ucr.ac.cr/CPAN/
Select as many URLs as you like (by number),
put them on one line, separated by blanks, e.g. '1 4 5' [] 1

perl ./checksetup.pl --check-modules (install all required modules)

Enter a username to be validated: root_user
Enter this user's password: root_password

perl ./checksetup.pl --check-modules (run 2 or 3 times check all modules installed)
perl ./checksetup.pl

Bugzilla Configutration:
in vi /bugs/bugzilla-3.2/localconfig check for following fields
$create_htaccess = 1;
$webservergroup = 'user_group';
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = 'bugzilla_db_passwd';
(other thing leave as it is)

perl ./checksetup.pl
Enter the e-mail address of the administrator:bug_admin@oc.com
Enter the real name of the administrator: bug_admin
Enter a password for the administrator account: bug_passwd
Please retype the password to verify: bug_passwd

added mysql user to user_group
vi /etc/httpd/conf/httpd.conf (at the end add the following lines)
Alias /bugs /bugs/ui/bugzilla-3.2

AuthType Basic
AuthName "bugzilla Repository"
AuthPAM_Enabled on
Require group ocusers
Require valid-user
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit


No comments: