64位windows安裝storm前需要先搞定zookeeper和python,所以下面我們3步走:
一、zookeeper
1、上https://zookeeper.apache.org/點擊下方download到新頁面,還得點一次中間的download,再選一個鏡像鏈接http://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ 選一個版本zookeeper-3.4.10.tar.gz下載到本地D盤
2、解壓后打開配置文件D:\zookeeper-3.4.10\conf\zoo_sample.cfg,將dataDir=/tmp/zookeeper修改為
dataDir=D:\\zookeeper\\data
dataLogDir=D:\\zookeeper\\log
並將zoo_sample.cfg重命名為zoo.cfg
3、新增環境變量ZOOKEEPER_HOME並設置為D:\zookeeper-3.4.10,在Path里新增%ZOOKEEPER_HOME%\bin。打開cmd命令行窗口,進入D:\zookeeper-3.4.10\bin執行zkServier.cmd啟動zk
二、python
1、上https://www.python.org/選Downloads->Windows->Python 2.7.13 - 2016-12-17->Download Windows x86-64 MSI installer,下載到本地
2、點擊下載的安裝包,安裝路徑選擇D:\Python27,在Path里新增
D:\Python27;D:\Python27\Scripts\;D:\Python27\Lib\site-packages\;
三、storm
1、上http://storm.apache.org/點右上角Download,點apache-storm-1.1.0.tar.gz下載到本地D盤,新增storm環境變量STORM_HOME並設置為D:\apache-storm-1.1.0,在Path里新增%STORM_HOME%\bin。
2、解壓后打開D:\apache-storm-1.1.0\bin\storm-config.cmd,新增%STORM_HOME%到如下位置:
FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
if %%a == VALUE: (
set STORM_LOG4J2_CONFIGURATION_DIR=%STORM_HOME%\%%b
del /F %CMD_TEMP_FILE%)
)
)
)
3、確保zookeeper已經起來,進入cmd命令行,在D:\apache-storm-1.1.0\bin分別執行
D:\apache-storm-1.1.0\bin>storm nimbus D:\apache-storm-1.1.0\bin>storm supervisor D:\apache-storm-1.1.0\bin>storm ui
起來后就可以到localhost:8080看東西了。storm kill用來停任務。