您的位置:首页 > 其它

如何安装一个优秀的BUG管理平台(转)

2015-08-30 23:33 423 查看
前言

就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.conf
Include conf/extra/httpd-ahssl.conf
SSLRandomSeed startup builtin
SSLRandomSeed 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 .php
PHPIniDir "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: Canno
t 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?

IIS
If you are using PHP with IIS you should use the Non-Thread Safe (NTS) versions of PHP.

Apache
Please 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 VC11
More 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.dll
extension=php_mysqli.dll

安装禅道

解压下载的禅道到指定目录,然后我们在apahce中增加一个虚拟目录,根据网上给的方法进行配置:

##zentao
Alias /test "D:/zentaopms/www"
<Directory "D:/zentaopms/www">
Options Indexes MultiViews
AllowOverride None
order allow,deny
Allow 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>
##zentao
Alias /test "D:/zentaopms/www"
<Directory "D:/zentaopms/www">
Options Indexes MultiViews
Require all denied
Require 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: