WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Core 8.0 x64, file not found, but file exist  (Read 7487 times)

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Re: Core 8.0 x64, file not found, but file exist
« Reply #15 on: August 20, 2017, 02:20:20 PM »
Quote
permissions/ownership changes not required, my bad.. :(
Code: [Select]
# export SPLUNK_HOME=/opt/splunk
# export PATH=$SPLUNK_HOME/bin:$PATH
was all that was needed..

Firstly, from default installation, df -k shows I only get 323 MB for rootfs,
and I have the rest in /dev/sda1, so I was assuming this how things work, make the Core system lean and small,
and have others to put in /dev/sda1 instead,

tried to extract splunk to /opt, but it was out of space,

Quote
as a quick test replaced the symlink to ps (which Rich specifically said don't do..)

The export above seems doesnt contain about symlink change to ps, could you tell me how?
Any ps related should I work about?

Thank you very much,

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Re: Core 8.0 x64, file not found, but file exist
« Reply #16 on: August 20, 2017, 02:23:44 PM »
OK deodion

This ps path issue is an easy fix.

Simply edit /opt/splunk/bin/pid_check.sh  to add /usr/local/bin: to this path variable

Code: [Select]
line 43: PATH=/usr/xpg4/bin:/usr/local/bin:/usr/bin:/bin
After loading procps.tcz splunk will look in /usr/local/bin for ps -p

thank you very much! I will try this later,

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Core 8.0 x64, file not found, but file exist
« Reply #17 on: August 20, 2017, 02:29:44 PM »
Code: [Select]
/opt/splunk/bin $ ./splunk start

Splunk> Australian for grep.

Checking prerequisites...
        Checking http port [8000]: open
        Checking mgmt port [8089]: open
        Checking appserver port [127.0.0.1:8065]: open
        Checking kvstore port [8191]: open
        Checking configuration...  Done.
        Checking critical directories...        Done
        Checking indexes...
                Validated: _audit _internal _introspection _telemetry _thefishbucket history main summary
        Done
        Checking filesystem compatibility...  Done
        Checking conf files for problems...
        Done
        Checking default conf files for edits...
        Validating installed files against hashes from '/opt/splunk/splunk-6.6.2-4b804538c686-linux-2.6-x86_64-manifest'
        All installed files intact.
        Done
All preliminary checks passed.

Starting splunk server daemon (splunkd)... 
Done


Waiting for web server at http://127.0.0.1:8000 to be available....... Done


If you get stuck, we're here to help. 
Look for answers here: http://docs.splunk.com

The Splunk web interface is at http://box:8000

/opt/splunk/bin $
Code: [Select]
/opt/splunk/bin $ splunk status
splunkd is running (PID: 7593).
splunk helpers are running (PIDs: 7594 7603 7713 7752).
/opt/splunk/bin $


Splunk web server and interface appears to be working fine now

Access  Splunk>Enterprise @
http://box:8000
« Last Edit: August 20, 2017, 02:32:51 PM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Core 8.0 x64, file not found, but file exist
« Reply #18 on: August 20, 2017, 03:10:41 PM »
So to recap..

These commands are all I executed to get Splunk operational
Code: [Select]
tar xvzf splunk-6.6.2-4b804538c686-Linux-x86_64.tgz -C /opt

[ -e /lib64 ] || ln -s /lib /lib64

export SPLUNK_HOME=/opt/splunk
export PATH=$SPLUNK_HOME/bin:$PATH

sed -i 's|PATH=/usr/xpg4/bin:/usr/bin:/bin|PATH=/usr/xpg4/bin:/usr/local/bin:/usr/bin:/bin|' /opt/splunk/bin/pid_check.sh

tce-load -i procps

/opt/splunk/bin $ ./splunk start --accept-license

UPDATE:  I missed a command, but added now :)
« Last Edit: August 20, 2017, 03:27:11 PM by coreplayer2 »

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Re: Core 8.0 x64, file not found, but file exist
« Reply #19 on: August 21, 2017, 06:10:09 AM »
Code: (bash) [Select]
[ -e /lib64 ] || ln -s /lib /lib64
btw, what is the meaning of the first command?
I can't find any explanation in google,

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Core 8.0 x64, file not found, but file exist
« Reply #20 on: August 21, 2017, 06:46:20 AM »
It's an  IF  statement. The  -e  means it returns true if the given file/directory exists.
http://www.tldp.org/LDP/abs/html/fto.html
Download a copy and keep it handy: Core book ;)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Core 8.0 x64, file not found, but file exist
« Reply #21 on: August 21, 2017, 10:04:10 AM »
Code: [Select]
[ -e /lib64 ] || ln -s /lib /lib64
btw, what is the meaning of the first command?
I can't find any explanation in google,

