1.准备环境
1.1配置列表
配置项 |
版本信息 |
OS |
Red Hat Enterprise Linux Server release 5.5 (Tikanga) |
IP |
192.168.1.191/~.192/~.193 |
JDK |
java version "1.7.0_25" |
zookeeper |
zookeeper-3.3.6 |
python |
Python 2.7.3 (default, Jun 29 2015, 16:45:20) |
storm |
apache-storm-0.9.1-incubating |
maven |
Apache Maven 3.2.5 |
1.2关闭防火墙
[root@storm1 ~]# chkconfig iptables off
[root@storm1 ~]# /etc/init.d/iptables status
Firewall is stopped.
1.3添加主机映射
[root@storm1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 storm1.localdomain storm1 localhost.localdomain localhost
:: localhost6.localdomain6 localhost6
192.168.1.191 storm1.localdomain
192.168.1.192 storm2.localdomain
192.168.1.193 storm3.localdomain
2.安装JDK
2.1解压安装包
[root@storm1 usr]# pwd
/usr
[root@storm1 usr]# tar -xzvf ../u01/scr/jdk-7u25-linux-i586.tar.gz
。。。。。。
jdk1..0_25/jre/THIRDPARTYLICENSEREADME-JAVAFX.txt
jdk1..0_25/jre/bin/
jdk1..0_25/jre/bin/ControlPanel
jdk1..0_25/jre/bin/jcontrol
jdk1..0_25/jre/bin/tnameserv
jdk1..0_25/jre/bin/java
jdk1..0_25/jre/bin/javaws
jdk1..0_25/jre/bin/policytool
jdk1..0_25/jre/bin/orbd
jdk1..0_25/jre/bin/servertool
jdk1..0_25/jre/bin/java_vm
jdk1..0_25/jre/bin/keytool
jdk1..0_25/jre/bin/rmiregistry
jdk1..0_25/jre/bin/pack200
jdk1..0_25/jre/bin/unpack200
jdk1..0_25/jre/bin/rmid
jdk1..0_25/jre/COPYRIGHT
jdk1..0_25/jre/Welcome.html
jdk1..0_25/release
jdk1..0_25/COPYRIGHT
[root@storm1 usr]# ls -l
total
drwxr-xr-x root root Jun : bin
drwxr-xr-x root root Oct etc
drwxr-xr-x root root Oct games
drwxr-xr-x root root Jun : include
drwxr-xr-x uucp Jun jdk1..0_25
drwxr-xr-x root root Dec kerberos
drwxr-xr-x root root Jun : lib
drwxr-xr-x root root Jun : libexec
drwxr-xr-x root root Jun : local
drwxr-xr-x root root Jun : sbin
drwxr-xr-x root root Jun : share
drwxr-xr-x root root Jun : src
lrwxrwxrwx root root Jun : tmp -> ../var/tmp
drwxr-xr-x root root Jun : X11R6
[root@storm1 usr]# chown -R root.root jdk1..0_25/
[root@storm1 usr]# ls -l
total
drwxr-xr-x root root Jun : bin
drwxr-xr-x root root Oct etc
drwxr-xr-x root root Oct games
drwxr-xr-x root root Jun : include
drwxr-xr-x root root Jun jdk1..0_25
drwxr-xr-x root root Dec kerberos
drwxr-xr-x root root Jun : lib
drwxr-xr-x root root Jun : libexec
drwxr-xr-x root root Jun : local
drwxr-xr-x root root Jun : sbin
drwxr-xr-x root root Jun : share
drwxr-xr-x root root Jun : src
lrwxrwxrwx root root Jun : tmp -> ../var/tmp
drwxr-xr-x root root Jun : X11R6
2.2配置JDK环境
在/etc/profile文件里修改添加JAVA_HOME、PATH、CLASSPATH环境变量。
当前JDK Version:
[root@storm1 lib]# java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1. (Red Hat 4.1.-) Copyright (C) Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
调整后:
[root@storm1 lib]# vi /etc/profile
[root@storm1 lib]# cat /etc/profile |grep export |grep -v grep
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
export JAVA_HOME=/usr/jdk1..0_25
export PATH=/usr/jdk1..0_25/bin:$PATH
export CLASSPATH=.:/usr/jdk1..0_25/jre/lib:/usr/jdk1..0_25/lib
[root@storm1 lib]# source /etc/profile
[root@storm1 lib]# java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode)
其他机器同样配置。
3.安装zookeeper
3.1解压安装包
[root@storm1 usr]# tar -xzf ../u01/scr/zookeeper-3.3..tar.gz
[root@storm1 usr]# ls -l
total
drwxr-xr-x root root Jun : bin
drwxr-xr-x root root Oct etc
drwxr-xr-x root root Oct games
drwxr-xr-x root root Jun : include
drwxr-xr-x root root Jun jdk1..0_25
drwxr-xr-x root root Dec kerberos
drwxr-xr-x root root Jun : lib
drwxr-xr-x root root Jun : libexec
drwxr-xr-x root root Jun : local
drwxr-xr-x root root Jun : sbin
drwxr-xr-x root root Jun : share
drwxr-xr-x root root Jun : src
lrwxrwxrwx root root Jun : tmp -> ../var/tmp
drwxr-xr-x root root Jun : X11R6
drwxr-xr-x Jul zookeeper-3.3. [root@storm1 usr]# chown -R storm.storm zookeeper-3.3./
[root@storm1 usr]# ls -l zookeeper-3.3./
total
drwxr-xr-x storm storm Jul bin
-rw-rw-r-- storm storm Jul build.xml
-rw-rw-r-- storm storm Jul CHANGES.txt
drwxr-xr-x storm storm Jul conf
drwxr-xr-x storm storm Jul contrib
drwxr-xr-x storm storm Jul dist-maven
drwxr-xr-x storm storm Jul docs
-rw-rw-r-- storm storm Jul ivysettings.xml
-rw-rw-r-- storm storm Jul ivy.xml
drwxr-xr-x storm storm Jul lib
-rw-rw-r-- storm storm Jul LICENSE.txt
-rw-rw-r-- storm storm Jul NOTICE.txt
-rw-rw-r-- storm storm Jul README.txt
drwxr-xr-x storm storm Jul recipes
drwxr-xr-x storm storm Jul src
-rw-rw-r-- storm storm Jul zookeeper-3.3..jar
-rw-rw-r-- storm storm Jul zookeeper-3.3..jar.asc
-rw-rw-r-- storm storm Jul zookeeper-3.3..jar.md5
-rw-rw-r-- storm storm Jul zookeeper-3.3..jar.sha1
3.2调整配置并分发
[root@storm1 usr]# su - storm
[storm@storm1 ~]$ cd /usr/zookeeper-3.3./
[storm@storm1 zookeeper-3.3.]$ mkdir data
[storm@storm1 zookeeper-3.3.]$ cd conf/
[storm@storm1 conf]$ ls
configuration.xsl log4j.properties zoo_sample.cfg
[storm@storm1 conf]$ cp -rp zoo_sample.cfg zoo.cfg
[storm@storm1 conf]$ ls
configuration.xsl log4j.properties zoo.cfg zoo_sample.cfg
[storm@storm1 conf]$ vi zoo.cfg # The number of milliseconds of each tick
tickTime=
# The number of ticks that the initial
# synchronization phase can take
initLimit=
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=
# the directory where the snapshot is stored.
dataDir=/usr/zookeeper-3.3./data
# the port at which the clients will connect
clientPort=
server.=storm1.localdomain::
server.=storm2.localdomain::
server.=storm3.localdomain::
然后把配置好的 zookeeper分发到其他机器
[root@storm1 usr]# chmod a+rwx /usr
scp -rp zookeeper-3.3./ storm@storm2.localdomain:/usr
scp -rp zookeeper-3.3./ storm@storm3.localdomain:/usr
3.3创建myid文件
[storm@storm1 usr]$ cd zookeeper-3.3./data/
[storm@storm1 data]$ echo "" > myid
[storm@storm1 data]$ cat myid
[storm@storm2 usr]$ cd zookeeper-3.3./data/
[storm@storm2 data]$ echo "" > myid
[storm@storm2 data]$ cat myid
[storm@storm3 ~]$ cd /usr/
[storm@storm3 usr]$ cd zookeeper-3.3./data/
[storm@storm3 data]$ echo "" > myid
[storm@storm3 data]$ cat myid
3.4启动zookeeper集群
[storm@storm1 bin]$ pwd
/usr/zookeeper-3.3./bin
[storm@storm1 bin]$ ll
total
-rwxr-xr-x storm storm Jul README.txt
-rwxr-xr-x storm storm Jul zkCleanup.sh
-rwxr-xr-x storm storm Jul zkCli.cmd
-rwxr-xr-x storm storm Jul zkCli.sh
-rwxr-xr-x storm storm Jul zkEnv.cmd
-rwxr-xr-x storm storm Jul zkEnv.sh
-rwxr-xr-x storm storm Jul zkServer.cmd
-rwxr-xr-x storm storm Jul zkServer.sh
[storm@storm1 bin]$ ./zkServer.sh start
JMX enabled by default
Using config: /usr/zookeeper-3.3./bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[storm@storm1 bin]$ jps
QuorumPeerMain
Jps
[storm@storm1 bin]$ ./zkServer.sh status
JMX enabled by default
Using config: /usr/zookeeper-3.3./bin/../conf/zoo.cfg
Mode: follower
[storm@storm2 bin]$ ./zkServer.sh start
JMX enabled by default
Using config: /usr/zookeeper-3.3./bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[storm@storm2 bin]$ ./zkServer.sh status
JMX enabled by default
Using config: /usr/zookeeper-3.3./bin/../conf/zoo.cfg
Mode: leader
[storm@storm2 bin]$ jps
QuorumPeerMain
Jps
[storm@storm3 data]$ cd ../bin/
[storm@storm3 bin]$ ./zkServer.sh start
JMX enabled by default
Using config: /usr/zookeeper-3.3./bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[storm@storm3 bin]$ ./zkServer.sh status
JMX enabled by default
Using config: /usr/zookeeper-3.3./bin/../conf/zoo.cfg
Mode: follower
[storm@storm3 bin]$ jps
QuorumPeerMain
Jps
4.安装python
4.1解压安装包
[storm@storm1 usr]$ tar -xzf ../u01/scr/Python-2.7..tgz
[storm@storm1 usr]$ ll
total
drwxr-xr-x root root Jun : bin
drwxr-xr-x root root Oct etc
drwxr-xr-x root root Oct games
drwxr-xr-x root root Jun : include
drwxr-xr-x root root Jun jdk1..0_25
drwxr-xr-x root root Dec kerberos
drwxr-xr-x root root Jun : lib
drwxr-xr-x root root Jun : libexec
drwxr-xr-x root root Jun : local
drwxr-x--- storm storm Apr Python-2.7.
drwxr-xr-x root root Jun : sbin
drwxr-xr-x root root Jun : share
drwxr-xr-x root root Jun : src
lrwxrwxrwx root root Jun : tmp -> ../var/tmp
drwxr-xr-x root root Jun : X11R6
drwxr-xr-x storm storm Jun : zookeeper-3.3.
系统目前python版本
[storm@storm1 Python-2.7.]$ python
Python 2.4. (#, Jun , ::)
[GCC 4.1. (Red Hat 4.1.-)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
4.2源码安装python
[root@storm1 Python-2.7.]# pwd
/usr/Python-2.7.
[root@storm1 Python-2.7.]# ./configure
... ...
checking for broken nice()... no
checking for broken poll()... no
checking for struct tm.tm_zone... (cached) yes
checking for working tzset()... yes
checking for tv_nsec in struct stat... yes
checking for tv_nsec2 in struct stat... no
checking whether mvwdelch is an expression... yes
checking whether WINDOW has _flags... yes
checking for is_term_resized... yes
checking for resize_term... yes
checking for resizeterm... yes
checking for /dev/ptmx... yes
checking for /dev/ptc... no
checking for %lld and %llu printf() format support... yes
checking for %zd printf() format support... yes
checking for socklen_t... yes
checking for build directories... done
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Modules/Setup.config
config.status: creating Misc/python.pc
config.status: creating Modules/ld_so_aix
config.status: creating pyconfig.h
creating Modules/Setup
creating Modules/Setup.local
creating Makefile
[root@storm1 Python-2.7.]# make
... ...
Python build finished, but the necessary bits to build these modules were not found:
_tkinter bsddb185 sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name. Failed to build these modules:
_sqlite3 running build_scripts
creating build/scripts-2.7
copying and adjusting /usr/Python-2.7./Tools/scripts/pydoc -> build/scripts-2.7
copying and adjusting /usr/Python-2.7./Tools/scripts/idle -> build/scripts-2.7
copying and adjusting /usr/Python-2.7./Tools/scripts/2to3 -> build/scripts-2.7
copying and adjusting /usr/Python-2.7./Lib/smtpd.py -> build/scripts-2.7
changing mode of build/scripts-2.7/pydoc from to
changing mode of build/scripts-2.7/idle from to
changing mode of build/scripts-2.7/2to3 from to
changing mode of build/scripts-2.7/smtpd.py from to
/usr/bin/install -c -m ./Tools/gdb/libpython.py python-gdb.py
[root@storm1 Python-2.7.]# make install
... ...
running install_egg_info
Writing /usr/local/lib/python2./lib-dynload/Python-2.7.-py2..egg-info
if test -f /usr/local/bin/python -o -h /usr/local/bin/python; \
then rm -f /usr/local/bin/python; \
else true; \
fi
(cd /usr/local/bin; ln -s python2 python)
rm -f /usr/local/bin/python2
(cd /usr/local/bin; ln -s python2. python2)
rm -f /usr/local/bin/python2-config
(cd /usr/local/bin; ln -s python2.-config python2-config)
rm -f /usr/local/bin/python-config
(cd /usr/local/bin; ln -s python2-config python-config)
test -d /usr/local/lib/pkgconfig || /usr/bin/install -c -d -m /usr/local/lib/pkgconfig
rm -f /usr/local/lib/pkgconfig/python2.pc
(cd /usr/local/lib/pkgconfig; ln -s python-2.7.pc python2.pc)
rm -f /usr/local/lib/pkgconfig/python.pc
(cd /usr/local/lib/pkgconfig; ln -s python2.pc python.pc)
/usr/bin/install -c -m ./Misc/python.man \
/usr/local/share/man/man1/python2.7.1
现在再查看当前python版本:
[root@storm1 Python-2.7.]# python
Python 2.7. (default, Jun , ::)
[GCC 4.1. (Red Hat 4.1.-)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
其他机器执行同样的安装.
5.安装storm
5.1解压安装包
[root@storm1 usr]# pwd
/usr
[root@storm1 usr]# tar -xzf ../u01/scr/apache-storm-0.9.-incubating.tar.gz
[root@storm1 usr]# ll
total
drwxr-xr-x root root Jun : apache-storm-0.9.-incubating
drwxr-xr-x root root Jun : bin
drwxr-xr-x root root Oct etc
drwxr-xr-x root root Oct games
drwxr-xr-x root root Jun : include
drwxr-xr-x root root Jun jdk1..0_25
drwxr-xr-x root root Dec kerberos
drwxr-xr-x root root Jun : lib
drwxr-xr-x root root Jun : libexec
drwxr-xr-x root root Jun : local
drwxr-x--- storm storm Jun : Python-2.7.
drwxr-xr-x root root Jun : sbin
drwxr-xr-x root root Jun : share
drwxr-xr-x root root Jun : src
lrwxrwxrwx root root Jun : tmp -> ../var/tmp
drwxr-xr-x root root Jun : X11R6
drwxr-xr-x storm storm Jun : zookeeper-3.3.
[root@storm1 usr]# chown storm.storm -R apache-storm-0.9.-incubating/
[root@storm1 usr]# ll
total
drwxr-xr-x storm storm Jun : apache-storm-0.9.-incubating
drwxr-xr-x root root Jun : bin
drwxr-xr-x root root Oct etc
drwxr-xr-x root root Oct games
drwxr-xr-x root root Jun : include
drwxr-xr-x root root Jun jdk1..0_25
drwxr-xr-x root root Dec kerberos
drwxr-xr-x root root Jun : lib
drwxr-xr-x root root Jun : libexec
drwxr-xr-x root root Jun : local
drwxr-x--- storm storm Jun : Python-2.7.
drwxr-xr-x root root Jun : sbin
drwxr-xr-x root root Jun : share
drwxr-xr-x root root Jun : src
lrwxrwxrwx root root Jun : tmp -> ../var/tmp
drwxr-xr-x root root Jun : X11R6
drwxr-xr-x storm storm Jun : zookeeper-3.3.
5.2安装配置storm
[root@storm1 usr]# su - storm
[storm@storm1 ~]$ cd /usr/
[storm@storm1 usr]$ mv apache-storm-0.9.-incubating/ storm-0.9.
[storm@storm1 usr]$ cd storm-0.9./
[storm@storm1 storm-0.9.]$ mkdir data
[storm@storm1 storm-0.9.]$ cd conf/
[storm@storm1 conf]$ vi storm.yaml
[storm@storm1 conf]$ grep -v '^#' storm.yaml |grep -v '^$'
storm.zookeeper.servers:
- "192.168.1.191"
- "192.168.1.192"
- "192.168.1.193"
nimbus.host: "192.168.1.191"
storm.local.dir: "/usr/storm-0.9.1/data"
supervisor.slots.ports:
-
-
-
-
分发storm
scp -rp storm-0.9./ storm@storm2.localdomain:/usr
scp -rp storm-0.9./ storm@storm3.localdomain:/usr
Storm配置项:
https://github.com/nathanmarz/storm/blob/master/conf/defaults.yaml
5.3配置storm用户环境
配置STORM_HOME、PATH
[storm@storm1 usr]$ su - storm
[storm@storm1 usr]$ vi ~/.bash_profile
[storm@storm1 usr]$ cat ~/.bash_profile
# .bash_profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi # User specific environment and startup programs STORM_HOME=/usr/storm-0.9.
PATH=$PATH:$HOME/bin:$STORM_HOME/bin export STORM_HOME
export PATH
[storm@storm1 usr]$ source ~/.bash_profile
其他机器按照同样的方法配置。
5.4启动storm集群
在192.168.1.191机器上启动:
[storm@storm1 /]$ storm nimbus &
[]
[storm@storm1 /]$ Running: java -server -Dstorm.options= -Dstorm.home=/usr/storm-0.9. -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /usr/storm-0.9./lib/tools.logging-0.2..jar:/usr/storm-0.9./lib/commons-io-1.4.jar:/usr/storm-0.9./lib/objenesis-1.2.jar:/usr/storm-0.9./lib/disruptor-2.10..jar:/usr/storm-0.9./lib/jline-2.11.jar:/usr/storm-0.9./lib/jetty-util-6.1..jar:/usr/storm-0.9./lib/storm-core-0.9.-incubating.jar:/usr/storm-0.9./lib/clojure-1.4..jar:/usr/storm-0.9./lib/commons-fileupload-1.2..jar:/usr/storm-0.9./lib/commons-lang-2.5.jar:/usr/storm-0.9./lib/core.incubator-0.1..jar:/usr/storm-0.9./lib/commons-codec-1.4.jar:/usr/storm-0.9./lib/ring-servlet-0.3..jar:/usr/storm-0.9./lib/ring-devel-0.3..jar:/usr/storm-0.9./lib/logback-classic-1.0..jar:/usr/storm-0.9./lib/guava-13.0.jar:/usr/storm-0.9./lib/slf4j-api-1.6..jar:/usr/storm-0.9./lib/meat-locker-0.3..jar:/usr/storm-0.9./lib/hiccup-0.3..jar:/usr/storm-0.9./lib/log4j-over-slf4j-1.6..jar:/usr/storm-0.9./lib/httpcore-4.1.jar:/usr/storm-0.9./lib/servlet-api-2.5.jar:/usr/storm-0.9./lib/clout-1.0..jar:/usr/storm-0.9./lib/junit-3.8..jar:/usr/storm-0.9./lib/carbonite-1.3..jar:/usr/storm-0.9./lib/tools.macro-0.1..jar:/usr/storm-0.9./lib/commons-exec-1.1.jar:/usr/storm-0.9./lib/logback-core-1.0..jar:/usr/storm-0.9./lib/math.numeric-tower-0.0..jar:/usr/storm-0.9./lib/clj-stacktrace-0.2..jar:/usr/storm-0.9./lib/asm-4.0.jar:/usr/storm-0.9./lib/clj-time-0.4..jar:/usr/storm-0.9./lib/curator-framework-1.0..jar:/usr/storm-0.9./lib/jetty-6.1..jar:/usr/storm-0.9./lib/json-simple-1.1.jar:/usr/storm-0.9./lib/minlog-1.2.jar:/usr/storm-0.9./lib/commons-logging-1.1..jar:/usr/storm-0.9./lib/httpclient-4.1..jar:/usr/storm-0.9./lib/compojure-1.1..jar:/usr/storm-0.9./lib/jgrapht-core-0.9..jar:/usr/storm-0.9./lib/servlet-api-2.5-.jar:/usr/storm-0.9./lib/snakeyaml-1.11.jar:/usr/storm-0.9./lib/curator-client-1.0..jar:/usr/storm-0.9./lib/ring-jetty-adapter-0.3..jar:/usr/storm-0.9./lib/netty-3.6..Final.jar:/usr/storm-0.9./lib/reflectasm-1.07-shaded.jar:/usr/storm-0.9./lib/kryo-2.17.jar:/usr/storm-0.9./lib/joda-time-2.0.jar:/usr/storm-0.9./lib/zookeeper-3.3..jar:/usr/storm-0.9./lib/ring-core-1.1..jar:/usr/storm-0.9./lib/tools.cli-0.2..jar:/usr/storm-0.9./conf -Xmx1024m -Dlogfile.name=nimbus.log -Dlogback.configurationFile=/usr/storm-0.9./logback/cluster.xml backtype.storm.daemon.nimbus
[storm@storm1 /]$ jps
QuorumPeerMain
Jps
nimbus
在192.168.1.192机器上启动:
[storm@storm2 conf]$ storm supervisor &
[]
[storm@storm2 conf]$ Running: java -server -Dstorm.options= -Dstorm.home=/usr/storm-0.9. -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /usr/storm-0.9./lib/tools.logging-0.2..jar:/usr/storm-0.9./lib/commons-io-1.4.jar:/usr/storm-0.9./lib/objenesis-1.2.jar:/usr/storm-0.9./lib/disruptor-2.10..jar:/usr/storm-0.9./lib/jline-2.11.jar:/usr/storm-0.9./lib/jetty-util-6.1..jar:/usr/storm-0.9./lib/storm-core-0.9.-incubating.jar:/usr/storm-0.9./lib/clojure-1.4..jar:/usr/storm-0.9./lib/commons-fileupload-1.2..jar:/usr/storm-0.9./lib/commons-lang-2.5.jar:/usr/storm-0.9./lib/core.incubator-0.1..jar:/usr/storm-0.9./lib/commons-codec-1.4.jar:/usr/storm-0.9./lib/ring-servlet-0.3..jar:/usr/storm-0.9./lib/ring-devel-0.3..jar:/usr/storm-0.9./lib/logback-classic-1.0..jar:/usr/storm-0.9./lib/guava-13.0.jar:/usr/storm-0.9./lib/slf4j-api-1.6..jar:/usr/storm-0.9./lib/meat-locker-0.3..jar:/usr/storm-0.9./lib/hiccup-0.3..jar:/usr/storm-0.9./lib/log4j-over-slf4j-1.6..jar:/usr/storm-0.9./lib/httpcore-4.1.jar:/usr/storm-0.9./lib/servlet-api-2.5.jar:/usr/storm-0.9./lib/clout-1.0..jar:/usr/storm-0.9./lib/junit-3.8..jar:/usr/storm-0.9./lib/carbonite-1.3..jar:/usr/storm-0.9./lib/tools.macro-0.1..jar:/usr/storm-0.9./lib/commons-exec-1.1.jar:/usr/storm-0.9./lib/logback-core-1.0..jar:/usr/storm-0.9./lib/math.numeric-tower-0.0..jar:/usr/storm-0.9./lib/clj-stacktrace-0.2..jar:/usr/storm-0.9./lib/asm-4.0.jar:/usr/storm-0.9./lib/clj-time-0.4..jar:/usr/storm-0.9./lib/curator-framework-1.0..jar:/usr/storm-0.9./lib/jetty-6.1..jar:/usr/storm-0.9./lib/json-simple-1.1.jar:/usr/storm-0.9./lib/minlog-1.2.jar:/usr/storm-0.9./lib/commons-logging-1.1..jar:/usr/storm-0.9./lib/httpclient-4.1..jar:/usr/storm-0.9./lib/compojure-1.1..jar:/usr/storm-0.9./lib/jgrapht-core-0.9..jar:/usr/storm-0.9./lib/servlet-api-2.5-.jar:/usr/storm-0.9./lib/snakeyaml-1.11.jar:/usr/storm-0.9./lib/curator-client-1.0..jar:/usr/storm-0.9./lib/ring-jetty-adapter-0.3..jar:/usr/storm-0.9./lib/netty-3.6..Final.jar:/usr/storm-0.9./lib/reflectasm-1.07-shaded.jar:/usr/storm-0.9./lib/kryo-2.17.jar:/usr/storm-0.9./lib/joda-time-2.0.jar:/usr/storm-0.9./lib/zookeeper-3.3..jar:/usr/storm-0.9./lib/ring-core-1.1..jar:/usr/storm-0.9./lib/tools.cli-0.2..jar:/usr/storm-0.9./conf -Xmx256m -Dlogfile.name=supervisor.log -Dlogback.configurationFile=/usr/storm-0.9./logback/cluster.xml backtype.storm.daemon.supervisor
[storm@storm2 conf]$ jps
QuorumPeerMain
supervisor
Jps
在192.168.1.193机器上启动:
[storm@storm3 ~]$ storm supervisor &
[]
[storm@storm3 ~]$ Running: java -server -Dstorm.options= -Dstorm.home=/usr/storm-0.9. -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /usr/storm-0.9./lib/tools.logging-0.2..jar:/usr/storm-0.9./lib/commons-io-1.4.jar:/usr/storm-0.9./lib/objenesis-1.2.jar:/usr/storm-0.9./lib/disruptor-2.10..jar:/usr/storm-0.9./lib/jline-2.11.jar:/usr/storm-0.9./lib/jetty-util-6.1..jar:/usr/storm-0.9./lib/storm-core-0.9.-incubating.jar:/usr/storm-0.9./lib/clojure-1.4..jar:/usr/storm-0.9./lib/commons-fileupload-1.2..jar:/usr/storm-0.9./lib/commons-lang-2.5.jar:/usr/storm-0.9./lib/core.incubator-0.1..jar:/usr/storm-0.9./lib/commons-codec-1.4.jar:/usr/storm-0.9./lib/ring-servlet-0.3..jar:/usr/storm-0.9./lib/ring-devel-0.3..jar:/usr/storm-0.9./lib/logback-classic-1.0..jar:/usr/storm-0.9./lib/guava-13.0.jar:/usr/storm-0.9./lib/slf4j-api-1.6..jar:/usr/storm-0.9./lib/meat-locker-0.3..jar:/usr/storm-0.9./lib/hiccup-0.3..jar:/usr/storm-0.9./lib/log4j-over-slf4j-1.6..jar:/usr/storm-0.9./lib/httpcore-4.1.jar:/usr/storm-0.9./lib/servlet-api-2.5.jar:/usr/storm-0.9./lib/clout-1.0..jar:/usr/storm-0.9./lib/junit-3.8..jar:/usr/storm-0.9./lib/carbonite-1.3..jar:/usr/storm-0.9./lib/tools.macro-0.1..jar:/usr/storm-0.9./lib/commons-exec-1.1.jar:/usr/storm-0.9./lib/logback-core-1.0..jar:/usr/storm-0.9./lib/math.numeric-tower-0.0..jar:/usr/storm-0.9./lib/clj-stacktrace-0.2..jar:/usr/storm-0.9./lib/asm-4.0.jar:/usr/storm-0.9./lib/clj-time-0.4..jar:/usr/storm-0.9./lib/curator-framework-1.0..jar:/usr/storm-0.9./lib/jetty-6.1..jar:/usr/storm-0.9./lib/json-simple-1.1.jar:/usr/storm-0.9./lib/minlog-1.2.jar:/usr/storm-0.9./lib/commons-logging-1.1..jar:/usr/storm-0.9./lib/httpclient-4.1..jar:/usr/storm-0.9./lib/compojure-1.1..jar:/usr/storm-0.9./lib/jgrapht-core-0.9..jar:/usr/storm-0.9./lib/servlet-api-2.5-.jar:/usr/storm-0.9./lib/snakeyaml-1.11.jar:/usr/storm-0.9./lib/curator-client-1.0..jar:/usr/storm-0.9./lib/ring-jetty-adapter-0.3..jar:/usr/storm-0.9./lib/netty-3.6..Final.jar:/usr/storm-0.9./lib/reflectasm-1.07-shaded.jar:/usr/storm-0.9./lib/kryo-2.17.jar:/usr/storm-0.9./lib/joda-time-2.0.jar:/usr/storm-0.9./lib/zookeeper-3.3..jar:/usr/storm-0.9./lib/ring-core-1.1..jar:/usr/storm-0.9./lib/tools.cli-0.2..jar:/usr/storm-0.9./conf -Xmx256m -Dlogfile.name=supervisor.log -Dlogback.configurationFile=/usr/storm-0.9./logback/cluster.xml backtype.storm.daemon.supervisor
[storm@storm3 ~]$ jps
QuorumPeerMain
Jps
supervisor
5.5启动storm图形工具
在运行nimbus的机器上启动ui和logview进程。
[storm@storm1 /]$ storm ui &
[]
[storm@storm1 /]$ Running: java -server -Dstorm.options= -Dstorm.home=/usr/storm-0.9. -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /usr/storm-0.9./lib/tools.logging-0.2..jar:/usr/storm-0.9./lib/commons-io-1.4.jar:/usr/storm-0.9./lib/objenesis-1.2.jar:/usr/storm-0.9./lib/disruptor-2.10..jar:/usr/storm-0.9./lib/jline-2.11.jar:/usr/storm-0.9./lib/jetty-util-6.1..jar:/usr/storm-0.9./lib/storm-core-0.9.-incubating.jar:/usr/storm-0.9./lib/clojure-1.4..jar:/usr/storm-0.9./lib/commons-fileupload-1.2..jar:/usr/storm-0.9./lib/commons-lang-2.5.jar:/usr/storm-0.9./lib/core.incubator-0.1..jar:/usr/storm-0.9./lib/commons-codec-1.4.jar:/usr/storm-0.9./lib/ring-servlet-0.3..jar:/usr/storm-0.9./lib/ring-devel-0.3..jar:/usr/storm-0.9./lib/logback-classic-1.0..jar:/usr/storm-0.9./lib/guava-13.0.jar:/usr/storm-0.9./lib/slf4j-api-1.6..jar:/usr/storm-0.9./lib/meat-locker-0.3..jar:/usr/storm-0.9./lib/hiccup-0.3..jar:/usr/storm-0.9./lib/log4j-over-slf4j-1.6..jar:/usr/storm-0.9./lib/httpcore-4.1.jar:/usr/storm-0.9./lib/servlet-api-2.5.jar:/usr/storm-0.9./lib/clout-1.0..jar:/usr/storm-0.9./lib/junit-3.8..jar:/usr/storm-0.9./lib/carbonite-1.3..jar:/usr/storm-0.9./lib/tools.macro-0.1..jar:/usr/storm-0.9./lib/commons-exec-1.1.jar:/usr/storm-0.9./lib/logback-core-1.0..jar:/usr/storm-0.9./lib/math.numeric-tower-0.0..jar:/usr/storm-0.9./lib/clj-stacktrace-0.2..jar:/usr/storm-0.9./lib/asm-4.0.jar:/usr/storm-0.9./lib/clj-time-0.4..jar:/usr/storm-0.9./lib/curator-framework-1.0..jar:/usr/storm-0.9./lib/jetty-6.1..jar:/usr/storm-0.9./lib/json-simple-1.1.jar:/usr/storm-0.9./lib/minlog-1.2.jar:/usr/storm-0.9./lib/commons-logging-1.1..jar:/usr/storm-0.9./lib/httpclient-4.1..jar:/usr/storm-0.9./lib/compojure-1.1..jar:/usr/storm-0.9./lib/jgrapht-core-0.9..jar:/usr/storm-0.9./lib/servlet-api-2.5-.jar:/usr/storm-0.9./lib/snakeyaml-1.11.jar:/usr/storm-0.9./lib/curator-client-1.0..jar:/usr/storm-0.9./lib/ring-jetty-adapter-0.3..jar:/usr/storm-0.9./lib/netty-3.6..Final.jar:/usr/storm-0.9./lib/reflectasm-1.07-shaded.jar:/usr/storm-0.9./lib/kryo-2.17.jar:/usr/storm-0.9./lib/joda-time-2.0.jar:/usr/storm-0.9./lib/zookeeper-3.3..jar:/usr/storm-0.9./lib/ring-core-1.1..jar:/usr/storm-0.9./lib/tools.cli-0.2..jar:/usr/storm-0.9.:/usr/storm-0.9./conf -Xmx768m -Dlogfile.name=ui.log -Dlogback.configurationFile=/usr/storm-0.9./logback/cluster.xml backtype.storm.ui.core
[storm@storm1 /]$ jps
QuorumPeerMain
nimbus
Jps
core
[storm@storm1 /]$ storm logviewer &
[]
[storm@storm1 /]$ Running: java -server -Dstorm.options= -Dstorm.home=/usr/storm-0.9. -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /usr/storm-0.9./lib/tools.logging-0.2..jar:/usr/storm-0.9./lib/commons-io-1.4.jar:/usr/storm-0.9./lib/objenesis-1.2.jar:/usr/storm-0.9./lib/disruptor-2.10..jar:/usr/storm-0.9./lib/jline-2.11.jar:/usr/storm-0.9./lib/jetty-util-6.1..jar:/usr/storm-0.9./lib/storm-core-0.9.-incubating.jar:/usr/storm-0.9./lib/clojure-1.4..jar:/usr/storm-0.9./lib/commons-fileupload-1.2..jar:/usr/storm-0.9./lib/commons-lang-2.5.jar:/usr/storm-0.9./lib/core.incubator-0.1..jar:/usr/storm-0.9./lib/commons-codec-1.4.jar:/usr/storm-0.9./lib/ring-servlet-0.3..jar:/usr/storm-0.9./lib/ring-devel-0.3..jar:/usr/storm-0.9./lib/logback-classic-1.0..jar:/usr/storm-0.9./lib/guava-13.0.jar:/usr/storm-0.9./lib/slf4j-api-1.6..jar:/usr/storm-0.9./lib/meat-locker-0.3..jar:/usr/storm-0.9./lib/hiccup-0.3..jar:/usr/storm-0.9./lib/log4j-over-slf4j-1.6..jar:/usr/storm-0.9./lib/httpcore-4.1.jar:/usr/storm-0.9./lib/servlet-api-2.5.jar:/usr/storm-0.9./lib/clout-1.0..jar:/usr/storm-0.9./lib/junit-3.8..jar:/usr/storm-0.9./lib/carbonite-1.3..jar:/usr/storm-0.9./lib/tools.macro-0.1..jar:/usr/storm-0.9./lib/commons-exec-1.1.jar:/usr/storm-0.9./lib/logback-core-1.0..jar:/usr/storm-0.9./lib/math.numeric-tower-0.0..jar:/usr/storm-0.9./lib/clj-stacktrace-0.2..jar:/usr/storm-0.9./lib/asm-4.0.jar:/usr/storm-0.9./lib/clj-time-0.4..jar:/usr/storm-0.9./lib/curator-framework-1.0..jar:/usr/storm-0.9./lib/jetty-6.1..jar:/usr/storm-0.9./lib/json-simple-1.1.jar:/usr/storm-0.9./lib/minlog-1.2.jar:/usr/storm-0.9./lib/commons-logging-1.1..jar:/usr/storm-0.9./lib/httpclient-4.1..jar:/usr/storm-0.9./lib/compojure-1.1..jar:/usr/storm-0.9./lib/jgrapht-core-0.9..jar:/usr/storm-0.9./lib/servlet-api-2.5-.jar:/usr/storm-0.9./lib/snakeyaml-1.11.jar:/usr/storm-0.9./lib/curator-client-1.0..jar:/usr/storm-0.9./lib/ring-jetty-adapter-0.3..jar:/usr/storm-0.9./lib/netty-3.6..Final.jar:/usr/storm-0.9./lib/reflectasm-1.07-shaded.jar:/usr/storm-0.9./lib/kryo-2.17.jar:/usr/storm-0.9./lib/joda-time-2.0.jar:/usr/storm-0.9./lib/zookeeper-3.3..jar:/usr/storm-0.9./lib/ring-core-1.1..jar:/usr/storm-0.9./lib/tools.cli-0.2..jar:/usr/storm-0.9.:/usr/storm-0.9./conf -Xmx128m -Dlogfile.name=logviewer.log -Dlogback.configurationFile=/usr/storm-0.9./logback/cluster.xml backtype.storm.daemon.logviewer
[storm@storm1 /]$ jps
QuorumPeerMain
nimbus
Jps
logviewer
core
打开IE,输入nimbus服务所在的IP地址: