LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-18-2004, 03:00 PM   #1
Rundi
Member
 
Registered: Jun 2003
Location: USA
Distribution: Ubuntu
Posts: 169

Rep: Reputation: 30
Where to install programs?


I was once told to install programs to file:/usr/local/bin but I'm still learning about Linux, so I have some questions for clarification. Should I install programs to file:/usr/local/bin if I only want my current user to operate the installed program or will an install to file:/usr/local/bin work for every one of my users?

Also, why is it considered better to install to file:/usr/local/bin rather than file:/usr/share or even file:/usr/local/share ? In some vauge way I understand that /bin is where programs go, but if I go looking around on my hard drive I find an awful lot of /bin locations. Could anyone explain to my why file:/usr/local/bin is considered the "right" place to install programs.

Another question. In windows programs defaulted to an install at Program Files but if you wanted you could install the programs wherever you wanted. Is there any headaches associated with installing programs in Linux outside the "normal" location? For example, if I created a directory called "Installed" and then installed all my programs there would I be setting myself up for a lot of headaches down the road?

And yet another question: In windows moving around an installed program could cause a program to malfunction because registry keys would no longer point to the proper location. Application "shortcuts" aside, is there any similiar danger in Linux or could I move around installed progams as the fancy strikes me without worry?

Thanks,
 
Old 03-18-2004, 03:33 PM   #2
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Blog Entries: 14

Rep: Reputation: 35
Program installation under Linux is much different from Windows. Bits and pieces of your program go everywhere; you can't simply move things around. Executables will go in one directory, libs in another, documentation in yet another etc. etc. The /usr/local/bin directory will be in the path, which is a big plus for executables - if you install anywhere else you'd have to add that location to the path or always run your program from inside that directory with ./whatevercommand. I cannot see any reason why you shouldn't go with the preset locations.

Robin
 
Old 03-18-2004, 03:35 PM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
http://www.pathname.com/fhs/

If you only want one user to use it, you can install it in your home directory. If you install it in/usr/local it would ordinarily be accessible to all. However, you can mess with the permissions and restrict it.

You wouldn't exactly 'install it in bin'. The binary would go in bin and other files would go in their appropriate places.

/bin is supposed to be for binaries needed by the core system that may also be needed by regular users at regular times. /usr/bin is where more general applications go. /usr/local/bin is reserved for the sysadmin (you) to install whatever he wants and not have it messed with in an upgrade. Also, these various filesystems can be mounted from separate partitions and shared with or reserved from certain other machines on the network.

As far as non-standard locations, it depends on the program. Some programs will operate fine in isolation. But if you install a library in a goofy place, it's a headache to tell every other program that needs it where it is.

Windows gets away with the 'all parts of an app in a directory' through a couple of means - everything is a desktop or menu shortcut and *not* everything is in one place, contrary to what people think. A lot of configuration is here, some libs are there, bits and pieces are recorded solely in the registry. And few people know where everything is. But besides that, it's just a different philosophy.

However, it's not much easier to move stuff around in Linux. It's made easier by symlinks but why would you really want to do that anyway?

But reading that link above should answer a lot of things better than I can.
 
Old 03-18-2004, 03:48 PM   #4
Rundi
Member
 
Registered: Jun 2003
Location: USA
Distribution: Ubuntu
Posts: 169

Original Poster
Rep: Reputation: 30
Thanks

Thanks for the replies.

Good link. I will look at it more fully later.

I guess part of what is confusing me is that most of what I install is an .rpm which puts everything in the required places. However, I have the browser Firefox which does not come in rpm form. It simply extracts and runs . . . and this is leaving me a bit flummoxed as to where I'm supposed to put the directory. I'm not sure my current location is optimal.
 
Old 03-18-2004, 04:35 PM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Ah. I see. Well, mozilla (and family) are kinda weird. I only run mozilla and I've got three versions scattered around. (Gotta clean up my box.) The one I currently run (1.6) is in ~/bin. With something like Firefox, if you're the only one using it, you might as well make a ~/bin or similar and run it from there. Or leave it wherever it is if it works and it's okay with you. I suppose the 'correct' thing would be to unpack it as root in /usr/local/lib and create a symlink in /usr/local/bin to the executable. Something along those lines. Maybe someone who's got Firefox will post.
 
Old 03-18-2004, 05:23 PM   #6
Rundi
Member
 
Registered: Jun 2003
Location: USA
Distribution: Ubuntu
Posts: 169

Original Poster
Rep: Reputation: 30
Got it

I think I understand. Maybe I will do that sometime just so my Firefox will be installed "right." Currently I have it installed in /home/myprofile/firefox/ which isn't kosher, obviously.

When you say symlink you mean what KDE calls "Link to Application" right? Or is a symlink something different>
 
Old 03-18-2004, 07:34 PM   #7
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Well, on a certain level, if it runs, it's installed right.

I'm not sure. I don't use KDE. I think KDE's links to applications probably *are* symlinks, but probably tucked away in a KDE directory where they wouldn't do you any good anywhere else. But if all you use is KDE, then you could probably do that.

A symlink's just a small file that contains a path - reroutes access to it to the file it points to. Made with 'ln -s filename linkname'.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't install g++ so I can't compile and install any programs musicmaniac414 Linux - Software 12 02-06-2008 09:31 PM
How to install programs ??????? antisocialiting Linux - Newbie 6 08-15-2005 02:03 AM
Programs Won't Install dumbsheep Linux - Newbie 9 01-11-2005 12:39 PM
How do I install programs?? twitch88 Linux - Newbie 4 07-22-2004 04:02 PM
Can't install programs tagbre Linux - Newbie 5 12-30-2003 06:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:06 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