Documentation for JIRA 4.2. Documentation for other versions of JIRA is available too.

For long-term use, JIRA should be configured to automatically restart when the operating system restarts. For Windows servers, this means configuring JIRA to run as a Windows service.

(info) If you are running JIRA Standalone on Linux and want to start it automatically, please refer to Starting JIRA Standalone automatically on Linux instead.

Running JIRA as a Windows service has other advantages. When started manually a console window opens, and there is a risk of someone accidentally shutting down JIRA by closing this. Also, the JIRA logs are properly managed by the Windows service (found in logs\stdout*.log in your JIRA Home Directory, and rotated daily).

JIRA をサービスとしてインストールするには、インストーラー経由および手動の二通りの方法があります。

On this page:

Installing JIRA as a Service

インストーラーを使用して、サービスとしてインストール

The easiest way to get JIRA installed as a Windows service is by clicking the 'Install JIRA as Service' checkbox when running the Windows installer:

このインストレーションプロセスを成功させるには、お使いの Windows オペレーティングシステムにおける完全な管理者権限が必要となります。

Installing as a Service manually

If you didn't use the Windows installer, or for some other reason have JIRA Standalone and now want it to run as a service, follow these instructions. They apply only to JIRA running in the Apache Tomcat application server (e.g. the JIRA "Standalone" distribution).

If you are running 64-bit Windows, please note that Apache Tomcat cannot run as a Windows service if you are using a 64 bit JDK (see JRA-12965). Please ensure that you are using a 32 bit JDK (if you used the Windows Installer, a 32 bit JDK has already been installed for you).

On Windows Vista or any other operating system with User Account Control (UAC), you must either disable UAC or right-click on cmd.exe and select "Run as administrator" in order to run the following script. If UAC is enabled, being logged on with an Administrator account is not sufficient.

  1. Open a DOS prompt,
  2. 'cd' to the JIRA Standalone directory, and then the *bin* subdirectory
  3. If a directory in the path has spaces (e.g. 'C:\Program Files\..'), please convert it to its eight-character equivalent (e.g. c:\Progra~1\..).
  4. Ensure the JAVA_HOME variable is set to the JDKbase directory, with echo %JAVA_HOME%.
  5. 次のコマンドを実行します。
    service.bat install JIRA
    Here is a screenshot of the process:

    JIRA should now be installed as a service.
  6. In addition, to have the JIRA service start automatically when the server starts, run:
    tomcat6 //US//JIRA --Startup auto
    The JIRA service will automatically start up the next time the server reboots. The JIRA service can be manually started with the command 'net start JIRA' and stopped with 'net stop JIRA'.

    To see what parameters the JIRA service is starting with, Go to Start -> Run, and run "regedt32.exe". There should be an entry at HKEY_LOCAL_MACHINE -> SOFTWARE -> Apache Software Foundation -> Procrun 2.0 -> JIRA.

  7. Additional JIRA Standalone setup options (optional):
    • JIRA が利用可能な最大メモリを増やすには(デフォルトの時点で既に 256MB)、次を実行します:
      tomcat6 //US//service_name --JvmMx 512
      service_name が、お使いの JIRA サービスの名前、即ち JIRA123487934298。
    • To add JVM parameter, for example pass a parameter to enable JIRA's Jelly support, run:
      tomcat6 //US//service_name ++JvmOptions="-Djira.jelly.on=true"
      service_name が、お使いの JIRA サービスの名前、即ち JIRA123487934298。
    • 同じ JVM 内で JIRA と Confluence を実行中の場合、MaxPermSize サイズを 128 MB まで増加します:
      tomcat6 //US//service_name ++JvmOptions="-XX:MaxPermSize=128m"
      service_name が、お使いの JIRA サービスの名前、即ち JIRA123487934298。
    • 時折、JIRA のガーベジコレクション情報を閲覧すると便利かもしれません。これは、メモリの問題を捜査する際に、特に当てはまります。Verbose GC (ガーベジコレクション) ロギングをオンにするには、コマンドプロンプトで以下のコマンドを実行します:
      tomcat6 //US//service_name ++JvmOptions="-Xloggc:path\to\logs\atlassian-gc.log"
      where service_name is the name of your JIRA service, e.g. JIRA123487934298.
      The path (denoted by \path\to) refers to the directory in which JIRA is currently installed. For example:
      tomcat6 //US//service_name ++JvmOptions="-Xloggc:c:\jira\logs\atlassian-gc.log"
      service_name が、お使いの JIRA サービスの名前、即ち JIRA123487934298。

