logstashelastic-stackrhelrhel6

/etc/init.d/logstash file not created for RHEL 6.8


I downloaded logstash-6.4.0.rpm and Installed with

yum install logstash-6.4.0.rpm

for RHEL 6.8 but etc/init.d/logstash

After installation, I got a message

Successfully created system startup script for Logstash

But the file is not created, it is autogenerated for SysV See here

I tried generating manually by editing /etc/logstash/startup.options added like this

JAVACMD=/opt/java/jdk1.8.0_111/bin/java
JAVA_HOME=/opt/java/jdk1.8.0_111

and then went to /user/share/logstash/bin and ran sudo ./system-install Saw Here

After executing sudo ./system-install again got same message

Successfully created system startup script for Logstash

But still, the file is not created. Any idea, how I can achieve this?


Solution

  • I was able to generate the logstash service I was missing some options in the command.

    step 1: check where your logstash is with command whereis logstash > for me :

    [root@user ~]# whereis logstash
    logstash: /etc/logstash /usr/share/logstash
    

    step 2: edit /etc/logstash/startup.options file and correct path for JAVACMD and JAVA_HOME

    JAVACMD=/opt/java/jdk1.8.0_111/bin/java
    JAVA_HOME=/opt/java/jdk1.8.0_111
    

    step 3: Go to /usr/share/logstash/bin and run system-install with sudo

    sudo ./system-install /etc/logstashstartup.options sysv
    

    Result

    [root@user bin]# sudo ./system-install /etc/logstash/startup.options sysv
    Using provided startup.options file: /etc/logstash/startup.options
    Manually creating startup for specified platform: sysv
    Successfully created system startup script for Logstash