如何在同一服务器上运行TeamCity的多个实例? [英] How can I run multiple instances of TeamCity on the same server?

查看:209
本文介绍了如何在同一服务器上运行TeamCity的多个实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上,尝试在同一服务器上运行TeamCity的多个(当前为两个)实例.我选择不安装Windows服务,而是通过 runAll.bat start 命令运行服务器.运行安装程序时,我为每个端口选择了不同的端口,名称和路径.第一个服务器成功启动,但是第二个服务器没有启动-我看到了tomcat窗口,但是过了一会儿它消失了,尽管构建代理窗口仍然存在.这是一些输出:

I am on Windows and trying to run multiple (currently two) instances of TeamCity on the same server. I chose not to install the Windows services and instead run the server via runAll.bat start command. When I ran the installer I chose different ports, names and paths for each one. The first server starts successfully, but the second one does not - I see the tomcat window showing up, but it's gone after a while, though the build agent window stays. Here's some output:

c:\Tools\TeamCity\bin>runAll.bat start
starting TeamCity server and agent...
Using CATALINA_BASE:   "c:\Tools\TeamCity\bin\.."
Using CATALINA_HOME:   "c:\Tools\TeamCity\bin\.."
Using CATALINA_TMPDIR: "c:\Tools\TeamCity\bin\..\temp"
Using JRE_HOME:        "c:\Tools\TeamCity\bin\..\jre"
Using CLASSPATH:       "c:\Tools\TeamCity\bin\..\bin\bootstrap.jar"
Starting TeamCity Build Agent Launcher...
Agent home directory is C:\Tools\TeamCity\buildAgent
Current JRE version is 1.6

c:\Tools\TeamCity\bin>cd c:\Tools\TeamCity2\bin

c:\Tools\TeamCity2\bin>runAll.bat start
starting TeamCity server and agent...
Using CATALINA_BASE:   "c:\Tools\TeamCity2\bin\.."
Using CATALINA_HOME:   "c:\Tools\TeamCity2\bin\.."
Using CATALINA_TMPDIR: "c:\Tools\TeamCity2\bin\..\temp"
Using JRE_HOME:        "c:\Tools\TeamCity2\bin\..\jre"
Using CLASSPATH:       "c:\Tools\TeamCity2\bin\..\bin\bootstrap.jar"
Starting TeamCity Build Agent Launcher...
Agent home directory is C:\Tools\TeamCity2\buildAgent
Current JRE version is 1.6

推荐答案

您需要为第二个Tomcat/TeamCity实例编辑conf\server.xml,以便它使用不同的端口或绑定到不同的网络接口,更改以下端口应为足够:

You need to edit conf\server.xml for the second Tomcat/TeamCity instance so that it uses different ports or binds to different network interfaces, changing the following ports should be enough:

  • Server port="8005"
  • Connector port="8080"
  • Server port="8005"
  • Connector port="8080"

两个服务器不能共享同一数据库,因此必须通过

Two servers cannot share the same database, so you must configure them to use different locations via TEAMCITY_DATA_PATH environment variable.

如果您还想在同一台计算机上运行多个代理,请请在这里参考我的答案.

If you also want to run multiple agents on the same machine, refer to my answer here.

这篇关于如何在同一服务器上运行TeamCity的多个实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