Installing Talend Log Server as a service - 6.3

Talend Big Data Installation Guide for Linux

EnrichVersion
6.3
EnrichProdName
Talend Big Data
task
Installation and Upgrade
EnrichPlatform
Talend Activity Monitoring Console
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend Data Preparation
Talend Data Stewardship
Talend Installer
Talend JobServer
Talend Log Server
Talend Project Audit
Talend Runtime
Talend Studio

To install Talend Log Server as a service, proceed as follows:

Installing Log Server as a service on RedHat/CentOS 7 Systems

All the following commands have to be executed with super-user privileges.

  1. Create the service file with the following command:

    touch /etc/systemd/system/Talend-LogServer.service

  2. Assign the relevant rights to the file you created:

    chmod 664 /etc/systemd/system/Talend-LogServer.service

  3. Paste the following content in the file while adapting it to your configuration:

    [Unit]
    Description=Talend Log Server Service
    After=network.target
    
    [Service]
    WorkingDirectory=<LogServerPath>
    ExecStart=/bin/bash start_logserver.sh
    ExecStop=/bin/bash stop_logserver.sh
    Type=simple
    
    [Install]
    WantedBy=default.target
  4. Reload the service daemon:

    systemctl daemon-reload

  5. Start the service:

    systemctl start Talend-LogServer.service

Installing Log Server as a service on RedHat/CentOS 6 and Ubuntu Systems

  1. Create a script from which Talend Log Server can be run in the directory /etc/init.d/tlogserver, like the following:

    #!/bin/sh
    #
    # tlogserver: this script starts and stops the monolithic jar
    #
    # chkconfig: - 85 15
    # description: logstash is an open source log management system.
    # processname: tlogstash
    # config: %%%LOGSERV_CONFIG%%%
    # binary: %%%LOGSERV_JAR%%%
    prog=tlogserver
    PATH=%%%INSTALLDIR%%%/logserv:/sbin:/bin:/usr/sbin:/usr/bin
    NAME=tlogserver
     
    test -x $DAEMON || exit 0
     
    set -e
     
    start() {
            echo -n $"Starting $prog: "
            %%%INSTALLDIR%%%/logserv/start_logserver.sh
    }
     
    stop() {
            echo -n $"Stopping $prog: "
            %%%INSTALLDIR%%%/logserv/stop_logserver.sh
    }
     
     
    case "$1" in
      start)
            start
            ;;
      stop)
            stop
            ;;
      restart)
            stop
            start
            ;;
          *)
                N=/etc/init.d/$NAME
                echo "Usage: $N {start|stop|restart}" >&2
                exit 1
                ;;
        esac
     
        exit 0
    
    

  2. Ensure that the file above is executable. To do this, you can execute the commands below in the /etc/init.d/tlogserver directory:

    # chmod +x /etc/init.d/tlogserver

  3. Execute the following command to activate the startup script:

    # update-rc.d tlogserver defaults 60