LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-08-2008, 02:39 PM   #1
johnnyxxxcakes
Member
 
Registered: Nov 2008
Location: /home/john
Distribution: Fedora 11 Xfce
Posts: 40

Rep: Reputation: 15
Where is a good place to store programs?


Where is a good place to store programs? Example: I downloaded, and compiled from source, both Allegro-4.2.2 game dev for C++, and Python 2.6, but they're stored in the /home folder. Is that a good place to store files? I don't think it's good to mix that up with basic things such as music, pictures, or videos, is it?
 
Old 12-08-2008, 02:46 PM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
Personal preference plays a large part.

It makes sense to seperate programs from data, you may want to install programs to /usr/local/bin just don't forget to update your $PATH environment variable.
 
Old 12-08-2008, 02:59 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I use a simple convention:

Install all possible with the package manager---it decides where things go.
Everything else goes in /opt
Personal utility scripts go in $HOME/bin
 
Old 12-08-2008, 04:36 PM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
More generally, take a look at the FHS (http://www.pathname.com/fhs/), which describes what each of the different directories in a Linux system are supposed to be for.

Generally speaking, software that is installed on the local system, that is not to be modified by the package manager, “should” go into /usr/local/ (using /usr/local/bin for binary executables, /usr/local/etc for configuration etc).

Of course, you're free to do what you like with your own computer; the FHS is intended reading for distribution maintainers rather than system administrators. Personally, I find it easiest to try and follow it, rather than making up my own arbitrary system; that way, if another person has to maintain the same computer then they should have some idea of where to find things.
 
Old 12-08-2008, 07:08 PM   #5
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 59
When you say "they're stored in the /home folder", do you mean the actual binaries or the source files? If you mean the source directories themselves, I usually save those in a separate folder in my $HOME, which I call - boringly enough - sources. If you didn't do anything fancy to the programs you compiled, then you probably installed them to /usr/local which is the default choice for many (most?) programs.
 
Old 12-08-2008, 10:21 PM   #6
johnnyxxxcakes
Member
 
Registered: Nov 2008
Location: /home/john
Distribution: Fedora 11 Xfce
Posts: 40

Original Poster
Rep: Reputation: 15
Thanks for the info guys, but here's another question:

When I compiled Python 2.6 from source, I moved the folder where I did all the ./configure, make, and then make install to the directory /home/john.

http://i33.tinypic.com/2djnywj.jpg

But I see Python in the /usr/local/bin folder as well. Is it safe to delete the Python-2.6 folder in /home/john?

http://i33.tinypic.com/2qtzd37.jpg
 
Old 12-08-2008, 10:34 PM   #7
maradnus
Member
 
Registered: Oct 2008
Location: Yellagiri Hills
Distribution: Fedora
Posts: 87

Rep: Reputation: 15
You've installed python already.
It is now safe to delete the folder from home directory.
 
Old 12-09-2008, 06:46 AM   #8
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 59
Quote:
Originally Posted by johnnyxxxcakes View Post
Thanks for the info guys, but here's another question:

When I compiled Python 2.6 from source, I moved the folder where I did all the ./configure, make, and then make install to the directory /home/john.

http://i33.tinypic.com/2djnywj.jpg

But I see Python in the /usr/local/bin folder as well. Is it safe to delete the Python-2.6 folder in /home/john?

http://i33.tinypic.com/2qtzd37.jpg
This is what I meant by asking if you meant the sources or the binaries. The items in /usr/local/bin are the binaries. They are the compiled and installed programs that you made. The folder in your /home directory is the original sources folder. You can throw it away, but I prefer to create a directory (called sources) and store the source folders there. Sometimes you need to patch and recompile a program, and sometimes you want to uninstall it and the sources may include a make uninstall target. So, just as a thought, you might create a backup folder and move the sources there.
 
Old 12-09-2008, 07:07 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Look at "./configure --help". The "make install" phase will install the files under a base directory. Usually /usr/ or /usr/local. There is an option to change this. Here is an example from grub:
Code:
Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
/usr/local/ is the hierarchy for packages you install yourself. If you are compiling a source package that your distro supplies, /usr/ may be the default. /usr/local/ will not be disturbed during a distro upgrade.

If you use /usr/local/ as the prefix, then make sure that /usr/local/bin/ is in your $PATH and /usr/local/sbin/ is in root's path.
Also add /usr/local/lib/ to /etc/ld.so.conf, if it isn't already. Then run "sudo /sbin/ldconfig". This makes sure that libraries installed can be found as well.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Keyrings - a place to store passwords for many systems? Chris Sharman Linux - Security 2 05-03-2008 01:46 AM
Where is the best place to download programs? Balarabay1 SUSE / openSUSE 2 03-26-2006 11:15 AM
Best place to put new programs. swamprat Linux - Newbie 5 10-04-2005 08:45 PM
Possible to store programs in memory? stakhous Linux - Security 3 07-12-2005 12:40 PM
Which is the best place to install programs? guarriman Linux - Newbie 4 11-27-2004 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:49 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration