所需软件:
1:centos6.3
2:mysql
3:apache http server
4:perl
5:sendmail
6:bugzilla
步骤:
1:安装centos
可以用硬盘安装,也可以自己刻盘用光盘安装。用硬盘安装需要改boot引导,应该是可以的,我当初下的是liveCD版本的,很悲剧的好像内核有问题装不了,后来 发现liveCD版本到主要用于修复,可能是缺文件吧,后来下载了个DVD版的,直接刻盘装了;(我是装的双系统,所以装前需要一个fat32的盘,安装的过程中需将这个盘改成linux et2模式,我选的是Desktop模式,其他的都是默认即可)
2:mysql
centos6.3不太记得mysql是不是默认安装的(呵呵,我配糊涂了),没装的话:yum -y install mysql-server即可;
配置mysql:
[root@zhm zhm]#mysql -u root (默认是没密码的)
mysql> use mysql
mysql> update user set Password=password('123456') where User='root';
mysql>create database bugs;
mysql> Grant select,insert,update,delete,index,alter,create,lock tables,create temporary tables,drop,references ON bugs.* TO 'root'@'localhost' identified by ‘123456’;
或
mysql>grant all privileges on bugs.* to 'root'@'localhost' identified by '123456';
mysql>FLUSH PRIVILEGES; (刷新修改)
mysql> exit
[root@unihz etc]# service mysqld restart
3:apache
centos6.3默认安装了apache。
配置的修改:
[root@zhm zhm]#vim /etc/httpd/conf/httpd.conf
a:去除第807行的注释并增加.pl:AddHandlercgi-scrīpt .cgi .pl目的是令 Apache能够利用 Bugzilla;
b:修改第375行增加index.cgi DirectoryIndex index.cgi index.html index.html.var,其目的是配置Apache,以便在进入Bugzilla目录时查找 index.cgi 文件。
c:在未尾增加以下几行
<Directory/var/www/html>
......
OptionsExecCGI FollowSymLinks <---- add this line.
AllowOverride ALL <---- add this line. </Directory>
4:perl
centos6.3默认安装了perl。
5:sendmail
a:安装
安装邮件服务器:[root@zhm zhm]#yum install sendmail sendmail-cf
安装pop3/imap服务:[root@zhm zhm]#yum install dovecot
b:修改配置
[root@zhm zhm]#vim /etc/mail/sendmail.mc
把最前面的dnl删除:
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISMS',`EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
修改SMTP的监听IP为 0.0.0.0 (任何网段的都可以监听):
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
生成配置:
[root@zhm zhm]#m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
修改dovecot配置(邮箱验证):[root@zhm zhm]# vim /etc/dovecot/dovecot.conf
去掉下面一行前面的#
#protocols =imap pop3
增加:
disable_plaintext_auth = no
ssl = no
添加域名: [root@zhm zhm]#vim /etc/mail/local-host-names
添加域名如:163.com //每个域名一行
修改认证方式: [root@zhm zhm]#vim /etc/sysconfig/saslauthd
找到第7行的:MECH=pam 改成:MECH=shadow
c:启动服务
[root@zhm zhm]#service saslauthd start #启动saslauthd
[root@zhm zhm]#chkconfig saslauthd on #设置saslauthd开机自动启动
[root@zhm zhm]#service dovecot start
[root@zhm zhm]#chkconfig dovecot on
d:测试服务
testsaslauthd -u username -p password
如果显示0: OK “Success.”则表明saslauthd工作正常;
6:bugzilla安装
安装:
直接下载过后解压就行了,我是放在/var/www/html下
修改配置:
运行[root@zhm zhm]#/var/www/html/bugzilla/checksetup.pl
按张提示安装所需到模块;
安装完后修改配置:
[root@zhm zhm]#vim /var/www/html/bugzilla/Bugzilla/Install/Localconfig.pm
修改:
$index_html=0 改为:$index_html=1 (这样会生成一个index.html文件,该文件指向index.cgi)
$db_pass=‘’ 改为:$db_pass=‘123456’ (单引号中为创建bugs用户的密码,一定与前面设置的相同)
$db_name='bugs'; -----数据库名
$db_user='root'; -----用户名称
$db_pass='123456'; ------密码
再运行: [root@zhm zhm]#vim /var/www/html/bugzilla/Bugzilla/Install/Localconfig.pm
要求你输入administrator的email、realname和password。 创建bugs数据库中的表,
最后将提示输入如下信息:
a:Enter the e-mail address of the administrator:admin@unihz.com (要求输入bugzilla管理员e-mail地址,注意是自己前面配置的邮箱帐户,这是登录bugzilla的帐户)
b:You entered 'admin@unihz.com'.Is this correct? [Y/n] (确认刚才输入的e-mail地址是否正确,回答y即可 )
c:Enter the real name of the administrator:root (输入真实姓名)
d:Enter a password for the administrator account:123456 (登录bugzilla的密码,可以与前面不同,但一定要记住)
e:Please retype the password to verify: 12345678 (进行密码确认)
这时将出现如下信息: admin@unihz.com'is now set up as an administrator account. 表示帐户创建成功。
至此所有安装及配置都完成了,可以进数据库中看到bugs库中已经有一些表了。