1. Download the installation package
storm.apache.org/
2. Modify the storm.yaml configuration file in the conf directory
# Note that Storm is very strict about configuration file format verification. For the following configuration items, there should be a space before each line, and a space after - and:
# they address,
storm.zookeeper.servers:
- "xx.xx.xx.xx"
storm.zookeeper.port: 2181
storm.zookeeper.root: "/storm"
Nimbus. seeds: ["host1", "host2", "host3"]
nimbus.seeds: ["xx.xx.xx.xx"]
# Data save directory
storm.local.dir: "/home/storm/nimbus/stormdata"
# For each worker computer, you can use this configuration to configure the number of worker programs running on that computer. Each worker receives messages using a single port, and this setting defines which ports are available.
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
Copy the code
The configuration of other secondary nodes in storm cluster is the same as above. The primary node and secondary node are distinguished by the start command
3. Start the cluster
Primary node: nohup./bin/storm nimbus >./nimbus.out 2> &1&
Main node UI: nohup./bin/storm UI >./ui.out 2> &1&
Slave node: nohup./bin/ Storm Supervisor >./supervisor. Out 2> &1&
The startup logs are viewed in nimbus.out, ui.out, and supervisor.out respectively. The run logs after startup are viewed in the logs directory.
4. UI interface, address: Primary node IP :8080; It is recommended to configure a domain name for each server IP address so that host is not garbled in the figure
5. Storm command is often used
/bin/storm jar package name Starts the classpath main method parameter
Lists the current run topology:./bin/storm list
Stop topology:./bin/ Storm kill Topology name
The topology runs the logs in the /logs/ worker-artifacts directory under the Supervisor service