Sun Java Setup Notes on Centos x64
Language butchery by Mr Rich on 24.1.11 @ 09:58
Some notes for the next time I do this:
- Find OpenJDK related packages. Take some notes as to what
alternatives
lists; you'll be setting this up later to point correctly to Sun Javayum list installed jre
yum list installed jdk
yum list installed gcj
ll /etc/alternatives/j*
- Uninstall OpenJDK related:
yum remove jre
yum remove /* other java related packages */
- Get the JDK for x_64 from Oracle ( http://www.java.com ); install as root as directed on site.
Take note of where Java installs to; you'll need it for re-pointingalternatives
! - Delete (if necessary) and make a soft link:
ln -s [location where Java installed] /usr/java/latest
- Re-point alternatives (as root):(... and anything else that needs to be re-pointed from the list step above)
/usr/sbin/alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 1
/usr/sbin/alternatives --install /usr/bin/jarsigner jarsigner /usr/java/latest/bin/jarsigner 1
/usr/sbin/alternatives --install /etc/alternatives/java java /usr/java/latest/bin/java 1
/usr/sbin/alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 1
/usr/sbin/alternatives --install /usr/bin/javadoc javadoc /usr/java/latest/bin/javadoc 1
/usr/sbin/alternatives --install /usr/bin/javah javah /usr/java/latest/bin/javah 1
/usr/sbin/alternatives --install /usr/bin/java_sdk java_sdk /usr/java/latest 1
/usr/sbin/alternatives --install /usr/bin/jre jre /usr/java/latest/jre/ 1
- Verify your setup:
java -version
javac -version
ls /etc/alternatives/j* - Setup the browser plugin for Firefox (these directions differ from those on Oracle's site):
(as root):cd /usr/lib64/mozilla/plugins
ln -s /usr/java/latest/jre/lib/amd64/libnpjp2.so . - If necessary, you may also need to setup the link to the Java plugin as the user:
(not super-user):cd ~/.mozilla/plugins
ln -s /usr/java/latest/jre/lib/amd64/libnpjp2.so .
- Site where found: http://labs.adobe.com/downloads/flashplayer10_square.html
- File desired:
flashplayer10_2_p3_64bit_linux_111710.tar.gz
Make sure you get the 64 bit version! The typical download location on Adobe's site doesn't list the 64 bit version! - As root, unpack the tarball into the mozilla plugin directory (where you created the link for the Java plugin above) and make it executable:
tar -zxvf flashplayer10_2_p3_64bit_linux_111710.tar.gz -C /usr/lib64/mozilla/plugins
chmod +x /usr/lib64/mozilla/plugins/libflashplayer.so