has anyone written a bash script to install splunkforwarder on a linux server? or is it impossible due to having to enter admin and password and also having to use different users while installing ?
This is applicable for version 7.2.2 later.
you should run below commands with sudo user
useradd splunk
tar splunkbinary.gz -C /opt
chown -R splunk:splunk /opt/splunkforwarder
/opt/splunkforwarderk/bin/splunk enable boot-start -systemd-managed 0 -user splunk --no-prompt --accept-license
sudo -u splunk /opt/splunkforwarderk/bin/splunk start
Hi
there is example on Splunk’s docs https://docs.splunk.com/Documentation/Forwarder/8.0.5/Forwarder/Installanixuniversalforwarderremotel...
I think that you could found several ansible playbooks for doing this which could be more manageable? Personally I prefer ansible over shell scrips for this kind of stuff.
r. Ismo