3/11/2008

Installing Bugzilla on Redhat 9

Bugzilla on RH9

-------------------------------------------------------------------------------
Install RH9 Packages
-------------------------------------------------------------------------------
> Make ISO files for RH9 to the local disk (i.e.: /root/software/RedHatISO/)
dd if=/dev/cdrom of=/root/Software/RedhatISO/cdrom_image.iso

> To update packages.
system-config-packages --isodir=/root/software/RedHatISO/

#------------------------------------------------------------------------------
# Post Install
#------------------------------------------------------------------------------
> remove rpm packages
rpm -e httpd-manual;rpm -e redhat-config-httpd;rpm -e php-imap;rpm -e php-ldap;rpm -e mod_perl; rpm -e mod_ssl;rpm -e mod_python;rpm -e webalizer;
rpm -e php; rpm -e httpd

>Downlaod apache, openssl, php

>Install openssl
tar zxvf openssl-0.9.8e.tar.gz;
cd openssl-0.9.8e
./config; make; make install

#------------------------------------------------------------------------------
# Apache 2.2.24 Setup
#------------------------------------------------------------------------------
tar zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apache_2.2.4 --enable-ssl --enable-so --enable-headers \
--enable-suexec --enable-usertrack --enable-headers --enable-mem-cache \
--enable-disk-cache --enable-cache --enable-file-cache --with-ssl=/usr/local/ssl; make; make install
groupadd apache
useradd -g apache apache
cd /usr/local
ln -s apache_2.2.4/ ./apache
chown -R apache.apache apache_2.2.4

>update httpd.conf and add the following
vi apache/conf/httpd.conf


AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit


#------------------------------------------------------------------------------
# Mysql standard 4.1.22 Setup
#------------------------------------------------------------------------------
groupadd mysql
useradd -g mysql mysql

cp mysql-standard-4.1.22-pc-linux-gnu-i686.tar.gz /usr/local
cd ..
tar zxvf mysql-standard-4.1.22-pc-linux-gnu-i686.tar.gz

ln -s ./mysql-standard-4.1.22-pc-linux-gnu-i686/ ./mysql

cd mysql
chown -R mysql .
chgrp -R mysql .

>Setup mysql DB
scripts/mysql_install_db --user=mysql

chown -R root .
chown -R mysql data

cp support-files/my-medium.cnf /etc/my.cnf
echo "/usr/local/mysql/lib" >> /etc/ld.so.conf
ldconfig -v
cp support-files/mysql.server /etc/init.d/mysql
service mysql start

>Setup mysql root password
bin/mysqladmin -u root password 'password'

#------------------------------------------------------------------------------
> Configure database permissions
bin/mysql

#Run the following SQL command:
GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@'%' IDENTIFIED BY 'bugs';
GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY 'bugs';
FLUSH PRIVILEGES;

# -----------------------------------------------------------
# INSTALL Bugzilla 3.0
# -----------------------------------------------------------
cd /usr/local/apache/htdocs
tar -zxvf ~/bugzilla-3.0.tar.gz
mv bugzilla-3.0 bugzilla
cd bugzilla

----------------------------------------------------------------------------------
Prepare for CPAN
----------------------------------------------------------------------------------
mkdir .cpan
cd .cpan
mkdir sources
cd sources
cp ~/MIRRORED.BY .

#With MIRRORED.BY included the followings

------------------------------------------------------
cpan.archive.hk:
frequency = "daily"
dst_ftp = ""
dst_http = "http://www.archive.hk/cpan/"
dst_location = "Pokfulam, Hong Kong, Asia (21.75 115)"
dst_organisation = "Archive.hk"
dst_timezone = "+8"
dst_bandwidth = "OC3"
dst_contact = "archive.hk]admin"
dst_src = "ftp.funet.fi"

# dst_dst = "http://www.archive.hk/cpan/"
# dst_contact = "mailto:archive.hk]admin
# dst_src = "ftp.funet.fi"

cuhk.edu.hk:
frequency = "daily"
dst_ftp = "ftp://ftp.cuhk.edu.hk/pub/packages/perl/CPAN/"
dst_http = "http://ftp.cuhk.edu.hk/pub/packages/perl/CPAN/"
dst_location = "Hong Kong, Shatin, Hong Kong, Asia (22.42 114.2)"
dst_organisation = "The Chinese University of Hong Kong"
dst_timezone = "+8"
dst_bandwidth = "1Gbps"
dst_contact = "ftp.cuhk.edu.hk]ftp-admin"
dst_src = "ftp://mirrors.hknet.com/CPAN"

# dst_dst = "ftp://ftp.cuhk.edu.hk/pub/packages/perl/CPAN/"
# dst_contact = "mailto:ftp.cuhk.edu.hk]ftp-admin
# dst_src = "ftp://mirrors.hknet.com/CPAN"

--------------------------------------------------------------

----------------------------------------------------------------------------------
INSTALL DBI-1.46
----------------------------------------------------------------------------------
>Must Set LANG=""

