1、安裝准備:
Centos7保證網絡連通,如果網絡不能連通,可通過配置yum源使用代理服務。
vim /etc/yum.conf
# The proxy server - proxy server:port
proxy=http://192.168.178.1:8080
# The account details for yum connections
# proxy_username=yum-user
# proxy_password=qwerty
2、關閉SELinux、防火牆
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/g' /etc/selinux/config
systemctl stop firewalld.service
systemctl disable firewalld.service
centos7默認防火牆為firewalld,若已經安裝iptables,可關閉iptables或者打開80端口,不然后續http請求失敗
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
service iptables save
service iptables restart
3、執行以下命令啟用EPEL倉庫
yum install deltarpm epel-release
yum update
若內核更新,reboot重啟虛擬機
4、安裝環境使用依賴包
yum install mod_ssl mod_ssl mod_perl mod_perl-devel
5、安裝apache服務,並啟動服務
systemctl start httpd.service
systemctl status httpd.service #查看狀態
systemctl enable httpd.service #設置開機啟功
apache服務開啟后,打開瀏覽器,輸入http://ip-of-your-server/ ,若看到testing123界面,代表Apache已經開啟
6、安裝MariaDB
centos7引入MariaDB替代MYSQL數據庫,Maria作為開源的數據庫系統,使用效果與MYSQL不相上下
yum install mariadb-server mariadb mariadb-devel php-mysql
systemctl start mariadb.service #開啟服務
systemctl status mariadb.service #查看狀態
systemctl enable mariadb.service #設置開機啟動
7、設置數據庫root管理員密碼
mysql -u root
MariaDB [ (none) ]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('myrootpassword'); #替換myrootpassword為你的密碼
Query OK, 0 rows affected (0.00 sec)
MariaDB [ (none) ]> \q
Bye
登陸root用戶進行測試
mysql -u root -p
Enter password: myrootpassword
Your MariaDB connection id is 5
Server version: 5.5.41-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
# maximum allowed size of an attachment upload
#change this if you need more!
max_allowed_packet=4M #設置最大傳輸大小4M
Enter password: myrootpassword

(4)編譯./localconfig ,配置成我們自己的環境(主要是數據庫名、密碼與前面一致)
vim ./localconfig
下面是我的配置文件:
(5)完成Bugzilla注冊信息
./checksetup.pl
(6)創建Bugzilla安裝腳本
sed -i 's/^Options -Indexes$/#Options -Indexes/g' ./.htaccess
10、配置Bugzilla安裝Apache服務
Apache默認識別不了Bugzilla,通過創建文件/etc/httpd/conf.d/bugzilla.conf ,把我們的Bugzilla網頁系統引入到Apache服務
vim /etc/httpd/conf.d/bugzilla.conf
添加下面信息:
#/etc/httpd/conf.d/bugzilla.conf
<VirtualHost *:80>DocumentRoot /var/www/html/bugzilla/
</VirtualHost>
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes
</Directory>
重啟Apache服務:
systemctl restart httpd.service
至此,我們就已經成功部署了Bugzilla系統,打開網頁,輸入http://ip-of-you-server,(ip-of-you-server為你的centos7主機ip)我們可以看到如下界面