The environment of this article is as follows:
Operating system: CentOS 6 32-bit
Zookeeper version: 3.4.8
Storm version: 1.0.0
JDK version: 1.8.0_77 32-bit
Python version: 2.6.6
Cluster situation: One master node (master) and two working nodes (SLAVE1,SLAVE2)
1. Build Zookeeper Cluster
Installation reference: CentOS under Zookeeper standalone mode, cluster mode installation
2. Installing dependency packages on Nimbus and worker machines
Java 6
Python 2.6.6
The above version is officially said to have the test can and Strom normal operation version, this article uses the Java 8 installs.
Refer to CentOS 6 to install the JDK8 using RPM mode.
Since CentOS 6 already comes with Python 2.6.6, the installation method is not described here. You can use python --version
it to check if the server has Python installed and the corresponding version.
3. Download the latest version of Storm
Open official website download page: http://storm.apache.org/downloads.html
Select the appropriate version to download.
"http://apache.opencas.org/storm/apache-storm-1.0.0/apache-storm-1.0.0.tar.gz"-xzvf apache-storm-1.0.0.tar.gzmv apache-storm-1.0.0 /opt
4. Modify the configuration file
Open Core profile: Storm.yaml
cd /opt/apache-storm-1.0.0/confvi storm.yaml
At least complete the following 3 configurations, the author's configuration file:
storm.zookeeper.servers: - "master" - "slave1" - "slave2"storm.local.dir: "/opt/apache-storm-1.0.0/data"nimbus.seeds: ["master"]
Which storm.zookeeper.servers
represents the zookeeper cluster address. If the zookeeper cluster is not using the default port, you will also need to configure Storm.zookeeper.port. storm.local.dir
a path to configure Storm to store a small number of files. nimbus.seeds
used to configure the address of the master node, you can configure multiple.
5. Copying files to the remaining master nodes and work nodes
scp -r apache-storm-1.0.0 root@slave1:/optscp -r apache-storm-1.0.0 root@slave2:/opt
6. Start Storm
The storm cluster contains two types of nodes: the master node and the work node. The respective roles are as follows:
The master node runs a daemon called Nimbus, which distributes code within the Storm cluster, assigns tasks to the work machine, and monitors the cluster's operational state.
A background program called Supervisor is run on each work node. The supervisor is responsible for monitoring the tasks assigned to it from Nimbus to start or stop the worker process that executes the task. Each worker process executes a subset of topology; A running topology consists of multiple worker processes that are distributed across different worker nodes.
6.1 Starting the main control node
/opt/apache-storm-1.0.0/bin/storm nimbus
6.2 Starting the work node
/opt/apache-storm-1.0.0/bin/storm supervisor
6.3 Start Administration page
Running on the master node
/opt/apache-storm-1.0.0/bin/storm ui
Description: You need to start the service separately to each node. The admin interface will run on port 8080 of the server that started it, and the log files are in the program directory under the Logs folder. The above start-up is run in the foreground and can be run in a similar way if it needs to be run in the background nohup /opt/apache-storm-1.0.0/bin/storm nimbus &
.
CentOS under Storm 1.0.0 Cluster Installation Detailed