seeking general guidelines for installing software on Linux
Troy Engel
tengel at sonic.net
Mon Jan 8 22:21:24 PST 2001
Lorie Obal wrote:
>
> I was going to install the SUN j2sdk and I wasn't sure what directory to
> put it in. What are the rules of thumb for placement of different types
> of software installs for Linux? Do some of the packages automatically
> install to the correct directory?
Our accepted practice at work (we develop a lot of Java stuff) is to
untar/install/etc the JDK to a name-number directory in /usr/local/, and
symlink "java" to that. I.e.:
/usr/local/jdk1.3
/usr/local/java -> /usr/local/jdk1.3
Then, in your /etc/profile do two things:
1) add "/usr/local/java/bin" to your PATH, and
2) add a variable JAVA_HOME=/usr/local/java (don't forget to 'export
JAVA_HOME')
The first is obvious, the second is because a lot of java tools and
lauchers look for "JAVA_HOME" to use your preferred JDK (instead of
using PATH). Some randome apps look for JDK_HOME or JAVA_PATH
variations, but the majority use JAVA_HOME.
Then, by simply adjusting the /usr/local/java symlink you can install
and try out new JDK versions as needed.
-te
--
Troy Engel :: KeyID DF3D5207
Perl is just another tool in the Unix toolbox. Perl does one thing,
and it does it well: it gets out of your face. - Larry Wall
More information about the talk
mailing list