Re: how to put something permanent into PATH?
- From: Günther Schwarz <strap@xxxxxx>
- Date: 8 Nov 2009 15:12:07 GMT
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
.
- References:
- how to put something permanent into PATH?
- From: Nebojsa Subanovic
- Re: how to put something permanent into PATH?
- From: Günther Schwarz
- how to put something permanent into PATH?
- Prev by Date: Re: how to put something permanent into PATH?
- Next by Date: Re: Goddamned programmers are incompetent!
- Previous by thread: Re: how to put something permanent into PATH?
- Next by thread: Re: how to put something permanent into PATH?
- Index(es):
Relevant Pages
|