Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Install Splunk Enterprise on EC2 (Linux) Automation from user data shell

$
0
0
I am looking to fix my batch script : download splunk package,create a new user, install,setup password for splunk,t accept license however it is failing at accept license and splunk edit line code is below << #!/bin/sh #This version uses splunker as user # enterpriselist should contain the list of the two indexers #Example: # student@10.0.0.1 student@10.0.0.2 HOSTS_FILE="/opt/splunk/bin/scripts/enterpriselist" WGET_CMD="wget -O splunk-6.4.2-00f5bb3fa822-Linux-x86_64.tgz https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=6.4.2&product=splunk&filename=splunk-7.2.6-c0bf0f679ce9-Linux-x86_64.tgz&wget=true" INSTALL_FILE="splunk-7.2.6-c0bf0f679ce9-Linux-x86_64.tgz" PASSWORD="Student1" SPLUNK_USER="student" REMOTE_SCRIPT=" cd /opt sudo $WGET_CMD sudo tar -xvzf $INSTALL_FILE sudo chown -R $SPLUNK_USER:$SPLUNK_USER /opt/splunk sudo -u $SPLUNK_USER /opt/splunk/bin/splunk start --accept-license --answer-yes --auto-ports --no-prompt sudo -u $SPLUNK_USER /opt/splunk/bin/splunk edit user admin -password $PASSWORD -auth admin:changeme sudo -u $SPLUNK_USER /opt/splunk/bin/splunk restart sudo /opt/splunk/bin/splunk enable boot-start -user $SPLUNK_USER " echo "In 5 seconds, will run the following script on each remote host:" echo echo "====================" echo "$REMOTE_SCRIPT" echo "====================" echo sleep 5 echo "Reading host logins from $HOSTS_FILE" echo echo "Starting." for DST in `cat "$HOSTS_FILE"`; do if [ -z "$DST" ]; then continue; fi echo "---------------------------" echo "Installing to $DST" sudo ssh -t "$DST" "$REMOTE_SCRIPT" done echo "---------------------------" echo "Done"<<

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>