The objective of this tutorial is to describe step by step process to install Apache Storm (Version 2.2.0) on Ubuntu 18.04.4 LTS (Bionic Beaver), once the installation is completed you can play with Storm.

Platform

  • Operating System (OS): You can use Ubuntu 18.04.4 LTS version or later version, also you can use other flavors of Linux systems like Redhat, CentOS.
  • Storm: We have used Apache Storm 2.2.0 version for installation.

Download Software

The installation process will follow three steps.

  1. Java Installation
  2. Apache Zookeeper Installation
  3. Apache Storm Installation

1. Java Installation

Please use the below command to check whether Java is installed on your system.

cloudduggu@ubuntu:~$ java -version

If Java is installed them you will see the below output. We have installed the openJDK 1.8 version.

cloudduggu_java_version

If Java is not installed then follow the below steps to install Java.


1.1 Install openJDK 8

Please use the below command to install openJDK 8.

cloudduggu@ubuntu:~$ sudo apt-get install openjdk-8-jdk

cloudduggu java installation

Press CTRL + O to save the file. Once the file is saved press CTRL+X to exit from the editor.

After this run the below command to reflect changes in the current running terminal.

cloudduggu@ubuntu:~$ source ~/.bashrc


1.2 Set Java Environment Variable Path

Once the java installation is completed then set the JAVA_HOME path in the “.bashrc” file.

Open “.bashrc” file using below command and put the path of Java.

cloudduggu@ubuntu:~$ nano .bashrc

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/

export PATH=$JAVA_HOME/bin:$PATH

cloudduggu update bashrc

cloudduggu java path


1.3 Verify Java Installation

Please verify Java installation using the “java –version” command.

cloudduggu_java_version


2. Apache Zookeeper Installation

Let us see the installation process of the Zookeeper.

Step 2.1 Download ZooKeeper

Please download ZooKeeper from the below link. In this tutorial, we have used the zookeeper-3.6.1 version.

On Linux: $wget https://archive.apache.org/dist/zookeeper/zookeeper-3.6.1/apache-zookeeper-3.6.1-bin.tar.gz

On Windows: https://archive.apache.org/dist/zookeeper/zookeeper-3.6.1/apache-zookeeper-3.6.1-bin.tar.gz

cloudduggu download zookeeper


Step 2.2 Extract tar file

Use the below command to extract the tar file and rename it to “zookeeper”.

cloudduggu@ubuntu:~$ tar –xzf apche-zookeeper-3.6.1-bin.tar.gz

cloudduggu@ubuntu:~$ mv apche-zookeeper-3.6.1-bin zookeeper


Step 2.3 Configuration of Zookeeper

We will create a directory called “data” under the zookeeper. Now we will create a configuration file from the sample file and put the below configuration.

cloudduggu@ubuntu:~/zookeeper$ mkdir data

cloudduggu@ubuntu:~/zookeeper$ cd conf/

cloudduggu@ubuntu:~/zookeeper/conf$ cp zoop_sample.cfg zoo.cfg

cloudduggu@ubuntu:~/zookeeper/conf$ nano zoo.cfg

Now put the below parameters in the “zoo.cfg file.

tickTime=2000 initLimit=10 syncLimit=5 dataDir=/home/cloudduggu/zookeeper/data clientPort=2181

cloudduggu create directory

cloudduggu update bash file

Press CTRL + O to save the file. Once the file is saved press CTRL+X to exit from the editor.


Step 2.4 Start ZooKeeper Server

After configuration, we can start the zookeeper server.

cloudduggu@ubuntu:~/zookeeper$ ./bin/zkServer.sh start

cloudduggu start zookeeper


Step 2.5 Start ZooKeeper CLI

CLI of zookeeper can be started using the below command.

cloudduggu@ubuntu:~/zookeeper$ ./bin/zkCli.sh

cloudduggu start zookeeper cli1

cloudduggu start zookeeper cli2


3. Apache Storm Installation

Let us follow the below steps to install Apache Storm.

3.1 Download Storm

Please download Apache Storm from the below link. We have used the 2.2.0 version.

On Linux: wget https://downloads.apache.org/storm/apache-storm-2.2.0/apache-storm-2.2.0.tar.gz

On Windows: https://downloads.apache.org/storm/apache-storm-2.2.0/apache-storm-2.2.0.tar.gz

cloudduggu apache storm download


3.2 Extract Storm tar File

Use the below command to extract the tar file of the Storm.

cloudduggu@ubuntu:~$ tar -xzf apache-storm-2.2.0.tar.gz

cloudduggu@ubuntu:~$ mv apache-storm-2.2.0 storm

cloudduggu storm untar


3.3 Configuration of Apache Storm

Now go to the “conf” directory of the Storm and follow the below steps.

cloudduggu@ubuntu:~/storm/conf$ nano storm.yaml

cloudduggu storm directory

Put below parameters in the storm.yaml file.

storm.zookeeper.servers: - "localhost" storm.local.dir: “/home/cloudduggu/storm/data” nimbus.host: "localhost" supervisor.slots.ports: - 6700 - 6701 - 6702 - 6703

cloudduggu storm configuration

Press CTRL + O to save the file. Once the file is saved press CTRL+X to exit from the editor.


3.4 Start Nimbus Node

Use the below command to start the Nimbus node.

cloudduggu@ubuntu:~/storm$ ./bin/storm nimbus

cloudduggu start nimbus


3.5 Start Storm User interface (UI)

Use the below command to start the Nimbus node.

cloudduggu@ubuntu:~/storm$ ./bin/storm ui

cloudduggu start ui


3.6 Open Storm UI in Web Browser

Open a web browser and type this command http://localhost:8080 . If Storm UI is not starting on 8080 port which is the default port and throwing below error "Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080" then change the port in “storm/conf/ storm.yaml” configuration file and make it “ui.port: 8081” after that start Strom UI.

Once Storm UI is opened in the web browser post that we can see the below screen.


cloudduggu storm user interface