如何安裝一個優秀的BUG管理平台

來源:互聯網
上載者:User

標籤:

前言

就BUG管理而言,國內的禪道做得很不錯,而且持續有更新。我們來看看如何從頭到尾安裝禪道,各位要注意的是,不是文章深或者淺,而是文章如何在遇到問題的時候,從什麼途徑和用什麼方法解決問題的。現在發覺,很多剛出來的程式猿啊,缺少的就是解決問題的思路!

首先,登入禪道的官網,找到:http://www.zentao.net/dynamic/79905.html。 我這裡下載的是“禪道專案管理軟體源碼”

觀察了下源碼,是php開發的,當然配置apache+php比較好。以前也用過一些bug軟體如BugTracker.NET,部署在IIS下,非常的不穩定,IIS老是掛掉,而且人數也有一些限制,所以如果對IIS等windows下的環境不是非常瞭解,還是搞lamp最省事,又穩定。

下載Apache

接著是下載apache,登入apache官網,在左邊找到"Download!"連結,下載其中的2.4穩定版。 點擊下載按鈕,跳轉到下面的連結中 因為是windows Server2008,因此果斷選擇二進位版本(Binarries) 進入下載連結之後,只見一堆的雞腸,果斷瞄準其中的win32連結 進來後看了半天,還是沒有實際的地址,仔細把雞腸讀了一下,發現apache官網不提供編譯好的二進位版本下載,只能從其他網站下載……真他媽的糾結,不提供,你說什麼mirror? 隨便選了個進行下載。

直接點擊下載按鈕,彈出Chrome下載,因為是外國資源,因此下載速度較慢,果斷的切換為迅雷下載,因為有其他相應的資源提供,迅雷下載達到2M/s,這個時候迅雷果然發揮了其作用。

安裝Apache

把壓縮包進行解壓,得到如下檔案: 怎麼安裝為服務呢?這個時候需要一點命令列的知識

httpd.exe /? 查看協助命令httpd.exe -k install -n "servicename" 安裝服務httpd.exe -k uninstall -n "Apache24 卸載

當然,這麼簡單的步驟,是難不倒我們程式猿的 我們可以開啟服務管理員看看我們的成果:

配置Apache

我們嘗試啟動apache服務看看,結果發現,啟動不了 這種情況,把事件管理器開啟,看看什麼問題是最快的,但是,憑著經驗,我認為應該是連接埠佔用的問題,因為我的電腦開啟了IIS,佔用了80連接埠。我們看看其配置 看到了吧,尼瑪,以前apache不是預設8080的嗎,怎麼現在想和iis等web伺服器競爭了?

再次開啟,還是不行,只能查看事件記錄了。 原來是沒有改ServerRoot,把ServerRoot指向當前Apache的物理地址,注意其中使用反斜線。

Define SRVROOT "D:/software/httpd-2.4.16-x64/Apache24"ServerRoot "D:/software/httpd-2.4.16-x64/Apache24"

同時需要把DocumentRoot也改一下

DocumentRoot "D:/software/httpd-2.4.16-x64/Apache24/htdocs"<Directory "D:/software/httpd-2.4.16-x64/Apache24/htdocs">

這時再次啟動,發現還有問題 顯示是443連接埠被佔用,無法啟動,那麼我們看看哪個程式被佔用,在命令列下執行命令:netstat -ano 原來我們的SVNServer也用了443連接埠(https)。我們查看配置(httpd.conf),查詢ssl,找到下面的配置:

<IfModule ssl_module>#Include conf/extra/httpd-ssl.confInclude conf/extra/httpd-ahssl.confSSLRandomSeed startup builtinSSLRandomSeed connect builtin</IfModule>

設定檔conf/extra/httpd-ssl.conf和conf/extra/httpd-ahssl.conf中都需要更改

根據上述的配置,我們找到ssl的設定檔(httpd-ssl.conf),我們把連接埠更改為9443:

## When we also provide SSL we have to listen to the # standard HTTP port (see above) and to the HTTPS port## Note: Configurations that use IPv6 but not IPv4-mapped addresses need two# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"#Listen 9443

再次啟動,還是有問題,我們發現Extra下還有個檔案:httpd-ahssl.conf,把啟動監聽部分修改掉:

Listen 9443 https

ApacheMonitor.exe:

這次果然成功啟動,看見綠色就是精神爽啊! 開啟預設的網頁,可以看到apache的介紹了:

設定Apache的預設頁

因為我們需要訪問的是index.php這個預設的首頁,因此需要在設定檔中增加對應的配置(httpd.conf):

<IfModule dir_module>    DirectoryIndex index.php index.html</IfModule>
下載PHP

首先到官網的下載頁面看看,點擊其中的Windows Download 這兩個版本什麼區別,我也不是很清楚,還是先搞個安全執行緒的吧,聽起來也安全點,畢竟線程不安全的,都是要自己調配甚至要寫程式控制的。還是果斷轉迅雷下載,秒下!

下載後解壓到任意一個檔案夾。

配置Apache對php的支援

開啟httpd.conf,在檔案的最後增加下述內容:

LoadModule php5_module "D:/software/php-5.6.12-Win32-VC11-x64/php5apache2_4.dll"AddType application/x-httpd-php .phpPHPIniDir "D:/software/php-5.6.12-Win32-VC11-x64/"

重啟Apache,發現啟動不了,繼續查看問題:

php5apache2_4.dll這個檔案要存在,如果存在仍報錯,則檢查VC庫的版本是否正確

httpd: Syntax error on line 533 of F:/web/apache/Apache24/conf/httpd.conf: Cannot load D:/software/php-5.6.12-Win32-VC11-x64/php5apache2_4.dll into server: \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3
Which version do I choose? IISIf you are using PHP with IIS you should use the Non-Thread Safe (NTS) versions of PHP. ApachePlease use the Apache builds provided by Apache Lounge. They also provide VC11 builds of Apache for x86 and x64. 
We use their binaries to build the Apache SAPIs. If you are using PHP with Apache 1 or Apache2 from apache.org (not recommended) 
you need to use the older VC6 versions of PHP compiled with the legacy Visual Studio 6 compiler. 
Do NOT use VC9+ versions of PHP with the apache.org binaries. VC9 and VC11More recent versions of PHP are built with VC9 or VC11 (Visual Studio 2008 and 2012 compiler respectively) 
and include improvements in performance and stability. The VC9 builds require you to have the Visual C++ Redistributable for Visual Studio 2008 SP1 x86 or x64 installed.

查看系統的Visual Studio Distribute版本是2008,對應VC9,但我使用的是Visual Studio 2012編譯的PHP版本(VC11),動態串連於Apache中的dll,可能就會出現問題。重新下載了VC9版本的PHP,Apache Httpd Server啟動成功
http://my.oschina.net/idearye/blog/192265

仔細查看了配置,發現並沒有錯,上網一查,說要下載個vc11的庫,然後一看php的檔案,果然是檔案名稱都帶有vc11的字樣。找到官網:Visual C++ Redistributable for Visual Studio 2012 Update 4,選擇中文下載: 下載下來之後安裝: 再次啟動Apache,這個時候成功了。

測試php是否安裝成功

在apache下的httpdoc目錄中新增一個info.php的檔案,內容為:<?php phpinfo(); ?>。在瀏覽器中訪問,出行下述介面,即安裝成功!

配置php對mysql的支援

把php.ini-production複製一份,改名為php.ini 在php.ini中去掉以下注釋:

extension=php_mysql.dllextension=php_mysqli.dll
安裝禪道

解壓下載的禪道到指定目錄,然後我們在apahce中增加一個虛擬目錄,根據網上給的方法進行配置:

##zentaoAlias /test "D:/zentaopms/www"<Directory "D:/zentaopms/www">Options Indexes MultiViewsAllowOverride Noneorder allow,denyAllow from all</Directory>

發現不行,原來apache2.4之後文法有了一點改變:

刪除了 Order deny,allow 和 Order allow,deny 把 Deny from all 替換成了 Require all denied 把Allow from all 替換成了 Require all granted 然後還把 Allow from 192.168.10.21 這樣的語句給替換成了 Require host 192.168.10.21

httpd.conf最終改為:

<IfModule alias_module>##zentaoAlias /test "D:/zentaopms/www"<Directory "D:/zentaopms/www">Options Indexes MultiViewsRequire all deniedRequire all granted</Directory>    #    # Redirect: Allows you to tell clients about documents that used to     # exist in your server‘s namespace, but do not anymore. The client     # will make a new request for the document at its new location.    # Example:    # Redirect permanent /foo http://www.example.com/bar    #    # Alias: Maps web paths into filesystem paths and is used to    # access content that does not live under the DocumentRoot.    # Example:    # Alias /webpath /full/filesystem/path    #    # If you include a trailing / on /webpath then the server will    # require it to be present in the URL.  You will also likely    # need to provide a <Directory> section to allow access to    # the filesystem path.    #    # ScriptAlias: This controls which directories contain server scripts.     # ScriptAliases are essentially the same as Aliases, except that    # documents in the target directory are treated as applications and    # run by the server when requested rather than as documents sent to the    # client.  The same rules about trailing "/" apply to ScriptAlias    # directives as to Alias.    #    ScriptAlias /cgi-bin/ "${SRVROOT}/cgi-bin/"</IfModule>

http://www.cnblogs.com/yaksea/archive/2011/08/26/2155205.html

通過install.php安裝

在瀏覽器中開啟:http://localhost:8080/test/install.php,點擊安裝,檢測環境,發現有點配置沒有配置好:

設定Session儲存目錄 修改php.ini,設定Session的儲存路徑: session.save_path = "D:/PHP_SESSION",然後手動在D盤下建立這個檔案夾,並且賦予可寫的許可權。

開啟pdo_mysql擴充
在php.ini裡面找到;extension=php_pdo_mysql.dll 把;去掉

因為對應的擴充是在ext這個擴充目錄下,因此要在php.ini中指示擴充目錄,找到下述語句去掉注釋並設定為擴充的物理地址即可即可: extension_dir = "D:/software/php-5.6.12-Win32-VC11-x64/ext"

繼續安裝,提供mysql的地址、使用者名稱、密碼即可。我們也可以後續修改這個產生的設定檔:

安裝之後出行空白介面的處理

完成後跳轉到index.php頁面,而且還是空白的頁面,且慢,官網的文檔不是說現在會出行一個配置介面的嗎?這個介面哪去了?

這個時候切勿緊張,出現這個錯誤是因為發生了錯誤,而禪道屏蔽了錯誤,所以我們看到的是空白介面。我們開啟config\my.php,修改其中的調試欄位為true:$config->debug = true

重新開啟我們發現下述這麼一段話:

21:10 ERROR: 您訪問的網域名稱 localhost:8080 沒有對應的公司。 in module\common\model.php on line 58, last called by module\common\control.php on line 25 through function setCompany. in framework\router.class.php on line 1568 when visiting

網上說是沒有設定session.save_path,我確認設定了,那麼刪除掉my.php,然後重新安裝以便,終於上述“設定帳號”的介面出來了。

關於如何修改禪道的登入的logo等以及如何安裝mysql

http://www.cnblogs.com/marvin/p/testmgr.html

 

如何安裝一個優秀的BUG管理平台(轉)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.