標籤:
上次實現了flume+kafka+hbase+ELK:http://www.cnblogs.com/super-d2/p/5486739.html
這次我們可以加上storm:
storm-0.9.5簡單配置如下:
安裝依賴
wget http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gztar zxvf jdk-8u45-linux-x64.tar.gzcd jdk-8u45-linux-x64sudo vi /etc/profile添加如下內容:export JAVA_HOME=/home/dir/jdk1.8.0_45export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport PATH=$PATH:$JAVA_HOME/bin
安裝 Python
sudo apt-get install python
安裝 zookeeper
wget http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gztar -xzvf zookeeper-3.4.6.tar.gzchown -R root:root zookeeper-3.4.6cd zookeeper-3.4.6cp conf/zoo_sample.cfg conf/zoo.cfgsudo vi /etc/profile添加如下內容:export ZOOKEEPER_HOME=/home/dir/Downloads/zookeeper-3.4.6export PATH=$ZOOKEEPER_HOME/bin:$PATH
View Code
安裝storm
wget http://www.apache.org/dyn/closer.cgi/storm/apache-storm-0.9.5/apache-storm-0.9.5.tar.gztar zxvf apache-storm-0.9.5.tar.gzcd apache-storm-0.9.5sudo vi /etc/profile添加如下內容:export STORM_HOME=/home/dir/Downloads/apache-storm-0.9.5export PATH=$STORM_HOME/bin:$PATH
使環境變數生效
source /etc/profile
修改storm配置
vi conf/storm.yaml修改如下:storm.zookeeper.servers: - "127.0.0.1"# - "server2"storm.zookeeper.port: 2181 //zookeeper連接埠預設就是 2181nimbus.host: "127.0.0.1"# # storm.local.dir: "/home/dir/storm"ui.port: 8088
啟動storm
先要啟動 zookeeper
zkServer.sh start啟動 nimbusstorm nimbus >/dev/null 2>&1 &啟動 supervisorstorm supervisor >/dev/null 2>&1 &啟動 uistorm ui >/dev/null 2>&1 &jps 命令可以看到29929 nimbus17754 core20714 Jps30222 supervisorui 啟動後 可以在瀏覽器 查看結果localhost:8088/index.html
View Code
運行 wordcount example
cd examples/storm-starter提交任務storm jar storm-starter-topologies-0.9.5.jar storm.starter.WordCountTopology wordcountTop殺掉topology命令storm kill wordcountTop
大資料平台架構(flume+kafka+hbase+ELK+storm+redis+mysql)