Install Splunk 6.4 on CentOS 6 with non-root user

1. useradd splunk


2. tar zxf splunk-6.4.0-f2c836328108-Linux-x86_64.tgz -C /opt


3. chown -R splunk:splunk /opt/splunk


4. /opt/splunk/bin/splunk enable boot-start -user splunk (this will create init script for CentOS 6,for CentOS 7 systemd script,check below)


5. reboot and make sure splunk starts up as expected

ss -lnt

ps -ef | grep splunk


Notes: above step is same as Ubuntu 14.04


for CentOS 7 systemd script:

vi /usr/lib/systemd/system/splunk.service

[Unit]
Description=Splunk
After=network.target

[Service]
RemainAfterExit=yes
ExecStart=/opt/splunk/bin/splunk start
ExecStop=/opt/splunk/bin/splunk stop
ExecReload=/opt/splunk/bin/splunk restart
User=splunk
Group=splunk

[Install]
WantedBy=multi-user.target


systemctl enable splunk

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native