0

How can I make Solr start automatically on reboot in Red Hat Linux?

How to make Solr start automatically is a question that has been asked and received a variety of answers at How to start Solr automatically?

However, I'm finding none of the 8 different approaches suggested work on Red Hat. Does someone on Red Hat have an approach that works?

To start solr manually, I change into the solr install directory and run... bin/solr start

I'm using RHEL 7.

arnoldbird
  • 886
  • 1
  • 13
  • 30
  • 1
    The Service Installation Script should work on RHEL, but I'm not sure about the supported versions: https://lucene.apache.org/solr/guide/8_4/taking-solr-to-production.html#service-installation-script – MatsLindh Mar 09 '20 at 22:43
  • @MatsLindh I've had no trouble installing Solr. I just can't figure out how to get it to restart automatically when the machine reboots. – arnoldbird Mar 11 '20 at 13:48
  • @MatsLindh -- Thanks! After installing Solr as a service, like you suggested, I'm now able to get it to restart automatically on reboot. I just needed to add the chkconfig comments to /etc/init.d/solr as described at https://stackoverflow.com/a/3561621/861826 -- change 'myscript' to solr -- and I needed to do 'chkconfig --add solr'. I did not need any of the scripts mentioned in the StackOverflow question/answers I've linked to. – arnoldbird Mar 11 '20 at 17:43

0 Answers0