Installing Talend JobServer as a service on RedHat/CentOS 6 - 7.0

Talend Data Management Platform Installation Guide for Linux

Version
7.0
Language
English (United States)
Product
Talend Data Management Platform
Module
Talend Activity Monitoring Console
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend Data Preparation
Talend Data Stewardship
Talend DQ Portal
Talend Identity and Access Management
Talend Installer
Talend JobServer
Talend Log Server
Talend Repository Manager
Talend Runtime
Talend SAP RFC Server
Talend Studio
Content
Installation and Upgrade

Procedure

  1. Create/Copy the following script to the /etc/init.d/jobserver file:
    # 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. Edit the user and jobserver variable values in the script (with the dedicated user to run Talend JobServer, and the Talend JobServer path respectively).
  3. To make sure that the script is executable, type:
    # chmod 0755 /etc/init.d/jobserver
  4. Type in the following commands to add the service to your system:
    chkconfig --list
    chkconfig --add jobserver