将Talend Runtime容器安装为服务

将Talend Runtime容器安装为服务

Talend Runtime容器基于Apache Karaf。Karaf Wrapper(用于服务包装)可以将Talend Runtime容器安装为系统服务。

要将Talend Runtime容器安装为服务,首先必须安装包装器,该包装器是一个可选功能,所以要手动安装该服务。

Wrapper可以正确处理Windows下的“用户注销”,服务依赖性以及运行与桌面交互的服务的能力。

安装包装器

至Talend Runtime容器目录的bin文件夹下,然后启动:

  • 在Windows环境下
    使用管理员模式运行trun.bat文件

  • 在Linux环境下
    sudo sh trun

要安装包装功能,只需输入:

  • Windows karaf@trun> feature:install wrapper
  • Linux trun@root> feature:install wrapper

注意
在Windows中,尝试安装服务时可能会收到以下消息:

wrapper  | OpenSCManager failed - Access is denied. (0x5)

在这种情况下,以管理员模式启动命令提示符。在 开始菜单中右键单击命令提示符并选择以管理员身份运行。

注册为服务

Windows:

karaf@trun> wrapper:install -s AUTO_START -n TALEND-ESB-CONTAINER  -d Talend-ESB-Container -D "Talend ESB Container Service"

成功看到以下信息

karaf@trun> wrapper:install -s AUTO_START -n TALEND-ESB-CONTAINER 
-d Talend-ESB-Container  -D "Talend ESB Container Service"

Creating file: C:\work\6.5.1-release\Talend-ESB-V6.5.1\container\bin\
TALEND-ESB-CONTAINER-wrapper.exe
Creating file: C:\work\6.5.1-release\Talend-ESB-V6.5.1\container\etc\
TALEND-ESB-CONTAINER-wrapper.conf
Creating file: C:\work\6.5.1-release\Talend-ESB-V6.5.1\container\bin\
TALEND-ESB-CONTAINER-service.bat
Creating file: C:\work\6.5.1-release\Talend-ESB-V6.5.1\container\lib\
wrapper.dll
Creating file: C:\work\6.5.1-release\Talend-ESB-V6.5.1\container\lib\
karaf-wrapper.jar
Creating file: C:\work\6.5.1-release\Talend-ESB-V6.5.1\container\lib\
karaf-wrapper-main.jar

Setup complete.  You may wish to tweak the JVM properties in the 
wrapper configuration file:
        C:\work\6.5.1-release\Talend-ESB-V6.5.1\container\etc\TALEND-
ESB-CONTAINER-wrapper.conf
before installing and starting the service.

To install the service, run:
  C:> C:\work\6.5.1-release\Talend-ESB-V6.5.1\container\bin\
TALEND-ESB-CONTAINER-service.bat install

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

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

Once stopped, to remove the installed the service run:
  C:> C:\work\6.5.1-release\Talend-ESB-V6.5.1\container\bin\
TALEND-ESB-CONTAINER-service.bat remove

以管理员模式打开CMD新窗口。

切换至Talend Runtime安装目录的 bin文件夹,然后输入以下命令:

TALEND-ESB-CONTAINER-service install

可以看到

C:\Builds\Talend-Runtime\bin>TALEND-ESB-CONTAINER-service.bat install

wrapper | Talend ESB Container installed.

Talend Runtime服务已创建,可以通过在Windows的开始菜单中选择控制面板>管理工具>服务来查看。

然后,您可以运行网络启动“TALEND-CONTAINER”和停止“TALEND-ESB-CONTAINER”命令来管理服务。

要删除服务,请在命令窗口中输入以下命令:

TALEND-ESB-CONTAINER-service.bat remove

Linux:

trun@root> wrapper:install -s AUTO_START -n TALEND-ESB-CONTAINER  -d Talend-ESB-Container -D "Talend ESB Container Service"

成功看到以下信息

trun@root> wrapper:install -s AUTO_START -n TALEND-ESB-CONTAINER  \
        -d Talend-ESB-Container -D "Talend ESB Container Service"
Creating file: /home/onofreje/6.5.1-release/Talend-ESB-V6.5.1/container/
bin/KARAF-wrapper
Creating file: /home/onofreje/6.5.1-release/Talend-ESB-V6.5.1/container/
bin/KARAF-service
Creating file: /home/onofreje/6.5.1-release/Talend-ESB-V6.5.1/container/
etc/KARAF-wrapper.conf
Creating file: /home/onofreje/6.5.1-release/Talend-ESB-V6.5.1/container/
lib/libwrapper.so
Creating file: /home/onofreje/6.5.1-release/Talend-ESB-V6.5.1/container/
lib/karaf-wrapper.jar
Creating file: /home/onofreje/6.5.1-release/Talend-ESB-V6.5.1/container/
lib/karaf-wrapper-main.jar

Setup complete.  You may want to tweak the JVM properties in the wrapper 
configuration file:
        /home/onofreje/apache-karaf-2.1.3/etc/KARAF-wrapper.conf
before installing and starting the service.
  • 在Redhat / Fedora / CentOS系统
ln -s /home/onofreje/6.5.1-release/Talend-ESB-V6.5.1/container/bin/TALEND-ESB-CONTAINER-service  /etc/init.d/
chkconfig TALEND-ESB-CONTAINER-service --add

在服务器重启时启动服务:

chkconfig TALEND-ESB-CONTAINER-service on

禁用重启时启动服务:

chkconfig TALEND-ESB-CONTAINER-service off

启动服务:

service TALEND-ESB-CONTAINER-service start

停止服务:

service TALEND-ESB-CONTAINER-service stop

卸载服务:

chkconfig TALEND-ESB-CONTAINER-service --del
rm /etc/init.d/TALEND-ESB-CONTAINER-service
  • Ubuntu / Debian系统
ln -s /home/onofreje/6.5.1-release/Talend-ESB-V6.5.1/container/bin/TALEND-ESB-CONTAINER-service /etc/init.d/

在服务器重启时启动服务:

update-rc.d TALEND-ESB-CONTAINER-service defaults

禁用重启时启动服务:

update-rc.d -f TALEND-ESB-CONTAINER-service remove

启动服务:

/etc/init.d/TALEND-ESB-CONTAINER-service start

停止服务:

/etc/init.d/TALEND-ESB-CONTAINER-service stop

卸载服务:

rm /etc/init.d/TALEND-ESB-CONTAINER-service

配置提示
如果需要将参数追加到java调用(如内存配置),那么可以在KARAF-wrapper文件中添加这些参数,wrapper.java.additional.n=PARAMETER其中“n”是附加配置的编号(通常您只需查找最后一个条目并使用n + 1),PARAMETER是你想追加的JVM参数,比如-XX:MaxPermSize=1024m。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值