環境: CentOS 7 x64
步驟
1. 安裝 Package
2. 設定防火牆, httpd, 以及 Mariadb
systemctl start httpd
systemctl enable httpd
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --reload
systemctl start mariadb
systemctl enable mariadb
mysqladmin -u root password '<root的密碼>'
mysql -u root -p
create database bugs;
grant all on bugs.* to bugs@localhost;
set password for bugs@localhost = PASSWORD('<bugs的密碼>');
flush privileges;
exit;
3. 下載並安裝 Bugzilla 5.0.2
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/b...
cd /var/www/html
tar -xvzf ~/bugzilla-5.0.2.tar.gz
mv bugzilla-5.0.2 bugzilla
cd bugzilla
./checksetup.pl --check-modules
./install-module.pl --all # 這個程序會很久
./checksetup.pl --check-modules # 會剩下 mod_perl2 Apache2::SizeLimit 兩個未安裝, 不用理會
./checksetup.pl # 產生 localconfig 檔
4. 編輯設定檔, 並開始安裝
# 改變以下參數
# $create_htaccess = 0;
# $db_name = 'bugs';
# $db_user = 'bugzs';
# $db_pass = '<bugzs的密碼>';
# Enter the e-mail address of the administrator: pdmadmin@APITECH.com.tw
# Enter the real name of the administrator: PDM Admin
# Enter a password for the administrator account:
# Please retype the password to verify:
5. 權限設定
chown -R apache.apache /var/www/html/bugzilla
chcon -R -t httpd_sys_rw_content_t /var/www/html/bugzilla
chcon -R -t httpd_sys_content_t /var/www/html/bugzilla
chcon -R -t httpd_sys_script_exec_t /var/www/html/bugzilla # 讓惱人的 SELinux 不會造成困擾
chcon -R -t httpd_sys_script_rw_t /var/www/html/bugzilla/data
setsebool -P httpd_can_sendmail on
setsebool -P httpd_can_network_connect on
6. httpd 設定
cat > /etc/httpd/conf.d/bugzilla.conf <<EOF
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +ExecCGI +FollowSymLinks
DirectoryIndex index.cgi index.html
AllowOverride All
</Directory>
留言列表