您好,登錄后才能下訂單哦!
system: Centos 7.6(可以訪問(wèn)yum源)
Buzilla: 5.0.4
Mariadb-server: 5.5.60
關(guān)閉selinux Firewall
關(guān)閉selinux (permissive可以改成disable)
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/g' /etc/selinux/config
關(guān)閉Firewall
systemcstop firewalld.service
systemc disable firewalld.service
啟用EPEL倉(cāng)庫(kù)
yum install deltarpm epel-release
yum update
若內(nèi)核更新,請(qǐng)重啟此機(jī)器
安裝環(huán)境使用依賴包
yum install mod_ssl mod_ssl mod_perl mod_perl-deve
安裝apache服務(wù),并啟動(dòng)服務(wù)
查看是否安裝apache服務(wù)
[root@bugzillatest bugzilla]# rpm -qa |grep httpd
httpd-2.4.6-88.el7.centos.x86_64
httpd-devel-2.4.6-88.el7.centos.x86_64
httpd-tools-2.4.6-88.el7.centos.x86_64
apache已經(jīng)存在,則不需要安裝,直接啟動(dòng)apache,如果沒(méi)有安裝則需要使用yum install httpd安裝
systemctl start httpd.service
systemctl status httpd.service #查看狀態(tài)
systemctl enable httpd.service #設(shè)置開(kāi)機(jī)啟功
安裝mariadb
centos7引入MariaDB替代MYSQL數(shù)據(jù)庫(kù),Maria作為開(kāi)源的數(shù)據(jù)庫(kù)系統(tǒng),使用效果與MYSQL不相上下
yum install mariadb-server mariadb mariadb-devel php-mysql
systemctl start mariadb.service #開(kāi)啟服務(wù)
systemctl status mariadb.service #查看狀態(tài)
systemctl enable mariadb.service #設(shè)置開(kāi)機(jī)啟動(dòng)
設(shè)置數(shù)據(jù)庫(kù)管理員密碼
mysql -u root
MariaDB [ (none) ]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('myrootpassword'); #替換myrootpassword為你的密碼
Query OK, 0 rows affected (0.00 sec)
MariaDB [ (none) ]> \q #退出數(shù)據(jù)庫(kù)
Bye
用root用戶登錄進(jìn)行測(cè)試
mysql -u root -p
Enter password: myrootpassword
Welcome to the MariaDB monitor. Commands end with ; or \g.
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.
MariaDB [ (none) ]> \q
Bye
MariaDB設(shè)置max_allowed_packet(最大允許傳輸包的大?。?br/>為防止服務(wù)器端和客戶端在一次傳送數(shù)據(jù)包的過(guò)程當(dāng)中,數(shù)據(jù)包最大值溢出,Bugzilla 要求MariaDB配置最小尺度的max_allowed_packet
vim /etc/my.cnf
在[mysqld]部分添加 下面部分:
#change this if you need more!
max_allowed_packet=4M #設(shè)置最大傳輸大小4M
重啟MariaDB服務(wù)
systemctl restart mariadb.service
安裝Bugzilla依賴包 (1300個(gè)左右)
yum install gcc gcc-c++ graphviz graphviz-devel patchutils gd gd-devel wget perl* -x perl-homedir
安裝Bugzilla
(1)配置數(shù)據(jù)庫(kù):
mysql -u root -p
Enter password: myrootpassword
MariaDB [ (none) ]> create database bugs;
Query OK, 1 row affected (0.00 sec)
MariaDB [ (none) ]> grant all on bugs.* to bugs@localhost identified by 'youpassword'; #替換youpassword為你的密碼
Query OK, 0 row affected (0.00 sec)
MariaDB [ (none) ]> \q
Bye
下載Bugzilla最新包并安裝
cd /mnt
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.4.tar.gz
tar -zxvf bugzilla-5.0.4.tar.gz
mkdir /var/www/html/bugzilla
cp -R ./bugzilla-5.0.4/* /var/www/html/bugzilla/ # 移動(dòng)bugzilla-5.0到/var/www/html/bugzilla/ 下,/var/www/html/為bugzilla默認(rèn)的路徑,不移動(dòng)到此路徑,瀏覽器輸入網(wǎng)址啟動(dòng)不了bugzilla
檢查bugzilla缺少組件,并進(jìn)行自動(dòng)安裝
cd /var/www/html/bugzilla
./checksetup.pl #此命令執(zhí)行后,可看到缺少的組件,并按提示安裝
/usr/bin/perl install-module.pl --all #自動(dòng)安裝缺少的組件
./checksetup.pl #再次檢查一下,查看是否還有缺少組件,原則上,除了DBD-Oracle沒(méi)有安裝后,其他都應(yīng)該安裝完畢
此時(shí)出現(xiàn)如下一段文字,表示我們配置文件與前面設(shè)置有些不一致
編譯./localconfig ,配置成我們自己的環(huán)境(主要是數(shù)據(jù)庫(kù)名、密碼與前面一致)
vim ./localconfig
下面是我的配置文件: (Ps: 需要確認(rèn)bugzilla數(shù)據(jù)庫(kù)名跟密碼是否跟你創(chuàng)建是一致)
$create_htaccess = 1;
$webservergroup = 'apache';
$use_suexec = 0;
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = 'youpassword'; #對(duì)應(yīng)第九步你所填的密碼
$db_port = 0;
$db_sock = '';
$db_check = 1;
$db_mysql_ssl_ca_file = '';
$db_mysql_ssl_ca_path = '';
$db_mysql_ssl_client_cert = '';
$db_mysql_ssl_client_key = '';
$index_html = 0;
$interdiffbin = '/usr/bin/interdiff';
$diffpath = '/usr/bin';
$site_wide_secret = '2qCKjZhkZZRFuy1ueKK6sho8OO1tuXdHp2fihYSG1F127wu0qpjXjjHnVsMBaeTN';
現(xiàn)在讓我們?cè)俅芜\(yùn)行安裝腳本。 現(xiàn)在應(yīng)該檢測(cè)正確的數(shù)據(jù)庫(kù)配置,并開(kāi)始訪問(wèn)MariaDB服務(wù)器進(jìn)行最終設(shè)置。
完成Bugzilla注冊(cè)信息
./checksetup.pl
創(chuàng)建Bugzilla安裝腳本
sed -i 's/^Options -Indexes$/#Options -Indexes/g' ./Bugzilla/.htaccess
配置Bugzilla安裝Apache服務(wù)
Apache默認(rèn)識(shí)別不了Bugzilla,通過(guò)創(chuàng)建文件/etc/httpd/conf.d/bugzilla.conf ,把我們的Bugzilla網(wǎng)頁(yè)系統(tǒng)引入到Apache服務(wù)
vim /etc/httpd/conf.d/bugzilla.conf
添加下面信息:
#/etc/httpd/conf.d/bugzilla.conf
<VirtualHost *:80>
DocumentRoot /var/www/html/bugzilla
ServerName www.szmisbugzilla.com
ErrorLog logs/bugzilla-error_log
CustomLog logs/bugzilla-access_log common
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options ExecCGI Indexes FollowSymLinks
DirectoryIndex index.cgi index.html
AllowOverride None
</Directory>
</VirtualHost>
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。