- Learning Continuous Integration with TeamCity
- Manoj Mahalingam S
- 763字
- 2021-09-03 09:41:41
Installing on Windows
Installing TeamCity on Windows is straightforward when using the setup package. The package includes both the server and the agent and provides the option to install either of them or both. The installation package can be downloaded from http://www.jetbrains.com/teamcity/download/.
Note
TeamCity is a Java-based product and hence requires Java Runtime Environment (JRE). The TeamCity installation package for Windows comes bundled with JRE 1.7 and the Tomcat 7 servlet container. This is recommended and is the easiest way to install TeamCity's server and agent on Windows.
Installing the server and the default agent
The steps involved in installing TeamCity using the installation package are as follows:
- Double-click on the downloaded
setup exe
file. It should bring up the installation wizard like any other setup file on Windows. Accept the license and proceed to the next step. - The next step in the wizard is to choose the installation directory. This is where the TeamCity server (and agent) will be installed. The default directory is
C:\TeamCity
. We will be calling this<TeamCity Home directory>
. - Since the package includes both the server and the agent, the next step asks you to choose the components to be installed. You can choose to install the server, the agent, and also choose whether Windows services need to be set up for each of these components. It is recommended that you set up the server and the agent as services.
- Next, you will have to choose
<TeamCity Data directory>
. This is the path where TeamCity will store its configuration, build history, users, and other data. The default for this is%ALLUSERSPROFILE%\JetBrains\TeamCity
.Note
Since
<TeamCity Data directory>
stores all of the data, including the artifacts, it is ideal to have this on a big enough drive, but not on the system drive. You can learn more about the data directory at http://confluence.jetbrains.com/display/TCD8/TeamCity+Data+Directory.This step also sets the
TEAMCITY_DATA_PATH
environment variable to the path that you set in the wizard. - Continuing on, the installation copies the files and sets up TeamCity. The next bit of configuration that needs to be set is the port for the server. The default is
80
.Tip
Port
80
may be used by other applications, including IIS, so it is not ideal to use this port, unless you definitely want to do so. - If you choose to install the agent, next comes the Configure Build Agent Properties screen. The following screenshot shows this screen for a typical installation:
As seen in the previous screenshot, this screen allows you to view and edit various agent configurations. This includes the name of the agent, the port through which it communicates with the server, and the working directory of the agent. The defaults should be ideal for most setups. You may want to ensure that the firewall doesn't block the agent port (default
9090
). These properties are saved at<Installation Directory>\buildagent\conf\buildAgent.properties
. - If the server and the agent are being installed as Windows services, the next steps will ask you to choose between a local system account and a specific user account for them. It is recommended that you use a specific user with enough but limited rights for the services. The wizard also provides you with the option to start the services then and there. The user under whom the server service is running should have the following rights:
- Write permission to
<TeamCity Data directory>
- Write permission to
<TeamCity Home directory>
- Right to log in as a service
- Write permission to
- The TeamCity web interface should open up with the TeamCity First Start page.
- The first time installation asks you to agree to the license from the web interface, and you can opt to send usage statistics to the developers. You are also asked to set up the initial administrator account after which the TeamCity server should be ready for use.
Tip
The steps are accurate for TeamCity 8.0.4. The exact steps may change in future versions, but the general process is expected to be the same.
Installing additional agents
Additional agents can be easily installed from the Agents page:
http://<serverUrl>:<serverPort>/agents.html
The Install Build Agents link at the top-right corner of this page can be used to download the agent installer (MS Windows Installer) directly from the server. The following screenshot shows the pop up that is presented once you click on this link:

Installing an additional agent is very similar to installing the default agent using the combined installer, as described in the previous section.
Agents need to be approved from the Agents page. Agents on the same machine as the server are approved automatically, whereas any other agent must be manually approved for it to be added to the list of available agents.
- Apache ZooKeeper Essentials
- Mastering Zabbix(Second Edition)
- Mastering JavaScript Object-Oriented Programming
- GeoServer Cookbook
- Learning Apex Programming
- 零基礎學C++程序設計
- 微服務與事件驅動架構
- Java應用開發技術實例教程
- HTML5從入門到精通 (第2版)
- Corona SDK Mobile Game Development:Beginner's Guide(Second Edition)
- SQL Server 入門很輕松(微課超值版)
- Fastdata Processing with Spark
- Continuous Delivery and DevOps:A Quickstart Guide Second Edition
- UML基礎與Rose建模實用教程(第三版)
- Android嵌入式系統程序開發(基于Cortex-A8)