LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   best place to install software (https://www.linuxquestions.org/questions/slackware-14/best-place-to-install-software-380405/)

dnial 11-06-2005 02:57 AM

best place to install software
 
Where is the best place to install software?
/home/user
/opt

Or maybe /home/user/software..?

How do you go about it?

kaon 11-06-2005 03:02 AM

FYI,
I would like to place on /usr , second /opt, but I would follow what Patrick does on manipulating them.


Anyone know where can I find Patrick's way of placing the apps? I would rather follow his tradition.

:D

Mega Man X 11-06-2005 03:09 AM

Definitely never at /home/user. The reason why I dislike /home/user, besides reminding me of Windows, is that a program installed there will only be available to that user. Besides, if that user is ever compromised, you can kiss your installed applications goodbye.

By convention, the /usr/share/ and /usr/local/share directory contains files and programs used by all users. I recommend you installing things there.

Sun and Solaris likes the /opt (optional) directory to install third-party applications. I really like that, so most of my applications that I download from the net, non-native to my OS (say, .deb or .tgz) I install at /opt/, such as Eclipse, for example.

Well, it's all a matter of taste, really. Just so you keep things organized ;)

rkelsen 11-06-2005 04:14 AM

Re: best place to install software
 
Quote:

Originally posted by dnial
Where is the best place to install software?
According to the LFS, the stuff you compile yourself should go under /usr/local. Most source packages you download will have this set as the default anyway. If not, it is an easy thing to change.

Quote:

Originally posted by dnial
How do you go about it?
Look for the package you need on the internet. If there is a Slackware package available, you can download it and use 'installpkg' or 'upgradepkg' to install it. If there is no Slackware package available for what you want, download the source and compile it. There is usually an INSTALL or README file which explains how. Read 'man makepkg' for details on how to make a Slackware package. It is quite easy.

dnial 11-06-2005 04:49 AM

awesome...

That helps alot..Thank you.

shepper 11-06-2005 10:44 AM

There is nothing that prevents you from building a package just as Pat V. or like the vast majority of packages that are submitted to linux packages.

If you install slackware packages most go to /usr.

There are some exceptions such as desktop on window managers. KDE usually goes in /opt and some like to put java there. The java version that Pat provides goes in /usr/lib with a soft link to /usr/lib/java. Many put Icewm in /usr/X11R6.

Some distros (Mandrake) also put Gnome in /opt but when Slackware had it it went in /usr/lib. Apps that install kernel modules (Alsa-driver) have to insert the compiled code into the modules section of the Kernel.

The point is that there is no standard "best" place to install from source. What I think is more important is how you want the software used which is dependent on the concept of the "Path"
(Somewhat like some of the SciFi novels where you need to know the path:cool:))

When compiling software certain libaries need to be accessed and if they are not available (read permissions are given to the user that started the compile) then the compile will fail. Slackware was designed so that a reliable "build environment" is in /usr/local.

When you go to compile you can set the install directory b passing the "prefix=/usr" parameter like so "./configure --prefix=/usr" This usually puts the executable binary in /usr/bin, the libaries in /usr/lib and the documentation in /usr/share Alot more info can be had looking at the build scripts in linuxpackages or looking at Pat's build scripts in the /source directory of you CD's or online.

egag 11-06-2005 11:50 AM

--------------
Some distros (Mandrake) also put Gnome in /opt but when Slackware had it it went in /usr/lib.
---------------

Slackware used to put gnome in /opt.

i keep /usr for the stuff that comes with the Slackware distro.
all other stuff goes in /usr/local.
that keeps things nicely separated.

also i keep linuxpackages.net as a last resource.
i prefer compiling from source . ( well ....not things like OO )

egag

bmfan 11-06-2005 12:10 PM

for a kde app i install to --prefix=/opt/kde anything else i put in --prefix=/usr , I like to keep things consistant so i stick to the slackware standards

egag 11-06-2005 12:14 PM

Quote:

Originally posted by bmfan
for a kde app i install to --prefix=/opt/kde anything else i put in --prefix=/usr , I like to keep things consistant so i stick to the slackware standards
can you tell me where the " slackware standards " can be read ?

egag

bmfan 11-06-2005 02:49 PM

looking at the directory structure of my slackware install lol

egag 11-06-2005 02:55 PM

Quote:

Originally posted by bmfan
looking at the directory structure of my slackware install lol
well...then i'd say: let's not mess with what's from the distro, and use /usr/local.
but then again, that's just my humble opinion.

egag

keefaz 11-06-2005 03:00 PM

The slackware standards :
http://www.slackware.com/config/rootdir.php

Filesystem Hierarchy Standard Group :
http://www.pathname.com/fhs/pub/fhs-2.3.html

bmfan 11-06-2005 03:09 PM

if your not going to install to the place software is already installed in your distro, then it doesnt really matter where you install apps to , create a /Program Files directory and install it there would work as well as anywhere else

shepper 11-06-2005 03:57 PM

Quote:

Slackware used to put gnome in /opt.
Some links to the build scripts for gnome in Slackware 10.0
Gconf slackbuild
Gnome-desktop
Nautilus
All these components have "--prefix=/usr" so they would not go into the /opt directory,

Compare this to KDE
KDEbase

Quote:

i keep /usr for the stuff that comes with the Slackware distro.
all other stuff goes in /usr/local.
that keeps things nicely separated.
Try installing libgphoto2, gphoto2 and gtkam in /usr/local. The libgphoto path has to be exported in order to compile gphoto2. Put everything in /usr with --prefix=/usr and it compiles easily. Plus it is in the same place that rpm based distros place gphoto2 so the documentation post-install configuration (setting up USB hotplugging) is consistent.

Sections 3.6.1 to 3.6.3 of gphoto2 documentation

egag 11-06-2005 04:45 PM

well...i can't remember other then that gnome was in /opt together with kde.
but the buildscripts say /usr ( but that's not /usr/lib btw. )

as for the libgphoto2 etc. i can only say that they don't follow the standard.
(although it's not a law or so...)
but it's a flaw when software can only be installed in one specific dir.
( not so flexible as it should be )

from the second link keefaz gave :

----------------------
/usr/local : Local hierarchy
Purpose

The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr.

Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.
---------------

and

-------------
Software placed in / or /usr may be overwritten by system upgrades (though we recommend that distributions do not overwrite data in /etc under these circumstances). For this reason, local software must not be placed outside of /usr/local without good reason.
--------------

so, " a good reason " is enough to to install outside /usr/local.
but most software has no "good reason" to do so. ( they run ok from /usr/local )

and maybe that " good reason " of libgphoto2 etc. is no more than an omission in their software installation.

egag


All times are GMT -5. The time now is 01:11 PM.