Additionally, I read it like this: 
If the test command "[" /lib64 existence does not return true then execute "ln" command to create the symbolic link

BTW, you can create a shell script with those commands and run at boot to start the splunk server.  However, I'd test for the existence of /opt/splunk before executing tar..
Code: [Select]
[ -d /opt/splunk ] || tar xvzf /PathToArchive/splunk-6.6.2-4b804538c686-Linux-x86_64.tgz -C /opt
« Last Edit: August 21, 2017, 10:12:56 AM by coreplayer2 »

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Re: Core 8.0 x64, file not found, but file exist
« Reply #22 on: August 27, 2017, 09:09:07 AM »
Quote
export SPLUNK_HOME=/opt/splunk
export PATH=$SPLUNK_HOME/bin:$PATH

I try to input export command above in bootlocal.sh, but it doesnt work?

I mean, if I echo $SPLUNK_HOME, its blank,
« Last Edit: August 27, 2017, 09:17:05 AM by deodion »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Core 8.0 x64, file not found, but file exist
« Reply #23 on: August 27, 2017, 09:18:10 AM »
Users do not inherit bootlocal.sh's environment.
Add it to /etc/profile or the users profile instead.

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Re: Core 8.0 x64, file not found, but file exist
« Reply #24 on: August 27, 2017, 09:49:45 AM »
How should I put it in /etc/profile?

Can I simply insert the command?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11647
Re: Core 8.0 x64, file not found, but file exist
« Reply #25 on: August 27, 2017, 10:31:35 AM »
Hi deodion
Add:
Code: [Select]
export SPLUNK_HOME=/opt/splunk
export PATH=$SPLUNK_HOME/bin:$PATH
to the end of  /etc/profile.  Add the line:
Code: [Select]
etc/profileto your  /opt/filetool.lst  file. Backup and reboot.

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Re: Core 8.0 x64, file not found, but file exist
« Reply #26 on: August 27, 2017, 12:09:22 PM »
If I put it on bootlocal.sh like below,

### Load /etc/profile
cp /mnt/sda1/backupcfg/profile /etc/profile


I try it, but it seems doesnt work, why?

Im trying not to use filetool.lst as much as I can,
« Last Edit: August 27, 2017, 12:11:07 PM by deodion »

Offline polikuo

  • Hero Member
  • *****
  • Posts: 740
Re: Core 8.0 x64, file not found, but file exist
« Reply #27 on: August 27, 2017, 01:05:39 PM »
If I put it on bootlocal.sh like below,

### Load /etc/profile
cp /mnt/sda1/backupcfg/profile /etc/profile


I try it, but it seems doesnt work, why?

Im trying not to use filetool.lst as much as I can,

bootlocal.sh is IN mydata.tgz
You need to backup, one way or another.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11647
Re: Core 8.0 x64, file not found, but file exist
« Reply #28 on: August 27, 2017, 01:44:52 PM »
Hi deodion
Im trying not to use filetool.lst as much as I can,
In that case just add those two lines to   .profile  in your home directory instead.

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Re: Core 8.0 x64, file not found, but file exist
« Reply #29 on: August 27, 2017, 11:09:36 PM »
Hello Rich,
I see it working with filetool.sh,

is this because with where filetool.sh is being executed before /etc/profile execution?
« Last Edit: August 27, 2017, 11:34:49 PM by deodion »