1.测试环境选择
splunk Enterprise:7.2.5
python :2.7.5
2.运行Python代码时,可能会出现如下错误:
ImportError: libssl.so.1.0.0: cannot open shared object file: No such file or directory
解决办法:
在 ~/.bashrc文件里面添加如下配置:
export LD_LIBRARY_PATH=/opt/splunk/lib/:$LD_LIBRARY_PATH
使配置生效:
source ~/.bashrc
参考:https://answers.splunk.com/answers/432283/why-am-i-getting-error-libsslso100-cannot-open-sha.html
3.安装splunk ,环境变量配置
打开~/.bash_profile
添加以下配置
export SPLUNK_HOME=/opt/splunk
export PATH=$SPLUNK_HOME/bin:$PATH
最后 source ~/.bash_profile
4.splunk设置开机自启动
splunk enable boot-start