- 切換為root用戶:
sudo su
- 安裝必須的軟件:
apt-get install git nano
apt-get install apache2 mysql-server libappconfig-perl libdate-calc-perl libtemplate-perl libmime-perl build-essential libdatetime-timezone-perl libdatetime-perl libemail-sender-perl libemail-mime-perl libemail-mime-modifier-perl libdbi-perl libdbd-mysql-perl libcgi-pm-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl apache2-mpm-prefork libapache2-mod-perl2 libapache2-mod-perl2-dev libchart-perl libxml-perl libxml-twig-perl perlmagick libgd-graph-perl libtemplate-plugin-gd-perl libsoap-lite-perl libhtml-scrubber-perl libjson-rpc-perl libdaemon-generic-perl libtheschwartz-perl libtest-taint-perl libauthen-radius-perl libfile-slurp-perl libencode-detect-perl libmodule-build-perl libnet-ldap-perl libauthen-sasl-perl libtemplate-perl-doc libfile-mimeinfo-perl libhtml-formattext-withlinks-perl libfile-which-perl libgd-dev libmysqlclient-dev lynx-cur graphviz python-sphinx rst2pdf
- 下載bugzilla:
cd /var/www/html
git clone --branch release-X.X-stable https://github.com/bugzilla/bugzilla bugzilla
- 創(chuàng)建bugzilla數(shù)據(jù)庫:
mysql -u root -p -e "GRANT ALL PRIVILEGES ON bugs.* TO bugs@localhost IDENTIFIED BY '$db_pass'"
- 配置Apache服務(wù)器:
nano /etc/apache2/sites-available/bugzilla.conf
ServerName localhost
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride All
</Directory>
a2ensite bugzilla
a2enmod cgi headers expires rewrite
service apache2 restart
- 檢查安裝:
cd /var/www/html/bugzilla/
./checksetup.pl --check-modules
檢查完成之后氛改,我們會發(fā)現(xiàn)缺少了一些組件滚朵,我們需要安裝它們,用以下命令即可實(shí)現(xiàn):
perl install-module.pl --all
再次檢查: ./checksetup.pl --check-modules
, 應(yīng)該沒設(shè)么缺的了.
然后, 運(yùn)行: ./checksetup.pl
, 它會在/var/www/html/bugzilla路徑下自動生成一個名為localconfig的文件
- 編輯localconfig:
Line 29: set $webservergroup to www-data
Line 67: set $db_pass to the password for the bugs user you created in MySQL a few steps ago
- 再次檢查安裝:
./checksetup.pl
命令行會讓你填郵箱地址, 用戶名, 密碼等信息, 填完就噢啦. - 檢查Apache服務(wù)器能否連通:
./testserver.pl http://localhost/bugzilla
- 瀏覽器訪問:
http://localhost/bugzilla