所需軟體:
1:centos6.3
2:mysql
3:apache http server
4:perl
5:sendmail
6:bugzilla
步驟:
1:安裝centos
可以用硬碟安裝,也可以自己刻盤用CD光牒安裝。用硬碟安裝需要改boot引導,應該是可以的,我當初下的是liveCD版本的,很悲劇的好像核心有問題裝不了,後來 發現liveCD版本到主要用于修複,可能是缺檔案吧,後來下載下傳了個DVD版的,直接刻盤裝了;(我是裝的雙系統,是以裝前需要一個fat32的盤,安裝的過程中需将這個盤改成linux et2模式,我選的是Desktop模式,其他的都是預設即可)
2:mysql
centos6.3不太記得mysql是不是預設安裝的(呵呵,我配糊塗了),沒裝的話:yum -y install mysql-server即可;
配置mysql:
[[email protected] 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
[[email protected] etc]# service mysqld restart
3:apache
centos6.3預設安裝了apache。
配置的修改:
[[email protected] 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:安裝
安裝郵件伺服器:[[email protected] zhm]#yum install sendmail sendmail-cf
安裝pop3/imap服務:[[email protected] zhm]#yum install dovecot
b:修改配置
[[email protected] 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
生成配置:
[[email protected] zhm]#m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
修改dovecot配置(郵箱驗證):[[email protected] zhm]# vim /etc/dovecot/dovecot.conf
去掉下面一行前面的#
#protocols =imap pop3
增加:
disable_plaintext_auth = no
ssl = no
添加域名: [[email protected] zhm]#vim /etc/mail/local-host-names
添加域名如:163.com //每個域名一行
修改認證方式: [[email protected] zhm]#vim /etc/sysconfig/saslauthd
找到第7行的:MECH=pam 改成:MECH=shadow
c:啟動服務
[[email protected] zhm]#service saslauthd start #啟動saslauthd
[[email protected] zhm]#chkconfig saslauthd on #設定saslauthd開機自動啟動
[[email protected] zhm]#service dovecot start
[[email protected] zhm]#chkconfig dovecot on
d:測試服務
testsaslauthd -u username -p password
如果顯示0: OK “Success.”則表明saslauthd工作正常;
6:bugzilla安裝
安裝:
直接下載下傳過後解壓就行了,我是放在/var/www/html下
修改配置:
運作[[email protected] zhm]#/var/www/html/bugzilla/checksetup.pl
按張提示安裝所需到子產品;
安裝完後修改配置:
[[email protected] 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'; ------密碼
再運作: [[email protected] zhm]#vim /var/www/html/bugzilla/Bugzilla/Install/Localconfig.pm
要求你輸入administrator的email、realname和password。 建立bugs資料庫中的表,
最後将提示輸入如下資訊:
a:Enter the e-mail address of the administrator:[email protected] (要求輸入bugzilla管理者e-mail位址,注意是自己前面配置的郵箱帳戶,這是登入bugzilla的帳戶)
b:You entered '[email protected]'.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 (進行密碼确認)
這時将出現如下資訊: [email protected]'is now set up as an administrator account. 表示帳戶建立成功。
至此所有安裝及配置都完成了,可以進資料庫中看到bugs庫中已經有一些表了。