See the Tomcat documentation for further service options.

JIRA サービスを削除する

JIRA が Windows インストーラーを通じてインストールされた場合、Windows の'コントロールパネル' から、'プログラムの追加または削除' をクリックして、JIRA を削除します。これによって、サービスも削除されます。

手動でサービスをインストールした場合(上記参照)、以下の手順でアンインストール可能です:

service.bat remove JIRA

上記が動作しない場合、tomcat6 //DS//JIRA を使用します。

JIRA サービスが利用する Windows ユーザを変更する

If you are using mapped network drives for JIRA's backup directory, attachments directory, index directoy or the %CATALINA_HOME%* directory, you need to ensure that JIRA can write to these drives. That is, these directories all need to be writeable by the user which the JIRA service is running as. This may mean that you need to change the Windows user that the JIRA server uses.

Also note that you must also specify these network drives by UNC and not letter mappings, e.g. \\backupserver\jira not z:\jira

To change the Windows user that the JIRA service uses, navigate to the service in Windows, i.e. 'Control Panel' -> 'Administrative Tools' -> 'Services'. Locate the 'Atlassian JIRA' service, right-click and view the 'Preferences'.

'ログオン' タブに行き、希望のユーザに変更します。

複数サービスのスタートアップ順序を指定する

相互依存的なサービスを有する場合は、それらを正しい順序で起動する事が重要です。以下は、一般的な例です:以下は、一般的な例です:

  • If you are running both JIRA and Crowd, it is important to start Crowd first, so that Crowd is running before people try to login to JIRA.
  • JIRA が接続するデータベースが JIRA と同一のサーバー上でホストされており、Windows サービスを介して起動される場合、データベースサービスが先に起動されない限り、JIRA サービスは正しく起動しません。

To set up start up dependency rules, open a command prompt and enter the following command:
C:\Documents and Settings\Developer>sc config [JIRA service] depend=[database service]
Please note the space character after 'depend='.

  • [JIRA service] は、あなたが実行中の JIRA の名前です。例 JIRA051007111904。
  • [database service]は、あなたが実行中のデータベースサービスの名前です。例 MSSQLSERVER。

If you wish, you can also set up dependency rules by editing the system registry. Please see http://support.microsoft.com/kb/193888 for details on how to do this.

サービスの名前を見つける

お使いの JIRA サービスあるいはデータベースサービスの正確な名前が分からない場合、以下の手順に従う事でそれらを見つけられます:

  1. Navigate to 'Control Panel' -> 'Administrative Tools' -> 'Services'.
  2. 'サービス' ウィンドウが開きます:
  3. Right-click on the service you wish to find out the name of, and select 'Properties' from the popup menu:
  4. '一般' タブに 'サービス名' が現れます:

トラブルシューティング

  • Problems may occur when trying to setup JIRA Standalone to run as a Windows service with JDK 1.6. The problem is due to failure to locate "MSVCR71.DLL", which can be found in %JAVA_HOME%/bin. There are two options to resolve this problem:
    • PATH に %JAVA_HOME/bin を追加し、JIRA サーバーを再起動します。
    • MSVCR71.DLL を、C:\WINDOWS\SYSTEM32 または C:\WINNT\SYSTEM32 のシステムパスにコピーします
  • サービスを実行しているユーザー名を確認し、インストール ディレクトリの /temp および /work ディレクトリを変更して、このユーザーに読み取りおよび書き込み許可を与えます。
  • 32bit JDK メモリ制限および 64bit JDK/Tomcat サービス問題があるため、1.5 GB 以上のメモリ割り当てを必要とする場合は、JIRA を 64bit オペレーティングシステム上でサービスとして実行できません