Installing JDK on Fedora, Red Hat, CentOS

  1. Visit sun java website and select the  java JDK version you would like to install: http://java.sun.com/javase/downloads/index.jsp
  2. Download the jdk-xxxxx-rpm.bin file using wget
  3. Make the downloaded file executable by running the following command
    # chmod +x jdk-xxxxx-rpm.bin   
  4. Install JDK by running the following command
    # rpm -i  jdk-xxxxx-rpm.bin  
  5. Create symbolic links for java and javac
    # ln -s /usr/java/jdkxxx/bin/java /usr/bin/java  
  6. ln -s /usr/java/jdkxxx/bin/javac /usr/bin/javac
  7. Setting JAVA_HOME and PATH for all users
    # vi /etc/profile  
    # export JAVA_HOME=/opt/jdkx.x.x_xx
    # export PATH=$PATH:$JAVA_HOME/bin
     
Advertisements

2 thoughts on “Installing JDK on Fedora, Red Hat, CentOS

  1. Pingback: Setup redmine / artifactory / hudson on fedora | Musings from a high place

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s