LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 10-03-2005, 04:26 PM   #1
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, (Which Exit), USA
Distribution: Centos 5 Under VMware in WinXP CentOS 5.3 all under VMware
Posts: 418

Rep: Reputation: 33
Best place to put new programs.


Greetings all,

If installing new code (programs etc.) what would be the best folder, directory to place it in so the new program would be available to all the users of the system.

I thought it might be bin in the root!

Thanks.
 
Old 10-03-2005, 04:57 PM   #2
m0rg
Member
 
Registered: Jun 2003
Location: France
Distribution: slackware 11.0
Posts: 80

Rep: Reputation: 15
Usually software you install go to /usr (or /usr/local)
So the binaries from those programs will go to /usr/bin (/usr/local/bin)which may be accessible to all user (by default)
 
Old 10-03-2005, 05:05 PM   #3
mikemrh9
Member
 
Registered: Nov 2003
Distribution: Arch
Posts: 136

Rep: Reputation: 21
You have various options here. One school of thought is to install them to /usr/bin, or /usr/local/bin, or /usr/share, as these directories are likely to be in your path. (To display the path, type 'echo $PATH'). Just have a look at your system to see where currently installed program directories are stored.

However, unless you are very careful, this can get messy, and it seems to be increasingly popular to create subdirectories under /opt for your programs instead, and to make sure that you have a symbolic link to the program in /usr/bin.

This way, it is easy to see and manage the programs that you have installed yourself, as they are kept seperate from the programs installed by your original setup. The symlink in /usr/bin is just there to ensure that you can just type the name of the program to launch it, without hving to specify the whole path.

My preference is to install to a subdirectory of /opt, and to create a symlink to the startup script in /usr/bin. this way, it's much easier to keep track of what you have installed when it comes to managing updates.
 
Old 10-03-2005, 07:27 PM   #4
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 51
According to the FHS /opt is for 'add on software packages' http://www.pathname.com/fhs/pub/fhs-...FTWAREPACKAGES which are meant to be installed in /opt/<name of program> or /opt/<name of company that made program>, a bit like Program Files in Windows.

/usr/local is for applications that are compiled locally on the system, ie. that aren't installed by a package management system such as RPM or DEB but where the files are still seperated into the standard Linux sub-dirs - bin, etc, lib, share/man and so on. http://www.pathname.com/fhs/pub/fhs-...FTWAREPACKAGES

So really you can choose - if your app is intended to be distributed in an RPM or DEB one day then put it in /usr/local/ so it can easily be changed to /usr in the configure by the packager. If not or if you want a Windows-style 'program folder' install then put it in /opt.
 
Old 10-04-2005, 08:47 PM   #5
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, (Which Exit), USA
Distribution: Centos 5 Under VMware in WinXP CentOS 5.3 all under VMware
Posts: 418

Original Poster
Rep: Reputation: 33
Thanks folks,

I'm want to install AdobeReader 7.0 and I have the .gz file.

I'll untar it into a /ProgramSource directory and then do the install into the /opt directory.

Anyone think this isn't the way to go...please advise.

Thanks again.
 
Old 10-04-2005, 09:45 PM   #6
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 51
Nothing wrong with that, opt would make the most sense for programs like Adobe that install into a Windows-style 'Program Folder' directory rather than spread across a Linux-y bin, lib, share structure.

Just keep in mind that what you've got there isn't the program's source code - Adobe Reader is a closed-source application. They only distribute pre-compiled binaries like on Windows. Its your choice but you don't need to go making new top-level directories like /ProgramSource, just put all your downloaded files into your home dir somewhere. That way when you backup your home dir you keep all your stuff.
 
  


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
Where to put programs? LoafOfBread34 Linux - Newbie 4 11-24-2005 04:07 PM
best-practice place to put shared directories funaroma Linux - Newbie 1 11-30-2004 04:50 PM
Which is the best place to install programs? guarriman Linux - Newbie 4 11-27-2004 11:27 AM
where to put programs? NonSumPisces Linux - Newbie 4 05-26-2004 11:08 AM
what is the standard place to put sourcefiles and where install? ldp Debian 5 05-14-2004 11:36 AM


All times are GMT -5. The time now is 06:29 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration