日本語 : JenkinsをWindowsサービスとしてインストールする

WindowsのサービスとしてJenkinsをインストールする

まず、インストールする前にJenkinsを起動する必要があります。JNLP"java -jar jenkins.war" で起動します。
一度起動すると、"Windowsのサービスとしてインストール"というリンクがシステム管理画面に表示されます。

このリンクをクリックすると、インストール画面が表示されます。

Jenkinsをインストールするディレクトリを選択してください。選択したディレクトリが JENKINS_HOME になり、データやプログラムをそこに保存します。
インストールに成功すると、Jenkinsの再起動を確認する画面を表示します。

これは、新規にインストールしたWindowsのサービスとしてJenkinsを再起動するためです。実行をクリックすると、再起動が完了するまで待つように指示されます。

もし何らかの原因で再起動に失敗したら、インストールしたディレクトに保存されているJenkinsの出力を確認します。

At this point you can use the service manager to confirm that Jenkins is running as a service.

Install Slave as a Windows service

Jenkins also allows you to install a slave agent as a Windows service. (See Distributed builds for more about how to do distribute builds in general.)

First, you configure your slave to run as a JNLP slave agent. This should create a JNLP launch icon in the corresponding page, as shown below:

From the slave machine, launch a slave agent. You should see a window like this:

Choose "File" > "Install as Windows Service" from the menu:

Confirm your intention to install as a service. The installation will place the program files to the directory designated as the slave root directory (from the "configure executors" screen.)

Once the installation succeeds, you'll be asked if you'd like to stop the current slave agent and immediately start a slave agent.

When you click "OK", the slave agent window will terminate. The new slave agent runs as a service without showing a window, so head over to the service manager from the control panel and confirm that the slave agent is indeed running as a service:

Changing the configuration of services

The JVM launch parameters of these Windows services are controlled by an XML file jenkins.xml and jenkins-slave.xml respectively. These files can be found in $JENKINS_HOME and in the slave root directory, respectively.

The file format should be self-explanatory. Tweak the arguments for example to give JVM a bigger memory.

Stdout and stderr from the service processes go to log files in the same directory.

Attachments:

Comments:

This book provides an exceptionally lucid treatment of classical electrodynamics~http://www.jordansforsale.cc

Posted by at Jan 10, 2011 23:41