LANG=""
>or
unset LANG
cd /usr/local/
tar -zxvf ~/DBI-1.4.6
cd DBI-1.4.6
perl ./Makefile.PL
make
make test
make install

----------------------------------------------------------------------------------
INSTALL DBD-MYSQL (Manual install)
----------------------------------------------------------------------------------
cd /usr/local/
tar -zxvf DBD-mysql-2.9004.tar.gz
cd DBD-mysql-2.9004
#unset LANG; perl Makefile.PL --libs="-L/usr/local/mysql/lib/ -lmysqlclient -lz" --cflags=-I/usr/local/mysql/include --testuser=root --testpassword=Password --testhost=localhost

unset LANG; perl Makefile.PL --libs="-L/usr/local/mysql/lib/ -lmysqlclient -lz -lcrypt -lnsl -lm" --cflags=-I/usr/local/mysql/include --testhost=localhost --testuser=root --testpassword=password

make
make test
make install

# -----------------------------------------------------------
# INSTALL Perl Modules
# -----------------------------------------------------------
perl -MCPAN -e 'install "Bundle::Bugzilla"'
perl -MCPAN -e 'install Email::Send'
perl -MCPAN -e 'install Email::MIME::Modifier'
perl -MCPAN -e 'install PatchReader'
perl -MCPAN -e 'install Apache::DBI'
perl -MCPAN -e 'install Net::LDAP'

----------------------------------------------------------------------------------
INSTALL mod_perl
----------------------------------------------------------------------------------
cd /usr/local/
tar -zxvf ~/mod_perl-2.0.3
cd mod_perl-2.0.3
perl ./Makefile.PL
vi /usr/local/apache/conf/httpd.conf
LoadModule perl_module modules/mod_perl.so
make
make test
make install




----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
Config Sendmail
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
cd /etc/mail/
cp sendmail.mc sendmail.mc.orginal

----------------------------------------------------------------------------------
# add dnl before the following line (hide original sender)
#There are always users that need to be "exposed" -- that is,
#their internal site name should be displayed instead of the masquerade name.
#Root is an example (which has been "exposed" by default prior to 8.10).
#You can add users to this list using
#enable by default
#disable this to show the "masquerade name" instead of "internal site name"

dnl EXPOSED_USER(`root')dnl

dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

----------------------------------------------------------------------------------
#For example,if you have:
#MASQUERADE_AS(`masq.com') MASQUERADE_DOMAIN(`foo.org') MASQUERADE_DOMAIN(`bar.com')
#then *foo.org and *bar.com are converted to masq.com.
#Without this feature, only foo.org and bar.com are masqueraded.
#Add following line at the bottom of the file before "MAILER"

FEATURE(masquerade_entire_domain)dnl

define(`MAIL_HUB',`mail.domain.com.')

----------------------------------------------------------------------------------
vi /etc/mail/local-host-names

# local-host-names - include all aliases for your machine here.
Add host name that can receive mail

----------------------------------------------------------------------------------
Rebuild sendmail.cf file
----------------------------------------------------------------------------------
cp /etc/mail/sendmail.cf /etc/mail/bak.sendmail.cf
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
service sendmail stop
service sendmail start

# -----------------------------------------------------------
# Configure Bugzilla
# -----------------------------------------------------------

> Verify dependencies of bugzilla
cd /usr/local/apache/htdocs/bugzilla/

./checksetup.pl
vi localconfig

> NOTE: bugzilla uses the following variaqble to log into the database in "localconfig" create later
#update the variable $db_pass = 'bugs'; --> the same passwd as your sql command

> if successful, you will see the following message
Enter the e-mail address of the administrator: user@domain.com
Enter the real name of the administrator: alex.fung
Enter a password for the administrator account:
Please retype the password to verify:
user@domain.com is now set up as an administrator.
Creating default classification 'Unclassified'...
Creating initial dummy product 'TestProduct'...

Now that you have installed Bugzilla, you should visit the
'Parameters' page (linked in the footer of the Administrator
account) to ensure it is set up as you wish - this includes
setting the 'urlbase' option to the correct url.

chown -R apache.apache bugzilla

# -----------------------------------------------------------
#Install PHP
# -----------------------------------------------------------
tar zxvf php-4.4.6
cd /php-4.4.6
./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-openssl=/usr/local/ssl
make; make install
cp php-4.4.6/php.ini-recommended /usr/local/lib/php.ini
vi /usr/local/apache/conf/httpd.conf
>add index.php in DirectoryIndex
>AddType application/x-httpd-php .php
>LoadModule php4_module modules/libphp4.so


# -----------------------------------------------------------
#Create an user account in Windows AD
# -----------------------------------------------------------
User name: ldapuser
Password: ldappass
OU: Users

# -----------------------------------------------------------
#LDAP Setting in Bugzilla
# -----------------------------------------------------------
>LDAP Directory
LDAPserver: name.domain.com
LDAPbinddn: cn=ldapuser,cn=Users,dc=domain,dc=com:ldappass
LDAPBaseDN: dc=domain,dc=com
LDAPuidattribute: userPrincipalName

>User Authentication
user_verify_class: LDAP

沒有留言: