![](https://blogs.gwu.edu/john-kuk/files/2022/11/image-9.png)
Install and Setup Splunk Enterprise Server and Splunk Universal Forwarder on an AWS EC2 instance.
Index
- Create EC2 Instance
- Splunk Enterprise Server
- Splunk Universal Forwarder
Create EC2 Instance
- Launch creation of an EC2 instance - Launch Instance
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled.png)
- Set Name as splunk and leave the rest of the defaults
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-1.png)
- Set Key pair as one you created or Create a new key pair (RSA and .pem format) and Launch Instance button to create the EC2 instance
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-2.png)
- Navigate to the new instance and grab the public IPv4 address
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-3.png)
- SSH into the instance
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-4.png)
- Perform an update
sudo yum update
Splunk Enterprise
- Go to https://splunk.com, login and navigate to My Dashboard
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-5.png)
- Scroll down to the Free trials and downloads section, will need Splunk Enterprise
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-6.png)
- Navigate to Linux and click the Download button for .rpm
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-7-1024x263.png)
- Cancel the download prompt and get the wget command to download Splunk
![](https://blogs.gwu.edu/john-kuk/files/2022/11/image-13.jpg)
- Execute the wget in the terminal to download the install file, and then install the splunk .rpm file.
wget -O splunk-9.0.2-17e00c557dc1-linux-2.6-x86_64.rpm "https://download.splunk.com/products/splunk/releases/9.0.2/linux/splunk-9.0.2-17e00c557dc1-linux-2.6-x86_64.rpm"
sudo yum install ./splunk-9.0.2-17e00c557dc1-linux-2.6-x86_64.rpm
- start the splunk server
sudo bash
cd /opt/splunk/bin
./splunk start --accept-license --answer-yes
- Enter administrator username and password, remember this because you will need this to log into the application
![](https://blogs.gwu.edu/john-kuk/files/2022/11/image-10.png)
- In AWS navigate to the EC2 instance Security groups
![](https://blogs.gwu.edu/john-kuk/files/2022/11/image-11.jpg)
- Edit inbound rules
![](https://blogs.gwu.edu/john-kuk/files/2022/11/image-11-1024x173.png)
- Add rule to open port 8000 and Save rules
![](https://blogs.gwu.edu/john-kuk/files/2022/11/image-12-1024x187.png)
- Open a browser and navigate to http:://3.137.207.15:8000 and log into splunk
![](https://blogs.gwu.edu/john-kuk/files/2022/11/image-13.jpg)
- Under messages will see this message, will need to fix this for Splunk to work
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-9.png)
- Navigate to Settings > Server settings and then General settings
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-10.png)
- Under Index settings set Pause indexing if free disk space from 5000 to 50 and Save
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-11.png)
Splunk Universal Forwarder
- Navigate back to find Splunk Universal Forwarder
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-12.png)
- Select Linux, then in the 64-bit section click the Download button for .rpm
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-13-1024x510.png)
- Cancel the download popup window and then copy the wget command
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-14.png)
- Open the terminal, exit from the root user and go back to the home directory
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-15.png)
- Execute the wget and after install the forwarder
wget -O splunkforwarder-9.0.2-17e00c557dc1-linux-2.6-x86_64.rpm "https://download.splunk.com/products/universalforwarder/releases/9.0.2/linux/splunkforwarder-9.0.2-17e00c557dc1-linux-2.6-x86_64.rpm"
sudo yum install ./splunkforwarder-9.0.2-17e00c557dc1-linux-2.6-x86_64.rpm
- Change to the splunkforwarder bin directory and start the forwarder
sudo bash
cd /opt/splunkforwarder/bin
./splunk start --accept-license --answer-yes
- Enter username and password
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-16.png)
- Set the port for the forwarder to 9089, this is to keep splunk server from conflicting with the splunk forwarder
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-17.png)
- Set the forwarder to forward to the splunk server on port 9997, and will need to enter username and password
./splunk add forward-server 3.137.207.15:9997
- Set the forwarder to monitor the /var/log directory and restart
./splunk add monitor /var/log
./splunk restart
- Set the port for the splunk server to listen and restart
cd /opt/splunk/bin
./splunk enable listen 9997
./splunk restart
- In AWS navigate to Security groups and again Edit Inbound rules
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-18-1024x182.png)
- Add port 9997 and Save rules
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-19-1024x197.png)
- Log into splunk again
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-20.png)
- Go to the splunk home
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-21.png)
- Go to Search & Reporting
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-22.png)
- Select the Data Summary button
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-23.png)
- Under the Hosts tab there should be the server and forwarder and select the first ip location link
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-24.png)
- There should be logs from the /var/log location in the list
![](https://blogs.gwu.edu/john-kuk/files/2022/11/Untitled-25-1024x646.png)