您的位置:首页 > 其它

storm0.9.2集群的搭建

2016-05-07 23:57 309 查看
用到的软件

hadoop-2.6.2

jdk1.8.0_65

kafka_2.9.2-0.8.1.1

zookeeper-3.4.6

storm-0.9.2

zeromq-4.0.4

jzmq

python

ant

GCC

步骤

搭建zookeeper集群

安装storm依赖库

下载并解压storm

修改storm.yaml配置文件

启动storm各个进程

安装ant

yum -y install ant

安装gcc

yum -y install gcc

yum -y install gcc-c++

安装python

yum -y install python-devel

安装storm依赖包



安装zeromq
cd zeromq-4.0.4
chmod +x configure
chmod +x *.sh

./configure

make

make install(用root用户)

安装jzmq
cd jzmq

chmod +x configure
chmod +x *.sh

./configure
make
make install(用root用户)

如果make时报错:jzmq ../../../libtool: line 827: X--tag=CXX: command not found
则:rm libtool; ln -s /urs/lib/libtool libtool; 再make

安装解压storm,配置环境变量,保存环境变量

vi /etc/profile
export STROM_HOME=/home/wyz/storm-0.9.2
export PATH=$PATH:$STORM_HOME/bin

source /etc/profile

修改配置文件storm.yaml
cd /home/wyz/storm-0.9.2-incubating/conf

vim storm.yaml

########### These MUST be filled in for a storm configuration

storm.zookeeper.servers:

- "slave01"

- "slave02"

- "slave03"

# - "10.162.219.53"

# - "10.162.219.52"

#

nimbus.host: "master01"

storm.local.dir: "/home/wyz/storm-0.9.2-incubating/topology"

#ui.port: "18080"

supervisor.slots.ports:

- 6701

- 6702

- 6703

- 6704

# - 6705

# - 6706

# - 6707

# - 6708

# - 6709

# - 6710

修改权限

chmod +x /home/wyz/storm-0.9.2-incubating/bin/*

chmod +x bin/*

启动Storm(在此之前要启动Zookeeper)

storm nimbus &
storm supervisor &
storm ui &

或者

nohup storm nimbus >> logs/nimbus.log 2>&1 &

nohup storm supervisor >> logs/supervisor.log 2>&1 &

nohup storm ui >> logs/ui.log 2>&1 &

启动后可以通过http://{nimbus host}:8080 在windows的浏览器上查看

到此storm的安装完成

启动如果碰到错误:
normclasspath = cygpath if sys.platform == 'cygwin' else identity
原因分析:
python2.4
python2.6
版本问题,需要指定用2.6版本,方法:
rm /usr/bin/python
ln -s /usr/local/bin/python2.6 /usr/bin/python

扩展成一个Strom集群的方法
将shaka/storm下的软件包完全一样的拷贝到新的机器上
配置文件不需要修改
因为要共用zk和nimbus

配置环境变量(同上)

启动supervisro &的方法
storm supervisor &

启动后可以通过http://{nimbus host}:8080 在windows的浏览器上查看

到此集群版的storm的安装完成。
一个集群模式的storm搭建起来了!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: