微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

原文地址:https://www.jb51.cc/centos/382066.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。