LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Seperate program directories in Linux (https://www.linuxquestions.org/questions/linux-general-1/seperate-program-directories-in-linux-30573/)

NGraphiX 09-17-2002 10:13 AM

Seperate program directories in Linux
 
Is there a way I could get the RPM package manager
to install programs in preset directories?

In windows you can specify where you want the
program to be installed, but in linux all the programs
seem to be under /usr/bin in a rather big jumble,
and various other non-binary's are hidden under /usr/share
again in a not too orginized fashion.

I guess what i'm getting at is that I'd like a way to have
a modular system where every program would be in i'ts own
directory nicely set up in a orginized heirarchy like:
/usr/apps/TextApps/OpenOffice/
I thought of Linux from scratch but than reilized I'd have to use rpm's to reinstall everything, (or download about 200M)

so any advice on how to customize where things go?

acid_kewpie 09-17-2002 10:27 AM

you really should let go of your windows ways of thinking!

ok, so you have a seperate directory for every single app you install... so now to run any app from a console you have to have a path structure including every single one of these directories???? that's daft. but then i guess this also means you hate using consoles anyway, in which case things will probably just as awkward, as as soon as one app tries to call another (e.g. a wrapper application to another) it can't find it and you fall on your arse again.

linux uses directories for seperating and subdividing libraries, binaries, data files and various other things. go with the flow eh? it works an awful lot better that messing around. there's a reason things are the way they are

but if you insist, it's all in the RPM manpage. read it.

NGraphiX 09-17-2002 01:19 PM

Still, I see an advantage to knowing what's where, so you can
remove / copy programs easily, instead of trying to find all the
related files.
About the problems you mentioned
i.e. a. having to type in the whole path
b. calling another app
you can always have links to all the binaries in /usr/bin,
and have the actual binaries in thier respective dir's.

thanX again, I'll definatly read the manpages.

acid_kewpie 09-17-2002 01:22 PM

you think manually creating an adsitional link to every app is a good thing????? whatever..

mikek147 09-17-2002 02:57 PM

One reason that MS Windows can do this is because of the registry. But this is also the one big drawback to MS Windows, the maintenance of the registry. If the registry is screwed up, then so is your system. UNIX/Linux doesn't use anything close to a registry because it simply doesn't need it, and you don't have to support that overhead.

As you would use rpm to install a package, you can use it to uninstall that same package. And what need would you have in copying a program?

The fs layout for UNIX/Linux is very well thought out. /bin, /lib and /sbin has the applications and libraries needed for boot. /usr/bin has the user level commands. /usr/sbin has superuser commands. /usr/lib has the libraries required to either run or build an application. /usr/local is the location for user installed packages. /opt is usually used for 3rd party vendor applications. /var has logs and such. And swap is a non-viewable, raw partition. /usr/man is generally for the online documentation. A place for everything and everything in its place.

As acid_kewpie stated, "go with the flow eh?" If you prefer the layout of MS Windows over Linux, stay with it. One of the things that makes UNIX/Linux as reliable as it is, is that very same fs layout that you would like to change. -mk

NGraphiX 09-17-2002 04:47 PM

It appears I'm doomed...
from the FHS:

"No other directories, except those listed below may be
in /usr/local after first installing a FHS-compliant system"

to mikekl47: good point about the registry , windows crashed
on me more than once because of registry related problems.

I guess I'll go with the flow as said, all in all,
Linux definatly Kicks Arse.

MasterC 09-17-2002 05:42 PM

Yeah, but if you were so inclined to go through a sort of LFS install, making each program in it's own directory, and then follow with a symlink from each program, to a /usr/bin style directory, along with libs et all, you could accomplish such a task. And then it would be setup as you'd like. From then on, when you installed programs you'd have to follow the same scheme, and use only sources (which is a good thing though) and supply directories and such.

But it could be done, the work involved would not be worth it, but it could be done.

Cool

DavidPhillips 09-17-2002 07:08 PM

Basically in *nix you have a home folder that has a seperate file or files for each app that you run.

Each user has their own config files and such, and share the binaries and libs.

This is what makes it great, if a user screws up some app they can just remove it's files in their home folder and when they run it again it is like reinstalling it.

This is vastly prefered over reinstalling the entire system because it got hosed.


All times are GMT -5. The time now is 10:38 AM.