将 Talend JobServer 安装为 RedHat/CentOS 6 上的服务 - 7.1

Talend Data Integration 安装指南 (Linux)

EnrichVersion
7.1
EnrichProdName
Talend Data Integration
task
数据治理
EnrichPlatform
Talend Activity Monitoring Console
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend Data Preparation
Talend Data Stewardship
Talend Identity and Access Management
Talend Installer
Talend JobServer
Talend Log Server
Talend Runtime
Talend Studio

过程

  1. 创建以下脚本并将其复制到 /etc/init.d/jobserver 文件:
    # chkconfig: 345 91 10
    # description: Starts and stops the jobserver daemon.
    #
    
    # Source function library.
    . /etc/rc.d/init.d/functions
    
    # Get config.
    . /etc/sysconfig/network
    
    # Check that networking is up.
    [ "${NETWORKING}" = "no" ] && exit 0
    
    user=cxp
    jobserver=/u/bin/Talend/jobserver_3.0.1
    startup=start_rs.sh
    shutdown=stop_rs.sh
    
    
    start(){
     echo -n $"Starting jobserver service: "
     su - $user -c "cd $jobserver && sh $startup &" 
     RETVAL=$?
     echo
    }
    
    stop(){
     echo -n $ "Stopping jobserver service: "
     su - $user -c  "cd $jobserver && sh $shutdown"
     RETVAL=$?
     echo
    }
    
    restart() {
     stop
     start
    }
    
    # See how we were called.
    case "$1" in
    start)
     start
     ;;
    stop)
     stop
     ;;
    restart)
     restart
     ;;
    *)
     echo $"Usage: $0 {start|stop|restart}"
     exit 1
    esac
    
    exit 0
  2. 编辑脚本中的 userjobserver 变量值 (分别使用专用于运行 Talend JobServer 的用户和 Talend JobServer 路径)。
  3. 要确保该脚本可执行,请键入:
    # chmod 0755 /etc/init.d/jobserver
  4. 键入以下命令以将该服务添加到您的系统:
    chkconfig --list
    chkconfig --add jobserver