Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Issue with .RPM package to install splunk enterprise on Linux server

$
0
0
Hi We are trying to deploy and install splunk enterprise edition. We have downloaded .tgz file from the portal. As per the procedure here, we are supposed to create .rpm package of splunk enterprise edition and should be installed through the tool SPUDs on splunk server. We created the .rpm package and deployed through SPUDS and installed on splunk server successfully. But the issue is we are unable to start the splunk services. When we tried below is the warning message [splunkuser@server:[IT] ~/splunk/bin]$ ./splunk start --accept-license Warning: cannot create "/cr/splunkuser/splunk/var/log/splunk" Warning: cannot create "/cr/splunkuser/splunk/var/log/introspection" This appears to be your first time running this version of Splunk. Could not open log file "/cr/splunkuser/splunk/var/log/splunk/first_install.log" for writing (13). What we understood, splunk was installed as root user and below is the reference. drwx--x--- 6 root root 52 Sep 18 10:48 var We would like to understand, how to change the user from root to splunkuser after the splunk installation in the script We do not have root permissions and using service account "splunkuser" with sudo and would like to install splunk in the path /cr/splunkuser My colleague suggest to change user from root to services account in the post installation portion in the script Please find below the .rpm script we wrote and suggest us where to change the user from root to splunkuser. %pre if [ $1 == 2 ];then /cr/splunkuser/splunk/bin/splunk stop fi %install rm -rf $RPM_BUILD_ROOT pwd mkdir -p $RPM_BUILD_ROOT cp -Rp cs $RPM_BUILD_ROOT exit 0 %post if [ $1 == 1 ];then /cr/splunkuser/splunk/bin/splunk start --accept-license /cr/splunkuser/splunk/bin/splunk enable boot-start fi %preun if [ $1 == 0 ];then /cr/splunkuser/splunk/bin/splunk stop fi %postun %posttrans %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,splunkuser,splunkuser ,-) /cr/splunkuser/splunk %doc %changelog Thanks&Regards Srinivas

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>