跳到主要内容 跳到补充内容

在基于 systemd 的 系统上将 Talend Runtime 安装为服务

关于此任务

Talend Runtime Container 基于 Apache Karaf。借助 Karaf Service Wrapper,可以将 Talend Runtime Container 安装为服务。

安装包装器

安装 Apache Karaf Service Wrapper 以生成 Talend Runtime 服务文件。

Procedure

  1. 浏览到 Talend Runtime 安装目录的 bin 文目录,然后通过以 root 用户身份执行 trun 文件来启动该容器。
  2. 要安装包装器功能,请键入:
    karaf@trun> feature:install wrapper
    一经安装,包装器功能就会在 trun 中提供 wrapper:install 新命令,此命令允许您将 Talend Runtime 安装为服务。
  3. 要安装该服务,请键入以下命令:
    karaf@trun> wrapper:install
    或者,要将该容器注册为自动启动模式的服务,只需键入:
    karaf@trun> wrapper:install -s AUTO_START -n TALEND-CONTAINER -d Talend-Container -D "Talend Container Service"
    其中 TALEND-CONTAINER 是服务名称,Talend-Container 是服务的显示名称,"Talend Container Service (Talend 容器服务)" 是服务的描述。
    下面是在 Linux 上执行的 wrapper:install 命令的示例:
    karaf@trun()> feature:install wrapper
    karaf@trun()> wrapper:install -s AUTO_START -n TALEND-CONTAINER \
    -d Talend-Container -D "Talend Container Service"
    Creating file: <TalendRuntimePath>/bin/TALEND-CONTAINER-wrapper
    Creating file: <TalendRuntimePath>/bin/TALEND-CONTAINER-service
    Creating file: <TalendRuntimePath>/bin/TALEND-CONTAINER.service
    Creating file: <TalendRuntimePath>/etc/TALEND-CONTAINER-wrapper.conf
    Creating file: <TalendRuntimePath>/lib/libwrapper.so
    Creating file: <TalendRuntimePath>/lib/karaf-wrapper.jar
    Creating file: <TalendRuntimePath>/lib/karaf-wrapper-main.jar
    Setup complete. You may want to tweak the JVM properties in the wrapper
    configuration file:
    <TalendRuntimePath>/etc/TALEND-CONTAINER-wrapper.conf
    before installing and starting the service.

Results

Talend Runtime 服务文件已生成。您可以安装 Talend Runtime 服务了。

安装 Talend Runtime 服务

Before you begin

在下述步骤中:
  • TALEND-CONTAINER 为在 wrapper:install 命令中 -n <Service Name> 选项使用的名称。
  • <TalendRuntimePath>Talend Runtime 安装目录。

以下所有命令都需要使用超级用户权限来执行。

Procedure

  1. 安装服务并在系统启动时启用服务:
    systemctl enable <TalendRuntimePath>/bin/TALEND-CONTAINER.service
  2. 启动该服务:
    systemctl start TALEND-CONTAINER

Results

服务已安装并启动。
您可以使用下述命令管理该服务。
  • 停止服务: systemctl stop TALEND-CONTAINER
  • 检查当前服务状态: systemctl status TALEND-CONTAINER
  • 查看服务活动日志: journalctl -u TALEND-CONTAINER
  • 卸载服务并在系统启动时关闭服务: systemctl disable TALEND-CONTAINER

本页面有帮助吗?

如果您发现此页面或其内容有任何问题 – 打字错误、遗漏步骤或技术错误 – 请告诉我们如何改进!