linux下安装bugzilla

1)下 载
cd /usr/local/src
cd /var/www/html
tar xzvf /usr/local/src/bugzilla-3.1.2.tar.gz
cd bugzilla-3.1.2
2)安装
2.1) 安装 Perl Modules
检查
./checksetup.pl --check-modules
安装
perl -MCPAN -e 'install "Bundle::Bugzilla"'
再次检查
发现
* NOTE: You must run any commands listed below as root.
Checking for Email-MIME-Modifier (any) not found
Checking for DBD-mysql (v2.9003)not found
于是
安装
2.1.1) /usr/bin/perl -MCPAN -e 'install Email::MIME::Modifier'
2.1.2) /usr/bin/perl -MCPAN -e 'install DBD::mysql'
发现错误:
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/include/mysql -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing
embedded (mysql_config) =
libs (mysql_config) = -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
mysql_config(guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword(default ) =
testsocket (default ) =
testuser (default ) =
To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.
Checking if your kit is complete...
Looks good
Multiple copies of Driver.xst found in: /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/ /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/ at Make
file.PL line 739
Using DBI 1.601 (for perl 5.008005 on i386-linux-thread-multi) installed in /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/
Writing Makefile for DBD::mysql
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
gcc -c-I/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI -I/usr/include/mysql -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LA
RGEFILE_SOURCE -fno-strict-aliasing -DDBD_MYSQL_INSERT_ID_IS_GOOD -g-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D
_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -DVERSION=\"4.006\" -DXS_VERSION=\"4.006\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread
-multi/CORE" dbdimp.c
In file included from dbdimp.c:20:
dbdimp.h:22:49: mysql.h: 没有那个文件或目录
dbdimp.h:23:45: mysqld_error.h: 没有那个文件或目录
dbdimp.h:25:49: errmsg.h: 没有那个文件或目录
In file included from dbdimp.c:20:
从错误信息看出,安装DBD的时候,程序去找默认的mysql路径,但如果你的mysql没有在默认路径下安装的话就会出错,幸好可以订制 ,于是:
cd /root/.cpan/build/DBD-mysql-4.006
perl Makefile.PL-mysql_config=/usr/local/mysql/bin/mysql_config
make
make test
make install
安装成功
3) 开始配置
./checksetup.pl
产生了一个localconfig
你需要编辑文件,文件里面就是些诸如数据库名,用户名,密码等等之类,你通常只需配置
数据库用户名和密码
4)产生数据库
再次
./checksetup.pl
5)配置apache
配置的方式很多
可以采用cgi和mod_perl启动
我为了偷懒,我选用了cig并采取了如下方式:
修改DocumentRoot
DocumentRoot "/var/www/html/bugzilla-3.1.2"
然后加上
<Directory /var/www/html/bugzilla-3.1.2>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit
</Directory>
访问 apache报错
[Fri Dec 28 09:16:10 2007] [error] [client 218.1.120.227] (13)\xc8\xa8\xcf\xde\xb2\xbb\xb9\xbb: exec of '/usr/local/bugzilla-3.0.2/index.cgi' failed
[Fri Dec 28 09:16:10 2007] [error] [client 218.1.120.227] Premature end of script headers: index.cgi
于是修改该死的/etc/sysconfig/selinux
让SELINUX=disabled
启动apache,终于看到首页 ,可惜是e文
6)添加中文模板
将下载的压缩文件解压并将cn目录搞到/var/www/html/bugzilla-3.0.2/template/(
起初这个目录下只有en目录)
cd /usr/local/src
unzip -d bugzilla-3.1.2-cn bugzilla-3.1.2-cn.zip
cp -r bugzilla-3.1.2-cn/cn /var/www/html/bugzilla-3.0.2/template/
再此访问,终于看到中文

你可能感兴趣的:(thread,linux,mysql,cgi,perl)