安裝步驟
1.為bugzilla添加所需的數(shù)據(jù)庫(kù)和權(quán)限,注意設(shè)置數(shù)據(jù)庫(kù)編碼為utf-8(添加用戶bugs:bugs)
mysql>create database bugs;
mysql>GRANT SELECT, INSERT,UPDATE, DELETE, INDEX, ALTER,CREATE,LOCK TABLES,
CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY 'bugs';
mysql>FLUSH PRIVILEGES;
mysql>quit
這樣就建了一個(gè)bugs表;一個(gè)用戶名為bugs,密碼的Mysql用戶。
2.安裝Bugzilla
將Bugzilla項(xiàng)目文件放到對(duì)應(yīng)目錄,假設(shè)為/var/www/bugzilla
cd bugzilla
./checksetup.pl
這樣就會(huì)檢測(cè)出來(lái)Perl需要安裝的模塊。然后根據(jù)列出的提示信息下載安裝Perl模塊。
而且只需要安裝那些必要的模塊就可以了。
當(dāng)./checksetup.pl能正常執(zhí)行完畢時(shí),在當(dāng)前目錄下就會(huì)生成一個(gè)文件:localconfig
然后,需要修改localconfig文件,這樣就可以對(duì)Bugzilla的設(shè)置進(jìn)行修改。
在這里你可以對(duì)數(shù)據(jù)庫(kù)名,端口,用戶名和密碼進(jìn)行配置。
修改好之后再次運(yùn)行:./checksetup.pl如果正常則表示安裝成功。
下面會(huì)提示配置管理員信息。
3.配置httpd 找到httpd.conf
3.1注釋掉AddHandler cgi-script .cgi使得可以執(zhí)行cgi
3.2添加虛擬路徑
<VirtualHost *(所對(duì)應(yīng)IP地址):8086>
DocumentRoot /var/www/bugzilla/
<Directory "/var/www/bugzilla">
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI +FollowSymLinks
DirectoryIndex index.cgi
AllowOverride Limit
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
同時(shí)在上面添加監(jiān)聽端口Listen: 8086
4.重啟Httpd服務(wù)
重啟服務(wù):service httpd restart
進(jìn)入路徑
http://xxx.xxx.xxx.xxx:8086/用上次輸入的郵箱地址和密碼進(jìn)入管理界面。
5.增加簡(jiǎn)單的ssl支持(這里使用bugzilla并且用8806端口做測(cè)試)
ssl : http://www.openssl.org/source/ mod_ssl: http://www.modssl.org/contrib/ftp/source/
5.1.生成所需文件:
cd /etc/httpd/conf
mkdir ssl
cd ssl
創(chuàng)建一個(gè) RSA 私用密鑰 openssl genrsa -out server.key 1024
用 server.key 生成證書簽署請(qǐng)求 CSR openssl req -new -key server.key -out server.csr
生成證書CRT文件 openssl x509 -days 365 -req -in server.csr -signkey server.key -out server.crt
5.2.修改httpd.conf
<VirtualHost *
(所對(duì)應(yīng)IP地址)
:8086>
DocumentRoot /var/www/bugzilla/
SSLEngine On
SSLCertificateFile conf/ssl/server.crt
SSLCertificateKeyFile conf/ssl/server.key
<Directory "/var/www/bugzilla/">
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit
</Directory>
</VirtualHost>
并增加監(jiān)聽端口8086 Listen 8086
這樣就需要使用https://xxx.xxx.xxx.xxx:8086/并接受證書訪問(wèn),而使用http://xxx.xxx.xxx.xxx:8086/不可訪問(wèn)