Bugzilla的安裝
上一篇 / 下一篇 2008-05-02 18:36:28 / 個人分類:測試生活
最新的穩定版Bugzilla是3.0版的,看了一下release notice,對附屬軟件有版本的要求。(只要/etc/rc.d/init.d下面有對應的服務腳本,就可以用Server httpd start/stop/restart的方式直接啟動服務)
1. Perl:用perl –v檢查Perl的版本,版本號為5.8.8,要求Perl 5.8.0。
2. Database Engine:用mysql –v檢查MySQL的版本,出現ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock',說明MySQL服務未啟動。先輸入mysql_install_db初始化數據庫,再輸入cd /etc/rc.d/init.d 然后輸入./mysqld start可以啟動服務。如果要加入自啟動服務隊列的話,首先得看/etc下inittab文件中首先啟動的id號,我的機器是5,然后在/etc/rc.d/rc5.d中添加啟動服務的鏈接ln -s ../init.d/mysqld S94mysqld。再次用mysql –v,版本號為5.0.37,Bugzillia對Database無版本要求。另外,如果Database選用PostgreSQL的話,可用psql –v檢查PostgreSQL的版本,要求8.00。
3. Web Server:只要用支持CGI scripts的server即可,一般來說使用的是Apache。使用自啟動服務ln -s ../init.d/httpd S94httpd。使用httpd –v查看版本,版本號為2.2.4?梢杂http://127.0.0.1來測試服務是否正常。
4. Bugzilla:將bugzilla-3.0.tar.gz包放入/usr/local,解包tar -zxvf bugzilla-3.0.tar.gz,進入bugzilla目錄。
5. Perl Modules:用./checksetup.pl --check-modules來檢查是否擁有符合的Perl Modules。
[root@localhost bugzilla-3.0]# ./checksetup.pl --check-modules
* This is Bugzilla 3.0 on perl 5.8.8
* Running on Linux 2.6.21-1.3194.fc7 #1 SMP Wed May 23 22:35:01 EDT 2007
Checking perl modules...
Checking for CGI (v2.93) ok: found v3.15
Checking for TimeDate (v2.21) not found
Checking for DBI (v1.41) ok: found v1.53
Checking for PathTools (v0.84) ok: found v3.12
Checking for Template-Toolkit (v2.12) ok: found v2.18
Checking for Email-Send (v2.00) not found
Checking for Email-MIME-Modifier (any) not found
Checking available perl DBD modules...
Checking for DBD-Pg (v1.45) ok: found v1.49
Checking for DBD-mysql (v2.9003) ok: found v3.0008
The following Perl modules are optional:
Checking for GD (v1.20) not found
Checking for Template-GD (any) not found
Checking for Chart (v1.0) not found
Checking for GDGraph (any) not found
Checking for GDTextUtil (any) not found
Checking for XML-Twig (any) not found
Checking for MIME-tools (v5.406) not found
Checking for libwww-perl (any) ok: found v2.033
Checking for PatchReader (v0.9.4) not found
Checking for PerlMagick (any) not found
Checking for perl-ldap (any) not found
Checking for SOAP-Lite (any) not found
Checking for HTML-Parser (v3.40) ok: found v3.56
Checking for HTML-Scrubber (any) not found
Checking for Email-MIME-Attachment-Stripper (any) not found
Checking for Email-Reply (any) not found
Checking for mod_perl (v1.999022) ok: found v2.000003
Checking for CGI (v3.11) ok: found v3.15
Checking for Apache-DBI (v0.96) not found
顯然有很多Modules沒有安裝,明天的基本完成目標就是到http://www.cpan.org/modules/ 下載并安裝這些包。
Bugzilla的安裝(續)
5. Perl Modules:由于公司無法用ftp連到國外的網站上,所以就無法使用自動更新Perl Modules的命令perl -MCPAN -e ’install "<modulename>"’。必須得一個包一個包下載下來分別安裝。
http://search.cpan.org 在這個頁面上可以search到所要的tar包。(什么是CPAN?CPAN是Comprehensive Perl Archive Network的縮寫,它是一個巨大的Perl軟件收藏庫,收集了大量有用的Perl模塊(modules)及其相關的文件。)
TimeDate:在http://search.cpan.org/~gbarr/TimeDate-1.16/lib/Date/Format.pm 下載TimeDate-1.16.tar.gz,module version為2.22。在任意文件夾tar –xf <filename>后,進入目錄,順序執行perl Makefile.PL/make/make test/make install即可。其他module的安裝方法與此相同。在執行make時,遇到錯誤
Manifying blib/man3/Date::Format.3pm
Can't open blib/man3/Date::Format.3pm for writing: 沒有那個文件或目錄
at /usr/lib/perl5/5.8.8/ExtUtils/Command/MM.pm line 132
經過石可箴的介紹,blib/man3是專門放man的說明文檔的地方,對于TimeDate的運行來說不是必要的,所以在Makefile中將
$(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) \
lib/Date/Format.pm $(INST_MAN3DIR)/Date::Format.$(MAN3EXT) \
lib/Date/Parse.pm $(INST_MAN3DIR)/Date::Parse.$(MAN3EXT) \
lib/Time/Zone.pm $(INST_MAN3DIR)/Time::Zone.$(MAN3EXT)
用#注釋掉即可。make install后,用/usr/local/bugzilla-3.0/checksetup.pl --check-modules檢查TimeDate包安裝完畢。想想還有17個這樣的包要安裝。。。我的天。。。
Email-Send:在http://www.cpan.org/modules/by-module/Email/ 下載Email-Send-2.185.tar.gz,解包后安裝,perl Makefile.PL后有warning。
Warning: prerequisite Email::Address 1.80 not found.
Warning: prerequisite Email::Simple 1.92 not found.
Warning: prerequisite Module::Pluggable 2.97 not found.
Warning: prerequisite Return::Value 1.28 not found.
說明Email::Address 1.80/Email::Simple 1.92/Module::Pluggable/Return::Value 1.28三個perl模塊沒有安裝,遂即到網上找包。
Email::Address:在http://search.cpan.org/~rjbs/Email-Address-1.888/lib/Email/Address.pm 下載Email-Address-1.888.tar.gz,make的時候同樣發生了類似于TimeDate的make錯誤
Manifying blib/man3/Email::Address.3pm
Can't open blib/man3/Email::Address.3pm for writing: 沒有那個文件或目錄
at /usr/lib/perl5/5.8.8/ExtUtils/Command/MM.pm line 132
說明一定是我機器上有環境變量或者其他什么的沒有設置正確。將關鍵字放在google上無相關信息,隨即想到了上CPAN官方論壇上求助,www.cpanforum.org,等待回復。
Bugzilla的安裝(續)
From the official forum of CPAN, I found some users of different perl modules met the same installation problem like me. But it seems no one has solved it.
Here is the reference links: http://www.cpanforum.com/threads/264 http://www.cpanforum.com/posts/3174 http://ubuntuforums.org/archive/index.php/t-12245.html
This is my topic: http://www.cpanforum.com/threads/5832
Since no clue to solve it, I continue to learn about DirectFB.
In the afternoon, I found a link in Chinese about this problem, and he has solve it! But he just used the auto update command, which based on the permission of ftp protocol… -_-! http://www.linuxfans.org/bbs/archiver/tid-170104.html
Bugzilla的安裝(續)
今天有大的突破,石可箴嘗試了很多方法后發現,把perl module的安裝文件從VMwareTool創建的目錄/mnt/hgfs/ShareFolder移出來后再make即可,F在總算可以正常地手動安裝下去了。隨即我補完了自己先前提的問題以防后人再走彎路。http://www.cpanforum.com/threads/5832
Perl Modules Installed: (縮進代表安裝的依賴關系)
TimeDate
Template-Toolkit
Text::Autoformat
Text::Reform
Image::Info/Image::Size
Pod::POM
File::Temp/File::Spec
Email-Send
Email::Address
Test::Pod::Coverage
Pod::Coverage
Devel::Symdump
Test::Pod
Pod::Simple
Pod::Escapes
Test::Pod::Coverage
Pod::Coverage
碰到了棘手的問題:在安裝Pod::Coverage這個module時,他的一個必須要安裝的module Test::Pod::Coverage的安裝,也必須要Pod::Coverage。這樣就形成了一個死循環。。。
嘗試了一下強行安裝Test::Pod::Coverage這個module,報錯了但好像還是裝上了點東西的,層層倒退安裝上去,終于把Pod::Coverage這個module強行安裝上去了,保險起見,又從最低層module層層安裝了一遍上來。
克服了這些困難后,明天應該能將perl modules搞定了。
Bugzilla的安裝(續)
Here is all the PERL MODULES I installed these two days, it’s too too lengthy.
perl modules:
TimeDate
Template-Toolkit
Text::Autoformat
Text::Reform
Image::Info/Image::Size
Pod::POM
File::Temp/File::Spec
Email-Send
Email::Address
Test::Pod::Coverage
Pod::Coverage
Devel::Symdump
Test::Pod
Pod::Simple
Pod::Escapes
Test::Pod::Coverage
Pod::Coverage
Email::Simple
Test::MinimumVersion
File::Find::Rule::Perl
File::Find::Rule
Number::Compare
Text::Glob
Perl::MinimumVersion
List::Util
PPI
Clone
Taint::Runtime
List::MoreUtils
Task::Weaken
Test::Object
Test::Builder
Params::Util
Test::Script
IPC::Run3
version
version
Module::Pluggable
Return::Value
Email::Abstract
MIME::Entity
IO::Stringy
Mail::Field
Mail::Header
Mail::Internet
Email-MIME-Modifier
Email::MIME
MIME::Types
Email::MIME::ContentType
Email::MIME::Encodings
Email::MessageID
perl modules optional:
GD
libgd
Math::Trig
Template-GD
GD::Text
GD::Graph
GD::Graph3D
Chart
XML-Twig
XML::Parser
HTML::TreeBuilder
Tie::IxHash
Text::Iconv
Unicode::Map8
Unicode::String
XML::Handler::YAWriter
XML::Parser::PerlSAX
XML::SAX::Writer
XML::Filter::BufferText
LWP::Simple
XML::Simple
XML::SAX
XML::NamespaceSupport
XML::XPathEngine
XML::XPath
GDGraph
GDTextUtil
MIME-tools
PatchReader
SOAP-Lite
XMLRPC::Lite
UDDI::Lite
XML::Parser::Lite
HTML-Scrubber
Email-Reply
Email::MIME::Creator
Email::Simple::Creator
Email::Date
Time::Piece
Apache-DBI
Image::Magick
Net::LDAP
Email-MIME-Attachment-Stripper
The last two in red is the only modules I can’t install now.
About the Image::Magick module, when I install it, it shows ‘Note (probably harmless): No library found for -lgvc’. I think I can solve it by accessing to its website: www.imagemagick.org
About the Net::LDAP, when I install it, it will try to access to the perl server by FTP. It seems without FTP, it just can’t be installed properly. I will try to find another way to solve it tomorrow.
Bugzilla的安裝(續)
All Perl Modules have been done!
I’ll continue to install Bugzilla platform.
6. Sendmail:到www.sendmail.org 下載最新的tarball。解壓后,./Build安裝sendmail系統。Reboot系統,假設sendmail進程已經被自動啟動的話,用
# telnet localhost 25
ehlo test
來查看sendmail運行是否正常。其中250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN代表了smtp協議工作正常。退出telnet可以用quit。
Bugzilla的相關文件安裝工作到此為止。
Bugzilla的配置
首先進入/usr/local/bugzilla-3.0的目錄運行# ./checksetup.pl,在bugzilla自動檢查完所有module后,會生成localconfig文件,其中唯一需要改的設置是$db_pass,可以設置access入database的password?戳艘幌缕渌麉,暫時默認即可,重新運行# ./checksetup.pl以激活新的配置參數。
在Bugzilla Guide上看到一個程序叫Bugzilla Database Schema,這個軟件可以將Bugzilla的database信息用圖表表示出來,還可以比較不同version數據庫的不同之處,覺得這個程序挺有用的,等Bugzilla正常工作后再來安裝測試一下。網站地址:http://www.ravenbrook.com/project/p4dti/tool/cgi/bugzillaschema
設置MySQL支持文件的大。涸/etc/my.cnf中,增加max_allowed_packet=1M。這與Bugzilla默認的附件大小值maxattachmentsize相同。如果兩個值不同的話,兩者取其輕。
設置small words:為了不讓Bugzilla的cc、ftp等短于4個字母的word在MySQL中錯誤顯示,需要在/etc/my.cnf中添加ft_min_word_len=2。
為Bugzilla添加一個MySQL的用戶:
mysql
GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY '$db_pass';
FLUSH PRIVILEGES;
超長的那句表明數據庫名為’bugs’,數據庫用戶名為’bugs@localhost’,密碼為先前在localconfig中設置的字段。
重新運行# ./checksetup.pl,現在它會檢測到localconfig已經被修改。再次運行mysql,創建數據庫’bugs’,create database bugs;。
明天繼續。
Bugzilla的配置(續)
現在配置Apache:
Apache的默認訪問路徑:/var/www/html。默認訪問頁面:index.html。
把Bugzilla關聯到Apache服務器中,# ln -s /usr/local/bugzilla-3.0 /var/www/html/bugzilla
設置允許Apache運行cgi-bin目錄之外的CGI腳本,編輯文件/etc/httpd/conf/httpd.conf,去除注釋這一行:AddHandler cgi-script. .cgi。設置默認支持字符集,將AddDefaultCharset后改成UTF-8。設置允許在bugzilla目錄下運行cgi文件,增加以下內容:
<Directory /var/www/html/bugzilla>
AddHandler cgi-script. .cgi
Options +Indexes +ExecCGI +FollowSymLinks
DirectoryIndex index.cgi
AllowOverride Limit
</Directory>
重啟Apache服務。
設置sendmail:bugzilla默認發送mail的地址為 bugs@localhost.localdomain ,通常會被其他郵件服務器認作為垃圾郵件而被block,修改/etc/mail/sendmail.mc中的LOCAL_DOMAIN為一個普通點的服務器地址,然后還要利用m4生成sendmail.cf文件,# m4 sendmail.mc > sendmail.cf。重啟sendmail服務。
Bugzilla配置過程至此完畢。
在瀏覽器中輸入http://localhost/bugzilla
即可訪問Bugzilla頁面了,可以使用通過perl腳本checksetup.pl創建的管理員帳號和密碼登錄進去。
現在嘗試在獨立的Linux上安裝Bugzilla,安裝進度明顯比以前快很多。等到安裝完畢后,將進行大規模測試,一切ok后將最終安裝到server上。
相關閱讀:
- Bugzilla與JIRA的對比 (seanhe, 2007-9-06)
- 利用bugzilla提交Bug寫作指南 (seanhe, 2007-10-29)
- 定制 bugzilla 進行項目管理 (seanhe, 2007-11-06)
- 在 Linux 上使用 Bugzilla 跟蹤 bug (seanhe, 2007-11-06)
- bugzilla安裝備忘 (seanhe, 2007-11-09)
- bugzilla 安裝手冊(新手入門) (seanhe, 2007-11-26)
- Bugzilla使用指南(新手入門) (seanhe, 2007-11-26)
- BUGZILLA在windows下的安裝方法(轉) (necho, 2007-12-10)
- BUGZILLA在windows下的安裝方法(轉) (necho, 2007-12-10)
導入論壇 引用鏈接 收藏 分享給好友 推薦到圈子 管理 舉報