Install storm cluster under Ubuntu15.10 (run Nimbus and supervisor on one machine for beginners)

Source: Internet
Author: User
Tags uuid zookeeper

1. Download the required resources

Jdk-8u65-linux-x64.tar.gz

Zeromq-4.1.4.tar.gz

Jzmq-master.zip

Zookeeper-3.5.1-alpha.tar.gz

Apache-storm-0.10.0.tar.gz

2. Installing the JDK

We are going to install the JDK in/USR/LIB/JVM, first copy the JDK package downloaded from Windows to the user folder of Ubuntu system (/home/< your username >) (if you can't copy it may be your vmtools is not properly installed, Need to reinstall Vmtools), open Terminal (ctrl+alt+t) and enter: sudo mkdir/usr/lib/jvm enter user password to create the folder; Next use: sudo mv jdk-8u65-linux-x64.tar.gz/ USR/LIB/JVM to move the JDK package; use: CD/USR/LIB/JVM go to the current directory, unzip Jdk:sudo TAR-ZXVF dk-8u65-linux-x64.tar.gz; Configure environment variables after completion: sudo gedit/ Etc/profile; In the open document, add:

Export java_home=/usr/lib/jvm/jdk1.8.0_65

Export Classpath=usr/lib/jvm/jdk1.8.0_65/lib

Export Path=${hava_home}/bin: $PATH

Close and run after saving: Source/etc/profile make it effective.

3. Installing dependent library files

Storm and its components need to rely on some library files before they can be started. Ubuntu15.10 already has Python installed, no need to install Python. Next, install the following library files:

sudo apt-get install Libtool

sudo apt-get install autoconf

sudo apt-get install g++

sudo apt-get install Uuid-dev

sudo apt-get install UUID

4. Installing ZEROMQ (ZMQ)

Go to the extracted zeromq-4.1.4 folder and execute it in turn:

./configure

Make

sudo make install

sudo ldconfig

If there is no UUID, g++, and other errors in the middle, you miss the third step of an item, if there are no errors found in the Libsodium library, use:

./configure--PREFIX=/USR/LOCAL/ZEROMQ--without-libsodium skip this library. Then execute the top three commands above.

5. Installing JZMQ

Because ZMQ is a library file for C/s + +, Storm is JVM-based. JZMQ is a Java library of ZMQ encapsulated with JNI.

Go to the extracted Jzmq-master folder and run the following command:

./autogen.sh

./configure

Make

Sudo make Install

If the zmq.h error is not found in this process, configure the environment variable to add the ZMQ folder that you just compiled to path, and if there is an error that needs to be org.zeromq/zmq.class, execute it first:

Touch Src/classdist_noinst.stamp

Then go to the Src/org/zeromq folder to execute the Javac*.java, and then fall back to Jzmq-master to execute:

Make

sudo make install

6. Configure Zookeeper

Enter the extracted Zookeeper folder and rename the file./conf/zoo_sample.cfg to./conf/zoo.cfg, add the following to the inside:

clientport=2181

Datadir=/usr/local/zookeeper/data

Synclimit=5

initlimit=10

ticktime=2000

dynamicconfigfile=/usr/local/zookeeper/conf/zoo.cfg.dynamic.100000000

Create a new zoo.cfg.dynamic.100000000 file in the Conf directory and add the following:

server.1=weekend01:2888:3888

Where WEEKEND01 is the hostname and changes it according to its hostname.

Then create a new directory/usr/local/zookeeper/data and set it as the user ownership for the current login:

sudo chown-r username/usr/local/zookeeper/data

Create a new file named myID in this directory and write 1 to this file. This file is stored in this machine in the Zookeeper cluster PID, just write the Server.1 and this file 1 is corresponding.

Run the following command to start zookeeper:

bin/zkserver.sh start

After a short period of time (if it is checked immediately after opening, it will not detect) execute the following command to check whether it started successfully:

bin/zkserver.sh status

If an error occurs, check to see if the firewall is turned off:

Service Iptables Status

If it is running, turn it off:

Service iptables Stop

Restart zookeeper after shutting down the firewall.

7. Configure Storm

Enter the Conf folder of the extracted Storm folder, modify the Storm.yaml file, and insert the following:

Storm.zookeeper.servers:

-"WEEKEND01"

#-"WEEKEND02"

#-"WEEKEND03"

Nimbus.host: "Weekend01"

Storm.local.dir: "/usr/lian_storm"

ui.port:8383

Supervisor.slots.ports:

-6700

-6702

-6703

Where Storm.zookeeper.servers set zookeeper machine, there is only one weekend01;nimbus.host set the Storm master node Nimbus the machine, Ui.port set the Storm interface occupied by the port, set up using two-bit to On the, two-bit will prompt you without permission to use.

Then you can start storm, start zookeeper first, and then execute the following command:

./bin/storm Nimbus &

./bin/storm Supervisor &

./bin/storm UI &

Start up Nimbus, supervisor, and UI.

Whether the launch succeeds can be viewed in the browser input weekend01:8383.

Install storm cluster under Ubuntu15.10 (run Nimbus and supervisor on one machine for beginners)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.