May 26, 2021 Apache Storm
Now let's look at how to install the Apache Storm framework on your machine. /b10>Here are three steps -
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.
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.
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
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/
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
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
Now verify the Java installation with the verification command (java -version) explained in Step 1.
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).
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
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.
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
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]
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.
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".
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
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.
$ bin/storm nimbus
$ bin/storm supervisor
$ 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.