Sun Java on Linux Setup for Stud Muffins

Brian Hawkins brianhks at activeclickweb.com
Tue Jan 9 11:31:33 MST 2007


Nicely done.  I've always done similar on my machines.  Mostly because I 
end up requiring more then one version of the JDK.  I hate the way Java 
gets spread all over your machine with sim links in between on some 
distro's.  It is sooo much cleaner to have it all in one directory that 
you can point at.

Brian

Bryan Sant wrote:
> After dealing with the same type of questions about installing Java on
> Linux, I've decided to post instructions on how to do it the ubber
> cool way (aka the way I do it).  The way I do it is heavy handed and
> flies in the face of traditional package management on your distro of
> choice, but nonetheless it is the most bull crap free way of getting
> Java running quickly and correctly.
>
> If you disagree with the way I set things up then just remember, you
> and wrong, and I am right.  Now, with no further ado, here are the
> steps:
>
> 1) Download the Sun JDK from 
> http://java.sun.com/javase/downloads/index.jsp
>  - You want JDK 6
>  - If your distro uses RPM, then download the RPM version.
>  - Otherwise, get the self-extracting version.
>
> 2) Become root
>
> 3) Run:  sh jdk-6-linux*
>  - Answer "yes" to the license agreement
>  - An RPM will be installed, or the file will be unzipped (depending
> on which download you got)
>
> 3b) If you didn't get the RPM version, then execute:  mkdir /usr/java
> && mv jdk1.6.0 /usr/java
>
> 4) Override the bull crap GNU gij version of java that came with your 
> distro.
>  - Append the following lines to your ~/.bash_profile file (or
> /etc/profile, or /etc/profile.d/):
>  export JDK_HOME=/usr/java/jdk1.6.0
>  export JAVA_HOME=$JDK_HOME
>  export PATH=$JAVA_HOME/bin:$PATH
>  - Save the file
>  - Restart your desktop environment (if applicable), or logout and
> login to a new shell.
>
> 5) Open a new console and execute: java -version
>  - It should say:  java version "1.6.0"
>
> 6) w00t!
>
> -=-=-=-=- Installing Tomcat -=-=-=-=-
>
> 1) Download tomcat from http://tomcat.apache.org/download-55.cgi
>  - Get the tar.gz version
>
> 2) Run:  tar zxf apache-tomcat-5.5*
>
> 3) Become root.
>
> 4) Get tomcat in /opt (or you could do /usr/local):
>  - mv apache-tomcat-5.5*/ /opt
>  - cd /opt
>  - ln -s apache-tomcat-5.5* tomcat
>
> 5) Start tomcat
>  - Run: /opt/tomcat/bin/startup.sh
>  - Startup your favorite browser and browse to http://localhost:8080/
>
> 6) w00t!
>
> -=-=-=-=- Installing Ant -=-=-=-=-
>
> You may not care about ant, but many java-based OSS projects use ant
> as their build tool.
>
> 1) Download ant from http://ant.apache.org/bindownload.cgi
>  - Download the tar.bz2 version
>
> 2) Run:  tar jxf apache-ant*
>
> 3) Become root.
>
> 4) Get ant in /opt (or /usr/local)
>  - mv apache-ant*/ /opt
>  - cd /opt
>  - ln -s apache-ant* ant
>
> 5) Append the following lines in your ~/.bash_profile
>  export ANT_HOME=/opt/ant
>  export PATH=$ANT_HOME/bin:$PATH
>
> 6) Restart your desktop or re-login to your shell respectively
>  - Run:  ant -version
>  - Should print:  Apache Ant version 1.7.0 ...
>
> 7) w00t!
>
> You're welcome,
> -Bryan
>
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3347 bytes
Desc: S/MIME Cryptographic Signature
Url : http://plug.org/pipermail/plug/attachments/20070109/5763b333/attachment.bin 


More information about the PLUG mailing list