2007年2月8日星期四

Linux上 安装 Bugzilla2.20

        Linux上 安装 Bugzilla
先安装mysql4.1.22在CENT OS 4.2
[root@devtest1 conf]# mysqladmin  --version
mysqladmin  Ver 8.41 Distrib 4.1.22, for pc-linux-gnu on i686
--------------------------------------------------------------
# cd /usr/local/src
# groupadd mysql
# useradd -g mysql mysql
# tar -xzf mysql-standard-4.1.22-pc-linux-gnu-i686.tar.gz
# mv mysql-standard-4.1.22-pc-linux-gnu-i686 /usr/local/mysql
# cd /usr/local/mysql
# cp support-files/my-medium.cnf /etc/my.cnf
# bin/mysql_install_db --user=mysql
# chown -R root  .
# chown -R mysql var
# chgrp -R mysql .
# bin/mysqld_safe --user=mysql &
修改/etc/profile,把bin加入PATH,然后#source /etc/profile
默认的安装是没有密码的,添加之
#mysqladmin -u root password your_password
添加DBD::mysql
在Unix中安装Perl模块最简单的方法是使用CPAN模块。例如:
# perl -MCPAN -e shell
cpan> install DBI
cpan> install DBD::mysql
接下来安装Bugzilla,DBD::mysql安装成功的前提下才能安装bugzilla,否则bugzilla是不可能安装成功的。
Bugzilla Install Procedure
这篇文档由同事Jacky Chan写的,有些粗略,欢迎电子邮件交流zhuheng1229@gmail.com
Description:
     The symbol "BUGZILLA_HOME" is the publication directory for bugzilla, such as "/usr/local/apache2/htdoc/bugzilla" or "/var/www/html/bugzilla".
    The symbol "APACHE_HOME" is the install directory for apache, such as "/usr/local/apache2".
 
1 Download BUGZILLA_TAR_FILE from "www.bugzilla.org" and extract this tar file.
        #tar zxpvf  bugzilla-2.20rc2.tar.gz
        #mv bugzilla-2.20rc2   BUGZILLA_HOME
2 Check the Perl modules then install required modules
       #cd BUGZILLA_HOME
       #./checksetup.pl
          Install required modules according to error messages.
3 Create a database for bugzilla and modify "localconfig" file under bugzilla. 
           Login into mysql system and create a database with name 'bugzilla'.
             # mysql �Cu root �Cpxxxx
            mysql>  create database bugzilla;
            mysql> exit
           Modify localconfig file under bugzilla home.
             #cd BUGZILLA_HOME
           # vi localconfig
             Modify this file as following.
              $db_host = 'mysql_hostname';          # where is the database?
             $db_name = bugzilla;                  # name of the SQL database
             $db_user = 'mysql_user';              # root
             $db_pass = 'password';                #your_password
             $db_sock = '/var/lib/mysql/mysql.sock';  //or '/tmp/mysql.sock'
4 Create database schema and administrator for bugzilla.
   #./checksetup.pl
   Input administrator email, real name and password, please write down password for administrator.
5 Modify Apache's configuration for bugzilla
   #vi APACHE_HOME/conf/httpd.conf
      Add following code:
      <Directory "/var/www/html/bugzilla">
     AddHandler cgi-script .cgi
     Options +Indexes +ExecCGI
     DirectoryIndex index.cgi
     AllowOverride Limit
      </Directory>
6 Restart Apache web server and test bugzilla.
     #service httpd restart
      Open a browser and visit this URL: http://localhost/bugzilla, and login as admin.
7 Bug graphs if you have installed perl graph module
#crontab �Ce
 Linux will open vi editor, and input following code:
   5 0 * * * cd /var/html/www/bugzilla ; ./collectstats.pl
Please Shift+ZZ to save cron info.
 

Some question about smmsp problem, such as error as following:
WARNING: RunAsGid for MSP ignored, check group ids (egid=48, want=51)
We should change smmsp's group to apache group.
First edit /etc/passwd, and add user smmsp.
      smmsp:x:15716:48::/var/spool/clientmqueue:/bin/sh
Then execute following command:
     # usermod -g 48 smmsp
And you can change /var/spool/clientmqueue directory mode to 777:
#chmod �CR 777 /var/spool/clientmqueue
And you should add apache user to /etc/mail/trusted-users file.
 

朱恒
2007-02-08

没有评论: