Installing JobServer as a service on RedHat/CentOS 7 Systems
All the following commands have to be executed with super-user privileges.
Create the service file with the following command:
touch /etc/systemd/system/Talend-JobServer.service
Assign the relevant rights to the file you created:
chmod 664 /etc/systemd/system/Talend-JobServer.service
Paste the following content in the file while adapting it to your configuration:
[Unit] Description=Talend JobServer Service After=network.target [Service] WorkingDirectory=<JobServerPath> ExecStart=/bin/bash start_rs.sh ExecStop=/bin/bash stop_rs.sh Type=simple [Install] WantedBy=default.target
Reload the service daemon:
systemctl daemon-reload
Start the service:
systemctl start Talend-JobServer.service
Installing JobServer as a service on RedHat/CentOS 6
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
Edit the user and jobserver variable values in the script (with the dedicated user to run Talend, and the JobServer path respectively).
To make sure that the script is executable, type:
# chmod 0755 /etc/init.d/jobserver
Type in:
chkconfig --list
chkconfig --add jobserver
Now, you can test this self-defined service.
Installing JobServer as a service on Ubuntu
Create/Copy the following script to the /etc/init.d/jobserver file as explained in Installing JobServer as a service on RedHat/CentOS 6.
Edit the user and jobserver variable values in the script (with the dedicated user to run Talend, and the JobServer path respectively).
To make sure that the script is executable, type:
# chmod 0755 /etc/init.d/jobserver
Execute the following command:
# update-rc.d jobserver defaults 60
Install JobServer as a service on OpenSuse
The following procedure needs to be performed with root privileges.
Note
This procedure was tested on OpenSuse 11.2 x64 bits.
Make sure that the three scripts jobserver_start, jobserver_stop and jobserver are executable.
Copy usr/bin/jobserver_start and usr/bin/jobserver_stop into:
/usr/bin/
Copy etc/ini.d/jobserver in:
/etc/init.d/
Edit the configuration file etc/sysconfig/jobserver and set the path to your installation directory.
Copy this file into:
/etc/sysconfig/
Execute the following command to create a link called rcjobserver:
ln -s /etc/init.d/jobserver /usr/sbin/rcjobserver
To start or stop the JobServer manually, use:
rcjobserver start
rcjobserver stop
Install the service using:
Yast > System > System Services
Type in:
chkconfig -e jobserver
Set the variable to ON
Run SuSEconfig.
Note
The JobServer installation path can be edited through Yast > /etc/sysconfig Editor in Applications/Talend.