Skip to main content Skip to complementary content

Installing Talend JobServer as a service on RedHat/CentOS 6

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

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!