<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Install Splunk Enterprise on EC2 (Linux) Automation from user data shell in Installation</title>
    <link>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412711#M5559</link>
    <description>&lt;P&gt;I am looking to fix my batch script :&lt;BR /&gt;download splunk package,create a new user, install,setup password for splunk,t&lt;BR /&gt;accept license&lt;/P&gt;
&lt;P&gt;however it is failing at accept license and splunk edit line&lt;/P&gt;
&lt;P&gt;code is below&lt;BR /&gt;&amp;lt;&amp;lt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;#!/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 &lt;A href="https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&amp;amp;platform=linux&amp;amp;version=6.4.2&amp;amp;product=splunk&amp;amp;filename=splunk-7.2.6-c0bf0f679ce9-Linux-x86_64.tgz&amp;amp;wget=true&amp;quot;" target="test_blank"&gt;https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&amp;amp;platform=linux&amp;amp;version=6.4.2&amp;amp;product=splunk&amp;amp;filename=splunk-7.2.6-c0bf0f679ce9-Linux-x86_64.tgz&amp;amp;wget=true"&lt;/A&gt;;
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"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;lt;&amp;lt;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jun 2020 16:36:34 GMT</pubDate>
    <dc:creator>splunk75044</dc:creator>
    <dc:date>2020-06-12T16:36:34Z</dc:date>
    <item>
      <title>Install Splunk Enterprise on EC2 (Linux) Automation from user data shell</title>
      <link>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412711#M5559</link>
      <description>&lt;P&gt;I am looking to fix my batch script :&lt;BR /&gt;download splunk package,create a new user, install,setup password for splunk,t&lt;BR /&gt;accept license&lt;/P&gt;
&lt;P&gt;however it is failing at accept license and splunk edit line&lt;/P&gt;
&lt;P&gt;code is below&lt;BR /&gt;&amp;lt;&amp;lt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;#!/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 &lt;A href="https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&amp;amp;platform=linux&amp;amp;version=6.4.2&amp;amp;product=splunk&amp;amp;filename=splunk-7.2.6-c0bf0f679ce9-Linux-x86_64.tgz&amp;amp;wget=true&amp;quot;" target="test_blank"&gt;https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&amp;amp;platform=linux&amp;amp;version=6.4.2&amp;amp;product=splunk&amp;amp;filename=splunk-7.2.6-c0bf0f679ce9-Linux-x86_64.tgz&amp;amp;wget=true"&lt;/A&gt;;
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"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;lt;&amp;lt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 16:36:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412711#M5559</guid>
      <dc:creator>splunk75044</dc:creator>
      <dc:date>2020-06-12T16:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Install Splunk Enterprise on EC2 (Linux) Automation from user data shell</title>
      <link>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412712#M5560</link>
      <description>&lt;P&gt;What error message do you get?&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 03:17:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412712#M5560</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-04-21T03:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Install Splunk Enterprise on EC2 (Linux) Automation from user data shell</title>
      <link>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412713#M5561</link>
      <description>&lt;P&gt;You can get more detail by running it as &lt;CODE&gt;bash -x YourScriptNameHere.sh&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 14:37:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412713#M5561</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-21T14:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Install Splunk Enterprise on EC2 (Linux) Automation from user data shell</title>
      <link>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412714#M5562</link>
      <description>&lt;P&gt;I did not have an issue running your script with a few modifications.&lt;BR /&gt;
You are downloading 6.4.2 and your install file is labeled 7.2.6. This may be your issue if that is in fact that exact script your running. However, I do not think you would make it past the tar command if that were the case.&lt;/P&gt;

&lt;P&gt;There was no l accepting license issue that I ran into. &lt;BR /&gt;
I tested this on 6.4.2 and 7.2.6 without issue.&lt;/P&gt;

&lt;P&gt;My testing was two aws amazon linux boxes that I setup root ssh keys with since your running &lt;CODE&gt;sudo ssh&lt;/CODE&gt; at the bottom.&lt;BR /&gt;
I created the student account as well and file permissions looked fine.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 17:52:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412714#M5562</guid>
      <dc:creator>som3guy</dc:creator>
      <dc:date>2019-04-21T17:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Install Splunk Enterprise on EC2 (Linux) Automation from user data shell</title>
      <link>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412715#M5563</link>
      <description>&lt;P&gt;Hello Som,&lt;/P&gt;

&lt;P&gt;I pasted the wrong line for the download. Yes, I was able to download and install Splunk Ent. &lt;BR /&gt;
Did the edit password for you?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 00:19:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412715#M5563</guid>
      <dc:creator>splunk75044</dc:creator>
      <dc:date>2019-04-22T00:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Install Splunk Enterprise on EC2 (Linux) Automation from user data shell</title>
      <link>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412716#M5564</link>
      <description>&lt;P&gt;The password in the 6.4.2 version did work&lt;BR /&gt;
I did notice that the password did not update for 7.2.6 however&lt;/P&gt;

&lt;P&gt;I know splunk changed from admin:changeme to your admin password will be created when splunk is installed. I forget which version, but is that way in 7.x.&lt;/P&gt;

&lt;P&gt;So I am thinking if you had written this script for 6.x it will not work the same in 7.x&lt;/P&gt;

&lt;P&gt;Here is the documentation for 7.2.6 which is not using the ./splunk edit user command any longer:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/Security/Secureyouradminaccount"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/Security/Secureyouradminaccount&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;And you can see in Splunk 6.4.2 it still was:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.2/Security/Secureyouradminaccount"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.2/Security/Secureyouradminaccount&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I would work towards adopting the new method if you are planning on using 7.x going forward.&lt;/P&gt;

&lt;P&gt;It is getting a little late for me to spin up my AWS again, but if you are still stuck by tomorrow I could probably do that and run the commands in the 7.2.6 version to see exactly how to update it.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 01:52:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412716#M5564</guid>
      <dc:creator>som3guy</dc:creator>
      <dc:date>2019-04-22T01:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Install Splunk Enterprise on EC2 (Linux) Automation from user data shell</title>
      <link>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412717#M5565</link>
      <description>&lt;P&gt;Thanks and appreciate all your help&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 02:04:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Install-Splunk-Enterprise-on-EC2-Linux-Automation-from-user-data/m-p/412717#M5565</guid>
      <dc:creator>splunk75044</dc:creator>
      <dc:date>2019-04-22T02:04:07Z</dc:date>
    </item>
  </channel>
</rss>

