Re: how to put something permanent into PATH?



houghi wrote:

Günther Schwarz wrote:
IMHO any package that does not come with the distribution should be
installed outside the standard environment, e.g. in the /opt tree. This
demands changing the environment variables in order to make it easily
accessible.

And they should include a symlink to /usr/local/bin so you do not have
to change your $PATH. If that is not included, you should add it
yourself and it at least should be described in the INSTALL or README on
how to do this.

This works, of course. But most unfortunately one will find a great
variety on how third party software installs. Some put a binary or a link
in the /usr/local/bin directory, but others install under /usr/bin (bah)
or add some lines to the .bashrc of the user doing the install. In
general it is a mess.

More often then not changing $PATH will make things less secure.

As PATH is under the user's control anyway I see little to no
implications to security by modifying it. File permissions and general
trustworthiness of third party packages are of much more interest here.

When changing $PATH of root, there might be things going on that you do
not want to happen.

It has become a habit for me to install third party software on a test
system and without root privileges. The directory the package was
installed into is then copied to the system it will be used with or to an
NFS share in case it should be available on multiple machines. This way
even a very aggressive install script can't modify the system settings
which makes the installation more secure.
Instead of modifying bashrc or setting a link to /usr/local/bin I will
then create a Modules file with the proper settings for the environment
as, for example, adding /nfs/applications/matlab/7.0/bin to PATH. As a
welcome bonus it is very easy to have multiple versions of a package in
parallel this way. Instead of having multiple links like /usr/local/bin/
matlab7.0 and /usr/local/bin/matlab7.1 PATH is modified in order to
access one specific version. The same goes for third party compilers
where a more elaborate setup of the environment including LD_LIBRARYPATH
is needed. Very convenient and handy.

Also there should be no need for a new Linux user to
do so. What an experienced user does is up to him or her.

That is right in principle. But then also a newbie might want to use
Matlab or the Intel compiler. And as final remark: many commercial
packages will not run without an environment variable defining the path
to the license file. For these creating a link in the /usr/local tree is
no alternative to modifying the environment.

Günther
.



Relevant Pages

  • Re: another frustrating learner question, CLOS
    ... PERLLIB environment variables, ... etc...through apropos, describe, and the various other documentation ... the existing Lisp packages, negating a lot of my work moot. ... And then install it? ...
    (comp.lang.lisp)
  • Re: DBD::Informix -- Error Installing On Mac OSX
    ... the environment correctly, as long as the module reasonably clearly ... working Informix environment than to test for things that might not be ... use either the sysmaster database or the informix user to install ...
    (comp.databases.informix)
  • Re: Software Conundrum, Clarkdale
    ... of an install screen, and all it has is text on the screen, you ... to be used in the virtual W2K environment. ... the "clean copy" of the virtual disk, ... Since you can drag and drop files between windows, there isn't a reason for you ...
    (alt.comp.hardware.pc-homebuilt)
  • Re: Problems with 2006 rollup QFE for 5.0
    ... not least of which any QFE can overwrite your changes. ... If you install the private source with PB, ... "It usually turns out to be a stale build environment ... mverhagen at embeddedfusion dot com ...
    (microsoft.public.windowsce.platbuilder)
  • Re: DBD::Informix -- Error Installing On Mac OSX
    ... the environment correctly, as long as the module reasonably clearly ... Yes, you need a working Informix environment, including a stores ... use either the sysmaster database or the informix user to install ...
    (comp.databases.informix)