安裝步驟
1.為bugzilla添加所需的數據庫和權限,注意設置數據庫編碼為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
這樣就建了一個bugs表;一個用戶名為bugs,密碼的Mysql用戶。
2.安裝Bugzilla
將Bugzilla項目文件放到對應目錄,假設為/var/www/bugzilla
cd bugzilla
./checksetup.pl
這樣就會檢測出來Perl需要安裝的模塊。然后根據列出的提示信息下載安裝Perl模塊。
而且只需要安裝那些必要的模塊就可以了。
當./checksetup.pl能正常執行完畢時,在當前目錄下就會生成一個文件:localconfig
然后,需要修改localconfig文件,這樣就可以對Bugzilla的設置進行修改。
在這里你可以對數據庫名,端口,用戶名和密碼進行配置。
修改好之后再次運行:./checksetup.pl如果正常則表示安裝成功。
下面會提示配置管理員信息。
3.配置httpd 找到httpd.conf
3.1注釋掉AddHandler cgi-script .cgi使得可以執行cgi
3.2添加虛擬路徑
<VirtualHost *(所對應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>
同時在上面添加監聽端口Listen: 8086
4.重啟Httpd服務
重啟服務:service httpd restart
進入路徑
http://xxx.xxx.xxx.xxx:8086/用上次輸入的郵箱地址和密碼進入管理界面。
5.增加簡單的ssl支持(這里使用bugzilla并且用8806端口做測試)
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
創建一個 RSA 私用密鑰 openssl genrsa -out server.key 1024
用 server.key 生成證書簽署請求 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 *
(所對應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>
并增加監聽端口8086 Listen 8086
這樣就需要使用https://xxx.xxx.xxx.xxx:8086/并接受證書訪問,而使用http://xxx.xxx.xxx.xxx:8086/不可訪問