Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Apache Storm installation


May 26, 2021 Apache Storm


Table of contents


Now let's look at how to install the Apache Storm framework on your machine. /b10>Here are three steps -

  • Install Java on the system if you haven't.
  • Install the ZooKeeper framework.
  • Install the Apache Storm framework.

Step 1 - Verify the Java installation

Use the following commands to check if Java is installed on the system.

$ java -version

If Java already exists, you'll see its version number. Otherwise, download the latest version of JDK.

Step 1.1 - Download JDK

Use the link below - www.oracle.com download the latest version of JDK

The latest version is JDK 8u 60 and the file is "jdk-8u60-linux-x64.tar.gz". Download the file on your machine.

Step 1.2 - Unziw the file

Usually files are downloaded to the download folder. Use the following command to unzip the tar settings.

$ cd /go/to/download/path
$ tar -zxf jdk-8u60-linux-x64.gz

Step 1.3 - Move to the opt folder

To make Java available to all users, move the extracted Java content to the "/usr/local/java" folder.

$ su
password: (type password of root user)
$ mkdir /opt/jdk
$ mv jdk-1.8.0_60 /opt/jdk/

Step 1.4 - Set the path

To set the path JAVA_HOME variables, add the following command to the .bashrc file.

export JAVA_HOME =/usr/jdk/jdk-1.8.0_60
export PATH=$PATH:$JAVA_HOME/bin

All changes are now applied to the currently running system.

$ source ~/.bashrc

Step 1.5 - Java alternative

Use the following command to change the Java override.

update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_60/bin/java 100

1.6 steps

Now verify the Java installation with the verification command (java -version) explained in Step 1.

Step 2 - ZooKeeper Frame Installation

Step 2.1 - Download ZooKeeper

To install the ZooKeeper framework on your computer, visit the link below and download the latest version of the ZooKeeper http://zookeeper.apache.org/releases.html

So far, the latest version of ZooKeeper is 3.4.6 (ZooKeeper-3.4.6.tar.gz).

Step 2.2 - Unziw the tar file

Use the following command to unzim the tar file -

$ cd opt/
$ tar -zxf zookeeper-3.4.6.tar.gz
$ cd zookeeper-3.4.6
$ mkdir data

Step 2.3 - Create a profile

Use the command "vi conf/ zoo.cfg open a profile named "conf/zoo.cfg" and set all of the following parameters as a starting point.

$ vi conf/zoo.cfg
tickTime=2000
dataDir=/path/to/zookeeper/data
clientPort=2181
initLimit=5
syncLimit=2

After the profile is saved successfully, you can start the ZooKeeper server.

Step 2.4 - Start the ZooKeeper server

Use the following command to start the ZooKeeper server.

$ bin/zkServer.sh start

After executing this command, you will receive a response as follows -

$ JMX enabled by default
$ Using config: /Users/../zookeeper-3.4.6/bin/../conf/zoo.cfg
$ Starting zookeeper ... STARTED

Step 2.5 - Start the CLI

Use the following command to start the CLI.

$ bin/zkCli.sh

After you execute the above command, you will connect to the ZooKeeper server and get the following response.

Connecting to localhost:2181
................
................
................
Welcome to ZooKeeper!
................
................
WATCHER::
WatchedEvent state:SyncConnected type: None path:null
[zk: localhost:2181(CONNECTED) 0]

Step 2.6 - Stop the ZooKeeper server

After connecting the server and doing everything, you can use the following command to stop the ZooKeeper server.

bin/zkServer.sh stop

You have successfully installed Java and ZooKeeper on your computer. Now let's look at the steps to install the Apache Storm framework.

Step 3 - Apache Storm Frame Installation

Step 3.1 - Download Storm

To install the Storm framework on your computer, visit the link below and download the latest version of http://storm.apache.org/downloads.html

So far, the latest version of Storm is "apache-storm-0.9.5 .tar.gz".

Step 3.2 - Unzip the tar file

Use the following command to unzip the tar file

$ cd opt/
$ tar -zxf apache-storm-0.9.5.tar.gz
$ cd apache-storm-0.9.5
$ mkdir data

Step 3.3 - Open the profile

The current version of Storm contains a file configuring storm daemons in "conf/storm.yaml". Add the following information to the file.

$ vi conf/storm.yaml
storm.zookeeper.servers:
 - "localhost"
storm.local.dir: “/path/to/storm/data(any path)”
nimbus.host: "localhost"
supervisor.slots.ports:
 - 6700
 - 6701
 - 6702
 - 6703

After all changes have been applied, save and return to the terminal.

Step 3.4 - Start Nimbus

$ bin/storm nimbus

Step 3.5 - Start Supervisor

$ bin/storm supervisor

Step 3.6 - Start the UI

$ bin/storm ui

After you start the Storm user interface application, type URL http:// localhost:8080 in your favorite browser and you can see the Storm cluster information and the topology it is running. The page should look similar to the following screenshot.

Apache Storm installation