This page shows how to download, install and start Splunk Enterprise on Linux from the .tgz, .rpm or .deb package, and how to run it as a systemd service under a non-root user. Below the original command list you will find a corrected step-by-step procedure, first-login and firewall setup, a quick universal forwarder connection, and fixes for common installation problems.
Download File URL - https://download.splunk.com/products/splunk/releases/9.0.1/linux/splunk-9.0.1-82c987350fde-Linux-x86_64.tgz
Splunk Linux Tar file - wget -O splunk-9.0.1-82c987350fde-Linux-x86_64.tgz "https://download.splunk.com/products/splunk/releases/9.0.1/linux/splunk-9.0.1-82c987350fde-Linux-x86_64.tgz"
Splunk Linux rpm file - wget -O splunk-9.0.1-82c987350fde-linux-2.6-x86_64.rpm "https://download.splunk.com/products/splunk/releases/9.0.1/linux/splunk-9.0.1-82c987350fde-linux-2.6-x86_64.rpm"
Splunk Linux Debian file - wget -O splunk-9.0.1-82c987350fde-linux-2.6-amd64.deb "https://download.splunk.com/products/splunk/releases/9.0.1/linux/splunk-9.0.1-82c987350fde-linux-2.6-amd64.deb"
Splunk Linux Windows file - wget -O splunk-9.0.1-82c987350fde-x64-release.msi "https://download.splunk.com/products/splunk/releases/9.0.1/windows/splunk-9.0.1-82c987350fde-x64-release.msi"
Splunk Universal Forwarder
MSI file
$ wget -O splunkforwarder-9.0.1-82c987350fde-x64-release.msi "https://download.splunk.com/products/universalforwarder/releases/9.0.1/windows/splunkforwarder-9.0.1-82c987350fde-x64-release.msi"
Linux tar file
$ wget -O splunkforwarder-9.0.1-82c987350fde-Linux-x86_64.tgz "https://download.splunk.com/products/universalforwarder/releases/9.0.1/linux/splunkforwarder-9.0.1-82c987350fde-Linux-x86_64.tgz"
Code language: JavaScript (javascript)
cd /opt/
wget XXXXX
tar xvzf splunk_package_name.tgz
tar xvzf splunk_package_name.tgz -C /opt
chmod 744 splunk_package_name.rpm
rpm -i splunk_package_name.rpm
./splunk start --accept-license
./splunk enable boot-start
---
cd <Splunk Enterprise installation directory>/bin
./splunk start
cd /opt/splunk
dpkg -i splunk_package_name.deb
dpkg --status splunk
dpkg --list
./splunk start --accept-license
./splunk enable boot-start Code language: HTML, XML (xml)
What you are installing
The download links above cover two products. Splunk Enterprise is the full server: it indexes data, runs searches and serves the web interface. The Universal Forwarder is a lightweight agent that runs on your source machines and ships logs to Splunk Enterprise. Install Enterprise first, then add forwarders.
| Item | Splunk Enterprise | Universal Forwarder |
|---|---|---|
| Default install path (Linux) | /opt/splunk | /opt/splunkforwarder |
| Web interface | Port 8000 (HTTP by default) | None |
| Management/REST port | 8089 | 8089 |
| Receives forwarded data | Port 9997, once you enable it | Sends to 9997 |
| Package formats | tgz, rpm, deb, msi | tgz, rpm, deb, msi |
Note: Version 9.0.1 in the example above is an old release. Sign in to splunk.com with a free account, open the Splunk Enterprise download page, and copy the current wget link it gives you. Package file names have changed between releases, so the commands below use <version> and <build> placeholders.
Prerequisites
- A 64-bit Linux host that the current Splunk release supports, with sudo access.
- Enough free disk space on the partition holding
/opt/splunk. By default, Splunk stops indexing when free space falls below 5000 MB (minFreeSpaceinserver.conf). - Inbound TCP 8000 (web UI) open to your workstation. Open 9997 too if forwarders will send data.
- A dedicated non-root
splunkuser. Running Splunk as root works, but it is a security risk and Splunk advises against it. - Raised file and process limits (Splunk recommends at least 64000 open files and 16000 user processes). Transparent huge pages should be disabled.
# Create the service account if it does not exist
id splunk || sudo useradd -r -m -s /bin/bash splunk
# Check and disable transparent huge pages (lasts until the next reboot)
cat /sys/kernel/mm/transparent_hugepage/enabled
echo never | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
echo never | sudo tee /sys/kernel/mm/transparent_hugepage/defragCode language: PHP (php)
Note: The THP change above does not survive a reboot. To make it permanent, use a kernel boot parameter (transparent_hugepage=never) or a small systemd unit that runs before Splunkd.
Install from the tgz archive (any distribution)
- Download the archive to a temporary directory, not into
/opt. - Extract it into
/opt. This creates/opt/splunk. - Give ownership to the
splunkuser. - Start Splunk as that user and accept the license. On first start, Splunk asks you to create the admin username and password.
cd /tmp
wget -O splunk-<version>-<build>-linux.tgz "<link copied from splunk.com>"
sudo tar -xzf splunk-<version>-<build>-linux.tgz -C /opt
sudo chown -R splunk:splunk /opt/splunk
sudo -u splunk /opt/splunk/bin/splunk start --accept-licenseCode language: HTML, XML (xml)
For automated builds (scripts, Ansible, cloud-init), skip the prompts and set the admin password in the same command:
sudo -u splunk /opt/splunk/bin/splunk start --accept-license --answer-yes --no-prompt --seed-passwd 'Use-A-Strong-Passw0rd'Code language: JavaScript (javascript)
Note: --seed-passwd leaves the password in your shell history. In automation, the safer option is to create /opt/splunk/etc/system/local/user-seed.conf before the first start. It holds a [user_info] stanza with USERNAME and PASSWORD (or HASHED_PASSWORD), and Splunk removes the file after it reads it.
Install from the rpm or deb package
Both packages install to /opt/splunk. Run the package command from the directory where you saved the file. /opt/splunk does not exist until the install finishes. The package installs files but does not start Splunk.
# RHEL, Rocky, Alma, Amazon Linux, SUSE
cd /tmp
sudo rpm -i splunk-<version>-<build>.x86_64.rpm # or: sudo dnf install ./splunk-*.rpm
rpm -qi splunk
# Debian, Ubuntu
cd /tmp
sudo dpkg -i splunk-<version>-<build>-linux-amd64.deb
dpkg --status splunk
# Both: fix ownership and start
sudo chown -R splunk:splunk /opt/splunk
sudo -u splunk /opt/splunk/bin/splunk start --accept-licenseCode language: HTML, XML (xml)
Run rpm -qi splunk or dpkg --status splunk to confirm the package and version are installed. dpkg --list with no argument lists every package on the system, so use dpkg -l splunk if you only want the Splunk entry.
Start Splunk at boot with systemd
enable boot-start must run as root. Without -user, the service runs as root. Add -systemd-managed 1 so Splunk creates a native systemd unit (named Splunkd.service by default) instead of an init.d script. Stop Splunk before you enable it.
sudo -u splunk /opt/splunk/bin/splunk stop
sudo /opt/splunk/bin/splunk enable boot-start -user splunk -systemd-managed 1
sudo systemctl start Splunkd
sudo systemctl status Splunkd
systemctl cat Splunkd # review the generated unit, including its resource limitsCode language: PHP (php)
After this, manage the service with systemctl start|stop|restart Splunkd. That keeps systemd's view of the process accurate.
Verify the installation and log in
/opt/splunk/bin/splunk version
sudo -u splunk /opt/splunk/bin/splunk status
sudo ss -tlnp | grep -E ':8000|:8089'
# Open the web port (firewalld)
sudo firewall-cmd --permanent --add-port=8000/tcp --add-port=9997/tcp
sudo firewall-cmd --reload
# Or on Ubuntu with ufw
sudo ufw allow 8000/tcp
sudo ufw allow 9997/tcpCode language: PHP (php)
splunk status should report that splunkd is running and list its process IDs. Open http://<server-ip>:8000 and sign in with the admin account you created. On a cloud VM, open port 8000 in the security group or network firewall too. A new install runs a 60-day Enterprise trial. After that you can switch to the Free license, which has a 500 MB/day indexing limit and no user authentication.
Note: The web UI uses plain HTTP by default. Before real use, enable HTTPS under Settings > Server settings > General settings, or set enableSplunkWebSSL = true in web.conf, and limit port 8000 to trusted networks.
Connect a universal forwarder
To send logs from another Linux host, enable a receiving port on the Splunk server. Then install the forwarder from the tgz link above and point it at the server.
# On the Splunk Enterprise server
sudo -u splunk /opt/splunk/bin/splunk enable listen 9997 -auth admin:'<password>'
# On the source host
sudo tar -xzf splunkforwarder-<version>-<build>-linux.tgz -C /opt
sudo /opt/splunkforwarder/bin/splunk start --accept-license
sudo /opt/splunkforwarder/bin/splunk add forward-server <splunk-server-ip>:9997
sudo /opt/splunkforwarder/bin/splunk add monitor /var/log/messages -index main
sudo /opt/splunkforwarder/bin/splunk list forward-serverCode language: PHP (php)
list forward-server should show the server under Active forwards. On the indexer, run index=main host=<source-host> in Search to confirm events are arriving. Use /var/log/syslog instead of /var/log/messages on Debian and Ubuntu. For more CLI and search commands, see the Splunk commands reference.
Common errors and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
./splunk: No such file or directory | Running the command from the wrong directory | Use the full path /opt/splunk/bin/splunk, or cd /opt/splunk/bin first |
Permission denied on files under /opt/splunk/var | Splunk was started once as root, then as splunk | Stop Splunk, run sudo chown -R splunk:splunk /opt/splunk, then start it again |
| Prompt saying port 8000 is in use | Another service is bound to the port | Accept the suggested port, or run splunk set web-port 8001 and restart |
| Browser times out on port 8000 | Host firewall or cloud security group | Open TCP 8000 and check with ss -tlnp |
| Indexing paused, low disk space warning | Free space is below minFreeSpace | Free up disk or move indexes to a larger volume |
| Forgot the admin password | No recovery option in the UI | Stop Splunk, rename etc/passwd to etc/passwd.bak, create etc/system/local/user-seed.conf with new credentials, then start |
When something fails to start, look in /opt/splunk/var/log/splunk/splunkd.log first. Use tail -n 100 on it to see the most recent errors.
What was corrected in the commands above
- The
.msilink is labelled "Splunk Linux Windows file". It is the Windows installer and only runs on Windows. chmod 744on the.rpmfile is unnecessary.rpmreads the package and does not need it to be executable../splunk startonly works from/opt/splunk/bin. The original runs it straight aftertarorrpmwithout changing into that directory.cd /opt/splunkbeforedpkg -ifails, because the directory only exists after the package is installed. Rundpkg -ifrom the download directory.- Running
tartwice, with and without-C /opt, is redundant. Extract once with-C /opt. enable boot-startwithout-user splunkmakes Splunk run as root. The corrected command adds-user splunk -systemd-managed 1.
Frequently asked questions
Where does Splunk Enterprise install on Linux?
The rpm and deb packages install to /opt/splunk. The tgz archive extracts wherever you point tar -C, and /opt is the usual choice. The Universal Forwarder uses /opt/splunkforwarder.
What is the default Splunk web URL and port?
The web interface is at http://<server-ip>:8000. The management REST API uses port 8089, and forwarders usually send data to port 9997 once you enable receiving on the indexer.
Should Splunk run as root?
No. Create a dedicated splunk user, give it ownership of /opt/splunk, and enable boot-start with -user splunk so the service runs with limited privileges.
How do I start Splunk automatically after a reboot?
Stop Splunk, then run sudo /opt/splunk/bin/splunk enable boot-start -user splunk -systemd-managed 1. Splunk then runs as the Splunkd systemd service, which you control with systemctl.
What happens when the Splunk trial ends?
The Enterprise trial lasts 60 days. After that you can buy a license or switch to Splunk Free, which allows up to 500 MB of indexed data per day but has no user authentication and lacks some Enterprise features such as alerting.
Related tutorials
- Splunk Tutorials: Splunk Commands Reference
- What is Splunk and How it works? An Overview and Its Use Cases
- Top 50 Splunk interview questions and answers
- More Splunk tutorials
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services โ all in one place.
Explore Hospitals