# ラッパーをインストール

利用対象...

* Cloud API Services Platform
* Cloud Data Fabric

Talend Runtimeのサービスファイルを生成するため、Apache Karaf Service Wrapperをインストールします。

## 手順

1. Talend Runtimeインストールディレクトリーのcontainer\binフォルダーを参照し、管理者モードでtrun.batファイルを実行してコンテナーを起動します。
2. ラッパー機能をインストールする場合は、次のコマンドを実行します。

   karaf@trun&gt; feature:install wrapper

   インストール後は、ラッパー機能によって、trunファイルにwrapper:installという新しいコマンドが加わります。このコマンドを使えば、 Talend Runtimeをサービスとしてインストールできるようになります。
3. サービスをアンインストールする場合は、次のコマンドを実行します。

   karaf@trun&gt; wrapper:install

   また、自動開始モードでコンテナーをサービスとして登録する場合は、次のコマンドを実行します。

   karaf@trun&gt; wrapper:install -s AUTO\_START -n TALEND-CONTAINER -d Talend-Container -D "Talend Container Service"

   TALEND-CONTAINERはサービスの名前、Talend-Containerはそのサービスの表示名、"Talend Container Service"はそのサービスの説明です。

   以下は、Windowsで実行されるwrapper:installコマンドの例です:
   ```
   karaf@trun> wrapper:install -s AUTO_START -n TALEND-CONTAINER -d Talend-ContainerT -n 
   TALEND-CONTAINER -d Talend-Container -D "Talend Container Service"
   Creating file: C:\Builds\Talend-Runtime\bin\TALEND-CONTAINER-wrapper.exe
   Creating file: C:\Builds\Talend-Runtime\etc\TALEND-CONTAINER-wrapper.conf
   Creating file: C:\Builds\Talend-Runtime\bin\TALEND-CONTAINER-wrapper.bat
   Creating file: C:\Builds\Talend-Runtime\lib\wrapper.dll
   Creating file: C:\Builds\Talend-Runtime\lib\karaf-wrapper.jar
   Creating file: C:\Builds\Talend-Runtime\lib\karaf-wrapper-main.jar

   Setup complete. You may wish to tweak the JVM properties in the wrapper configuration file: 
   C:\Builds\Talend-Runtime\etc\TALEND-CONTAINER-wrapper.conf
   before installing and starting the service.

   To install the service, run:
   C:> C:\Builds\Talend-Runtime\bin\TALEND-CONTAINER-service.bat install

   Once installed, to start the service run:
   C:> net start "TALEND-CONTAINER"

   Once running, to stop the service run:
   C:> net stop "TALEND-CONTAINER"

   Once stopped, to remove the installed service run:
   C:> C:\Builds\Talend-Runtime\bin\TALEND-CONTAINER-service.bat remove
   ```

## タスクの結果

Talend Runtimeのサービスファイルが生成されます。これで、 Talend Runtimeサービスをインストールできます。