ZK为什么要用3.4.5,因为它支持磁盘的快照和namenode的定期删除, 避免磁盘被打满
配置:
# The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial synchronization phase can take initLimit=10 # The number of ticks that can pass between sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. # do not use /tmp for storage, /tmp here is just example sakes. dataDir=/zookeepertest/data autopurge.purgeInterval=1 # the port at which the clients will connect clientPort=2181 server.1=test:2888:3888 server.2=test1:2888:3888 server.3=test2:2888:388 dataDi ZK所有的数据都写在dataDir下面autopurge.purgeInterval autopurge.purgeInterval=1这是什么意思呢,就是每隔一小 时,它来清理dataDir里面的数据,因为ZK会产生snapshot 和binlog,产生的速度非常快,用不了几天就会把磁盘给打满, 我们一小时清理一次就可以有效的避免这个问题,清理的规则 是清理的时候它会保留最新的3个文件,当然这个3也是可以 配置的server.1=test:2888:3888 server.x 的x在myid中设置的编号下载,解压缩
scp
在主节点启动nimbus
cd /usr/local/storm mkdir logs ./bin/storm nimbus >> logs/nimbus.out 2>&1 &启动在8000端口
cd /usr/local/storm ./bin/storm logviewer >> logs/logviewer 2>&1 &在每个节点启动supervisor
cd /usr/local/storm ./bin/storm supervisor >> logs/supervisor .out 2>&1 &