//
you're reading...
howto, Linux, scripting

Installation of SUN JAVA Under RHEL

0. Download JAVA and Run the Installer

Java can be downloaded through http://java.sun.com/products/archive/ link

# cd /opt
# chmod +x jdk-6u11-linux-x64.bin
# script -a jdk_installation.txt
# ./jdk-6u11-linux-x64.bin
# exit


1.# rm /usr/bin/java
2.# test -L /usr/local/java && mv /usr/local/java /usr/local/java_orig_system
3.# find /usr/local -maxdepth 1 -type d -name “j2sdk*” -exec rm -r {} \;
4.# find /usr/local -maxdepth 1 -type d -name “jdk?.*” -exec rm -r {} \;
5.# mv -f jdk1.6.0_11 /usr/local/
6.# chown -R root:root /usr/local/jdk1.6.0_11
7.# ln -sf /usr/local/jdk1.6.0_11 /usr/local/java
8.# test -x /sbin/removepkg && /sbin/removepkg j2sdk jre jre-symlink
9.# cat << ΕΟF > /etc/profile.d/j2sdk.sh
#!/bin/sh
export JAVA_HOME=”/usr/local/java”
export MANPATH=”\$MANPATH:/usr/local/java/man”
export ΡΑTH=”\$PATH:/usr/local/java/bin:/usr/local/java/jre/bin”
EOF

10.# chmod +x /etc/profile.d/j2sdk.sh
11.//resource variables

# . /etc/profile.d/j2sdk.sh

Discussion

Comments are closed.

%d bloggers like this: