running apps off a network

balanga

Son of Beastie

Reaction score: 215
Messages: 4,011

Is there any reason why I can't run apps off a network rather than locally?

Of course I would need to set up the environment first. Adding a network path should be straightforward but what about adding a library path and are there any other variables which would need to be added for this to work?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,202
Messages: 37,354

There's no difference between a "network" path or a local path. Both NFS and SMB simply mount on the filesystem.
 
OP
B

balanga

Son of Beastie

Reaction score: 215
Messages: 4,011

It's more a question of getting the right environment in place so that running any app such mc would be able to locate shared libraries on the network. I can't figure out how to do that.
 

cmoerz

Member

Reaction score: 14
Messages: 38

Well, noone is stopping you from simply pointing LD_LIBRARY_PATH to any arbitrary path. That's probably the easiest way to have a network folder provide shared libraries. Order of paths obviously is relevant.
I.e.
export LD_LIBRARY_PATH=/net/abc:$LD_LIBRARY_PATH is not the same as export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/net/abc.

I recommend testing your path settings in an interactive shell first. Otherwise, you might screw yourself over - in particular if you aren't running a built-in shell. I.e. if you're running bash without having it statically linked, you could end up unable to log in.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,202
Messages: 37,354

I.e.
export LD_LIBRARY_PATH=/net/abc:$LD_LIBRARY_PATH is not the same as export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/net/abc.
Be careful with constructions like this, especially when $LD_LIBRARY_PATH is empty.
 

covacat

Well-Known Member

Reaction score: 133
Messages: 274

also LD_LIBRARY_PATH is ignored for set[ug]id binaries
 

Phishfry

Beastie's Twin

Reaction score: 2,436
Messages: 5,347

I built misc/ytree as a static binary. Perhaps you should try with mc. It has minimal dependencies.
I did static compile of flashrom too. Very useful.

MAKE_ARGS+= STATIC=1

 

ralphbsz

Son of Beastie

Reaction score: 2,097
Messages: 3,061

You can just mount /usr and /lib from an NFS server. That used to be part of the setup of diskless workstations (we used to call them "dickless workstations", today we call it "stateless computing").

When I say "just", that really means: There are lots of configuration issues to overcome, to make sure /etc and /var are matched to /usr and /lib.
 

Alain De Vos

Daemon

Reaction score: 347
Messages: 1,290

After mounting /usr/local/ late i had to run,
Code:
ldconfig -v -m -R /usr/local/lib
This in order for the libraries to be found.
For the rest you can use nfs,iscsi,etc...
 
Top