Quote:
Originally Posted by mydogspot
I'm trying to write a puppet module that will install and start splunk on a new rhel7 server - I'm still really new to rhel7. Our older splunk servers had /etc/init.d/splunk to start splunk but the rhel7 server wants to use systemd. So it looks like I need to figure out how to start splunk as a service. Can anyone point me to documentation on how to do this? This is the error message -
Error: Could not start Service[splunk]: Execution of '/bin/systemctl start splunk' returned 6: Failed to issue method call: Unit splunk.service failed to load: No such file or directory.
In puppet I just told it to ensure that splunk was running. I could force it to use init.d but I would rather do it the right way.
|
If you want to have it start as a particular user you can also run:
$SPLUNKHOME/bin/splunk enable boot-start -user <user_name to start under>.
Example: if you would want to start Splunk as user splunk_ninja:
/opt/splunk/bin/splunk enable boot-start -user splunk_ninja
Also when starting for the first time after an install you can do:
/opt/splunk/bin/splunk start --accept-license so the license screen doesn't interrupt the startup.