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

Talend Real-Time Big Data Platform Installation Guide for Linux

EnrichVersion
6.5
EnrichProdName
Talend Real-Time Big Data Platform
task
Installation and Upgrade
EnrichPlatform
Talend Activity Monitoring Console
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend Data Preparation
Talend Data Stewardship
Talend DQ Portal
Talend ESB
Talend Identity and Access Management
Talend Installer
Talend JobServer
Talend Log Server
Talend Repository Manager
Talend Runtime
Talend SAP RFC Server
Talend Studio

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