# Install Splunk on AWS EC2 Instance

Let's install Splunk on AWS EC2 Instance.&#x20;

1. First visit the Splunk link:&#x20;

{% embed url="<https://www.splunk.com/>" %}

* Register for free trial. (Usually I use temp mails for such kinda account, even you can also use that)&#x20;

2. Verify and login now.
3. Let's download

{% embed url="<https://www.splunk.com/en_us/download/splunk-enterprise/thank-you-enterprise.html>" %}

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2F7mgE2DZG9DebGndSvquX%2Fimage.png?alt=media&#x26;token=3c3fdc15-c818-4cbd-9f37-de267d2792cd" alt=""><figcaption></figcaption></figure>

Download via [Command Line (wget)](https://www.splunk.com/en_us/download/splunk-enterprise/thank-you-enterprise.html)

```bash
wget -O splunk-9.3.2-d8bb32809498-linux-2.6-amd64.deb "https://download.splunk.com/products/splunk/releases/9.3.2/linux/splunk-9.3.2-d8bb32809498-linux-2.6-amd64.deb"
```

Launch the instance for Splunk

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2F2yovXnFEXCGaod1QE0U9%2Fimage.png?alt=media&#x26;token=2bedb1af-bced-4ea1-a179-ac95ce0b60e3" alt=""><figcaption></figcaption></figure>

Connect now with pem files for the instance

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FHGtpo1D3HqpSCoev4FlE%2Fimage.png?alt=media&#x26;token=9bedcb71-4470-4e40-87ad-c4b684c0989b" alt=""><figcaption></figcaption></figure>

Use the given commands

```bash
sudo apt update -y
wget -O splunk-9.3.2-d8bb32809498-linux-2.6-amd64.deb "https://download.splunk.com/products/splunk/releases/9.3.2/linux/splunk-9.3.2-d8bb32809498-linux-2.6-amd64.deb"

```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FN9aLCDLZdvwXeOpONLoN%2Fimage.png?alt=media&#x26;token=9fadc454-12c7-4d13-a1f7-97dd2603dd03" alt=""><figcaption></figcaption></figure>

```bash
sudo dpkg -i splunk-9.3.2-d8bb32809498-linux-2.6-amd64.deb
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FXiR26t8qhuRFglSgD6XD%2Fimage.png?alt=media&#x26;token=a3b332b8-651a-4519-944c-e13720a5ef38" alt=""><figcaption></figcaption></figure>

First, switch to the Splunk directory:

```bash
cd /opt/splunk
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2Fdy2kisOi9A7jxpKrDf3f%2Fimage.png?alt=media&#x26;token=ea191892-65e8-497c-948a-242e86096f12" alt=""><figcaption></figcaption></figure>

Then, start Splunk:

```bash
sudo ./bin/splunk start

```

Then just press enter till the  \_

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2F7IcD7K8wuO3LsXwA6vT0%2Fimage.png?alt=media&#x26;token=40c2dc2d-a975-4b4d-b1f0-0fd86ced8a18" alt=""><figcaption></figcaption></figure>

Give desire credentials

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FEvMtXC4rxqExtwpTcSXQ%2Fimage.png?alt=media&#x26;token=130f82c5-ca3b-4ffb-9eec-1d22b7653c38" alt=""><figcaption></figcaption></figure>

The Splunk web interface is at <http://ip-172-31-21-144:8000>

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FDuTfHZHJPEgbwS55JGUf%2Fimage.png?alt=media&#x26;token=65469936-25f1-468b-aa12-204d0c5e6bdc" alt=""><figcaption></figcaption></figure>

Lets access the Splunk Web Interface.&#x20;

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FusVqMUImOzUZ4rWGS8PL%2Fimage.png?alt=media&#x26;token=6678f69f-f829-4b71-a00b-83c5ac61f876" alt=""><figcaption></figcaption></figure>

Now signin with your credentials.

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FnFFxMh3181HAuFoSNtDR%2Fimage.png?alt=media&#x26;token=1a56651a-55cf-475b-a4fa-03383f7e2aaf" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FMiEL5XyAl2xDgxQep9Wa%2Fimage.png?alt=media&#x26;token=226ff147-db90-477d-984d-b55920bd41eb" alt=""><figcaption></figcaption></figure>

<pre class="language-bash"><code class="lang-bash"># Some Useful Commands
cd /opt/splunk #directory
<strong>sudo ./bin/splunk start #start splunk
</strong>sudo ./bin/splunk stop #stop splunk
sudo ./bin/splunk restart #restart splunk
sudo ./bin/splunk status #status splunk
</code></pre>
