<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issue with .RPM package to install splunk enterprise on Linux server in Installation</title>
    <link>https://community.splunk.com/t5/Installation/Issue-with-RPM-package-to-install-splunk-enterprise-on-Linux/m-p/484426#M10401</link>
    <description>&lt;P&gt;Well, first off I don't know that this is really a Splunk question.  It's probably why you haven't gotten an answer yet.&lt;/P&gt;

&lt;P&gt;But that's OK.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I'd ask the people responsible for making you follow this process: &lt;BR /&gt;
  - "Where is the RPM installation template for installing as root but chown'ing to a different user?"&lt;/P&gt;

&lt;P&gt;You can't fix this because you don't have root permissions to run the chown that you need, so that rpm installation template ... "thing" ... needs to provide this capability. &lt;/P&gt;

&lt;P&gt;I'm sure it's actually pretty easy, but my point is that &lt;STRONG&gt;they should have this solved already&lt;/STRONG&gt; so there should be no reason you should have to go out and 'discover' your own solution for a chmod in that installer.&lt;/P&gt;

&lt;P&gt;If it were me, and they plead that they don't know and that" it's your responsibility", I'd a) nicely raise it up to your boss, b) ask for an exception and c) start looking for a new job while you are still in good spirits before you get so burnt out from politics that you just rage quit one day.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2019 00:33:20 GMT</pubDate>
    <dc:creator>Richfez</dc:creator>
    <dc:date>2019-09-25T00:33:20Z</dc:date>
    <item>
      <title>Issue with .RPM package to install splunk enterprise on Linux server</title>
      <link>https://community.splunk.com/t5/Installation/Issue-with-RPM-package-to-install-splunk-enterprise-on-Linux/m-p/484425#M10400</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;We are trying to deploy and install splunk enterprise edition.  We have downloaded .tgz file from the portal.&lt;BR /&gt;
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.&lt;/P&gt;

&lt;P&gt;We created the .rpm package and deployed through SPUDS and installed on splunk server successfully.&lt;/P&gt;

&lt;P&gt;But the issue is we are unable to start the splunk services.  When we tried below is the warning message&lt;/P&gt;

&lt;P&gt;[splunkuser@server:[IT] ~/splunk/bin]$ ./splunk start --accept-license&lt;BR /&gt;
Warning: cannot create "/cr/splunkuser/splunk/var/log/splunk"&lt;BR /&gt;
Warning: cannot create "/cr/splunkuser/splunk/var/log/introspection"&lt;BR /&gt;
This appears to be your first time running this version of Splunk.&lt;BR /&gt;
Could not open log file "/cr/splunkuser/splunk/var/log/splunk/first_install.log" for writing (13).&lt;/P&gt;

&lt;P&gt;What we understood, splunk was installed as root user and below is the reference.&lt;/P&gt;

&lt;P&gt;drwx--x--- 6 root    root    52 Sep 18 10:48 var&lt;/P&gt;

&lt;P&gt;We would like to understand, how to change the user from root to splunkuser after the splunk installation in the script&lt;/P&gt;

&lt;P&gt;We do not have root permissions  and using service account "splunkuser" with sudo and would like to install splunk in the path&lt;/P&gt;

&lt;P&gt;/cr/splunkuser&lt;/P&gt;

&lt;P&gt;My colleague suggest to change user from root to services account in the post installation portion in the script&lt;BR /&gt;
Please find below the .rpm script  we wrote  and suggest us where to change the user from root to splunkuser.&lt;/P&gt;

&lt;P&gt;%pre&lt;BR /&gt;
if [ $1 == 2 ];then&lt;BR /&gt;
    /cr/splunkuser/splunk/bin/splunk stop&lt;BR /&gt;
fi&lt;/P&gt;

&lt;P&gt;%install&lt;BR /&gt;
rm -rf $RPM_BUILD_ROOT&lt;BR /&gt;
pwd&lt;BR /&gt;
mkdir -p $RPM_BUILD_ROOT&lt;BR /&gt;
cp -Rp cs $RPM_BUILD_ROOT&lt;BR /&gt;
exit 0&lt;/P&gt;

&lt;P&gt;%post&lt;BR /&gt;
if [ $1 == 1 ];then&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/cr/splunkuser/splunk/bin/splunk start --accept-license
/cr/splunkuser/splunk/bin/splunk enable boot-start
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;fi&lt;/P&gt;

&lt;P&gt;%preun&lt;BR /&gt;
if [ $1 == 0 ];then&lt;BR /&gt;
    /cr/splunkuser/splunk/bin/splunk stop&lt;BR /&gt;
fi&lt;/P&gt;

&lt;P&gt;%postun&lt;/P&gt;

&lt;P&gt;%posttrans&lt;/P&gt;

&lt;P&gt;%clean&lt;BR /&gt;
rm -rf $RPM_BUILD_ROOT&lt;/P&gt;

&lt;P&gt;%files&lt;BR /&gt;
%defattr(-,splunkuser,splunkuser ,-)&lt;BR /&gt;
/cr/splunkuser/splunk&lt;/P&gt;

&lt;P&gt;%doc&lt;/P&gt;

&lt;P&gt;%changelog&lt;/P&gt;

&lt;P&gt;Thanks&amp;amp;Regards&lt;BR /&gt;
Srinivas&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:14:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Issue-with-RPM-package-to-install-splunk-enterprise-on-Linux/m-p/484425#M10400</guid>
      <dc:creator>suryasrini</dc:creator>
      <dc:date>2020-09-30T02:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with .RPM package to install splunk enterprise on Linux server</title>
      <link>https://community.splunk.com/t5/Installation/Issue-with-RPM-package-to-install-splunk-enterprise-on-Linux/m-p/484426#M10401</link>
      <description>&lt;P&gt;Well, first off I don't know that this is really a Splunk question.  It's probably why you haven't gotten an answer yet.&lt;/P&gt;

&lt;P&gt;But that's OK.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I'd ask the people responsible for making you follow this process: &lt;BR /&gt;
  - "Where is the RPM installation template for installing as root but chown'ing to a different user?"&lt;/P&gt;

&lt;P&gt;You can't fix this because you don't have root permissions to run the chown that you need, so that rpm installation template ... "thing" ... needs to provide this capability. &lt;/P&gt;

&lt;P&gt;I'm sure it's actually pretty easy, but my point is that &lt;STRONG&gt;they should have this solved already&lt;/STRONG&gt; so there should be no reason you should have to go out and 'discover' your own solution for a chmod in that installer.&lt;/P&gt;

&lt;P&gt;If it were me, and they plead that they don't know and that" it's your responsibility", I'd a) nicely raise it up to your boss, b) ask for an exception and c) start looking for a new job while you are still in good spirits before you get so burnt out from politics that you just rage quit one day.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 00:33:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Issue-with-RPM-package-to-install-splunk-enterprise-on-Linux/m-p/484426#M10401</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2019-09-25T00:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with .RPM package to install splunk enterprise on Linux server</title>
      <link>https://community.splunk.com/t5/Installation/Issue-with-RPM-package-to-install-splunk-enterprise-on-Linux/m-p/484427#M10402</link>
      <description>&lt;P&gt;To resolve an already installed directory you'll have to ask the system admin to chown -R splunkuser:splunk  &lt;/P&gt;

&lt;P&gt;For the future I would do one of two things. &lt;/P&gt;

&lt;P&gt;1) Ask that a sudoers rule be put in place for the splunk user to "sudo yum install splunk" &lt;BR /&gt;
2) ask that the RPM file run a chown on the $RPM_BUILD_ROOT to splunkuser:splunk&lt;/P&gt;

&lt;P&gt;Separately I would use a sudo command to start splunk as the splunk user for the first run and seed the password.  You can find how to do that towards the bottom of this doc. &lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/Installation/StartSplunkforthefirsttime" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.1/Installation/StartSplunkforthefirsttime&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Good Luck!&lt;/P&gt;

&lt;P&gt;-Derrek&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:21:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Issue-with-RPM-package-to-install-splunk-enterprise-on-Linux/m-p/484427#M10402</guid>
      <dc:creator>kgderrekchapin</dc:creator>
      <dc:date>2020-09-30T02:21:10Z</dc:date>
    </item>
  </channel>
</rss>

