You should have the Java JDK and ZooKeeper ensemble installed before starting the deployment of the Storm cluster.
Perform the following steps to install the Java SDK 7 on your machine. You can also go with JDK 1.8:
- Download the Java SDK 7 RPM from Oracle's site (http://www.oracle.com/technetwork/java/javase/downloads/index.html).
- Install the Java
jdk-7u<version>-linux-x64.rpm
file on your CentOS machine using the following command:
sudo rpm -ivh jdk-7u<version>-linux-x64.rpm
- Add the following environment variable in the
~/.bashrc
file:
export JAVA_HOME=/usr/java/jdk<version>
- Add the path of the
bin
directory of the JDK to thePATH
system environment variable to the~/.bashrc
file:
export PATH=$JAVA_HOME/bin:$PATH
- Run the following command to reload the
bashrc
file on the current login terminal:
source ~/.bashrc
- Check the Java installation as follows:
java -version
The output of the preceding command is as follows:
java version "1.7.0_71"Java...