LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-06-2015, 01:40 PM   #1
guna_pmk
Member
 
Registered: Sep 2008
Posts: 220

Rep: Reputation: 5
Loading libraries during server reboot


Hi,

I am configuring a server with some libraries (along with other stuffs). For the libraries to be loaded automatically on a reboot, I create a config file and put it in

Code:
/etc/ld.so.conf.d/mylibs.conf
which contains the location of my libraries (for example /usr/local/lib64).

My servers are Redhat 6.5 64 bit. I expect the libraries in the /usr/local/lib64 to be loaded automatically on a reboot. This seems to work on some servers but not on others. On those server that it did not work, if I issue ldconfig manually after the server reboot (as root), they get loaded.

Why is it not loading on some servers? Which service or setting, loads libraries from directories specified in all the conf files in the /etc/ld.so.conf.d?

Please let me know if you need any more information from my servers?

Thanks
 
Old 03-07-2015, 12:43 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
just drop a bash script calling them and or setting variables in /etc/profile.d

that is what this folder is for
 
Old 03-07-2015, 03:50 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by John VV View Post
just drop a bash script calling them and or setting variables in /etc/profile.d
that is what this folder is for
The "that is what it's for" argument can be used in a lot of situations. Does not mean it's the right way. /etc/profile.d/ contents get parsed each time a shell sources /etc/profile (regardless of it being an interactive non-login or non-interactive shell) so that's not an efficient option unless the OP juggles with /usr/local/lib64 contents on say an hourly basis.


Quote:
Originally Posted by guna_pmk View Post
My servers are Redhat 6.5 64 bit.
Note 6.6 is current.


Quote:
Originally Posted by guna_pmk View Post
I expect the libraries in the /usr/local/lib64 to be loaded automatically on a reboot.
That means you must issue the 'ldconfig' command as root on reboot.


Quote:
Originally Posted by guna_pmk View Post
Why is it not loading on some servers?
If you don't then it doesn't update the cache.


Quote:
Originally Posted by guna_pmk View Post
Which service or setting, loads libraries from directories specified in all the conf files in the /etc/ld.so.conf.d?
It's not a service unless you make it one ;-p
Sane options are calling 'ldconfig' from a "@reboot" in /etc/crontab or from /etc/rc.d/rc.local. Using the latter ensures all automount points and services are available first, so if you meant to have these libraries loaded for use by services on startup you best check and reload the cache on shutdown or reload instantly using an inotify-based service like 'incron'.
 
Old 03-15-2015, 05:18 AM   #4
guna_pmk
Member
 
Registered: Sep 2008
Posts: 220

Original Poster
Rep: Reputation: 5
Hi John,

I am with unspawn - profile.d is not the right place for this in my view. I have already implemented the rc.local solution. I just wanted to confirm whether there is any better method for this. Thanks both of you for your time.

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reboot Error: "initlog: error while loading shared libraries: libpopt.so.0" saranga2000 Linux - Enterprise 4 04-26-2013 06:50 PM
Qt 4 is not loading it's libraries coss_cat Linux - Software 2 11-15-2012 12:00 PM
Can't login to 10.04 LTS server with error sh: error while loading shared libraries swankster Ubuntu 2 12-31-2010 12:14 PM
Informix server on CentOS 5 error while loading shared libraries: libstdc++-libc6.2-2 ytd Linux - General 1 08-09-2009 02:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration