Install Storm0.9.2 single-host in CentOS6.4
Reference blog: Storm0.9-single (http://www.cnblogs.com/really-dt/p/3775663.html), thanks.
0. Install the dependency package
[Plain] view plaincopy
- Yuminstalluuid *
- Yuminstalllibtool
- Yuminstalllibuuid
- Yuminstalllibuuid-devel
Otherwise, an error is prompted during the installation process.
1. Install zeromq
Download the latest zeromq-4.0.4.tar.gzfrom http://download.zeromq.org.
[Plain] view plaincopy
- Tar-zxvfzeromq-4.0.4.tar.gz
- Cdzeromq-4.0.4
- ./Configure
- Make
- Makeinstall
2. Install jzmq
[Plain] view plaincopy
- Gitclonegit: // github.com/nathanmarz/jzmq.git
- Cdjzmq/
- ./Autogen. sh
- ./Configure
- Make
- Makeinstall
3. Install zookeeper
Slave.
[Plain] view plaincopy
- Tar-zxvfzookeeper-3.4.6.tar.gz
- Sudocpzookeeper-3.4.6/usr/local/
- Vim ~ /. Bashrc
- ExportZOOKEEPER_HOME =/usr/local/zookeeper-3.4.6
- ExportPATH = $ PATH: $ ZOOKEEPER_HOME/bin
- Source ~ /. Bashrc <spanstyle = "font-size: 14px;"> <strong>
- </Strong> </span>
4. install storm
From region.
[Plain] view plaincopy
- Tar-zxvfapache-storm-0.9.2-incubating.tar.gz
- Sudocpapache-storm-0.9.2-incubating/usr/local/
- Vim ~ /. Bashrc
- ExportSTORM_HOME =/usr/local/apache-storm-0.9.2-incubating
- ExportPATH = $ PATH: $ STORM_HOME/bin
- Source ~ /. Bashrc
Configure storm again:
[Plain] view plaincopy
- Vim./conf/storm. yaml)
File Content
[Plain] view plaincopy
- Storm. zookeeper. servers:
- -"Localhost"
- Storm. zookeeper. port: 2181
- Nimbus. host: "localhost"
- Storm. local. dir: "/usr/local/apache-storm-0.9.2-incubating/tmp"
- Supervisor. slots. ports:
- -6700
- -6701
- -6702
If the tmp folder in storm. local. dir does not exist, create it by yourself.
5. Test Cases
Obtain the storm-starter test code from github.
[Plain] view plaincopy
- Gitclonehttps: // github.com/nathanmarz/storm-starter.git
- Cdstorm-starter/
- Mvn-fm2-pom.xmlpackage (maven installation required)
Start the service in sequence as follows:
Start zookeeper (under the zookeeper/bin directory ). An error may occur at startup: The zookeeper-3.4.6/bin/../conf/zoo. cfg file does not exist, directly mv zoo_sample.cfg zoo. cfg.
[Plain] view plaincopy
- ./ZkServer. shstart
Start storm
[Plain] view plaincopy
- Stormnimbus
- Stormsupervisor
- Stormui
Submit Topology (under the storm-starter directory)
[Submit Topology without the Topology name, which will not be submitted to nimbus for Running]
[Plain] view plaincopy
- Stormjartarget/storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jarstorm.starter.WordCountTopology
[Submit Topology]
[Plain] view plaincopy
- Stormjar ../storm-starter/target/storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jarstorm.starter.WordCountTopologymyFirstStormApp.
Now you can view http: // localhost: 8080/on the Web interface/
Storm list to view the currently running Topology
You can view log files in the logs directory under the storm directory, includingnimbus.log,supervisor.log, Worker. log.