Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Establish a SSH connection to the Linux machine or log to the text Linux console. You should either log in as root or obtain root permissions after login via su or sudo command.

Step 1. Check if JDK is Already Installed

In order to check if Java Development Kit is installed on the computer, do the following.

...

In case the needed JDK version is not installed on the computer, proceed to Step 2 to install it.

Step 2. Install Java Development Kit (JDK)

For Ubuntu, Debian

1. Execute the following command to add the repository:

Code Block
sudo add-apt-repository ppa:sun-java-community-team/sun-java6

Image RemovedImage Added

2. Execute the following commands to update the repository and install JDK:

Code Block
sudo apt-get update
sudo apt-get install sun-java6-jdk

Image RemovedImage Added

3. The operation log will be displayed. The system automatically downloads necessary files from the web for installation. The system asks to confirm the installation process continuation. Type "Y", and press "Enter."

4. After the installation process is complete, jdk and jre are installed to /usr/lib/jvm/<java> directory, where <java> is the actual java installation folder. For example, /usr/lib/jvm/java-6-sun.

For CentOS, RedHat and Fedora

1. Download sun-JDK from the official Oracle site. Open a Web browser and access the following URL:

...

While selecting a packet to upload, choose the RPM.

Image RemovedImage Added

2. Start the remote SSH session in the GUI terminal window (Konsole in KDE, Gnome Terminal in Gnome, etc.) or open the Linux text console.

...

Code Block
sudo sh ./jdk-6u25-linux-i586-rpm.bin

Image RemovedImage Added

4. Execute the following command to add installed JDK to alternatives:

Code Block
sudo /usr/sbin/alternatives --install /usr/bin/java java /usr/java/latest/bin/java 2

Image RemovedImage Added

5. Choose which version of JDK to use:

...

For example, to use the sun-jdk, choose "3" and press "Enter."

Image RemovedImage Added

6. Check the installed and configured JDK by typing following command:

...

Code Block
export JAVA_HOME=/usr/java/jdk1.6.0_25

Image RemovedImage Added

Info
After the Java Development Kit (JDK) is installed, check that the JAVA_HOME environment variable has been set correctly. This is necessary for the installation of WSO2 products.

...