Twitter Storm安装配置(单机版)笔记
本篇幅讲述Twitter Storm安装配置,也作为自己的笔记。
storm的官方安装说明(e文):https://github.com/nathanmarz/storm/wiki/Setting-up-a-Storm-cluster
storm的安装分为单机版和集群版,只是配置稍微有点区别,大致一样。
要使用storm首先要安装以下工具:
python、zookeeper、zeromq、jzmq、storm
第一步,安装Python2.7.2
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz
tar zxvf Python-2.7.2.tgz
cd Python-2.7.2
./configure
make
make install
vi /etc/ld.so.conf
追加/usr/local/lib/
sudo ldconfig
第二步,安装zookeeper
wget http://labs.mop.com/apache-mirror/zookeeper/zookeeper-3.3.5/zookeeper-3.3.5.tar.gz
tar -zxvf zookeeper-3.3.5.tar.gz
cp -R zookeeper-3.3.5 /usr/local/
ln -s /usr/local/zookeeper-3.3.5/ /usr/local/zookeeper
vim /etc/profile (设置ZOOKEEPER_HOME和ZOOKEEPER_HOME/bin)
export ZOOKEEPER_HOME="/path/to/zookeeper"
export PATH=$PATH:$ZOOKEEPER_HOME/bin
cp /usr/local/zookeeper/conf/zoo_sample.cfg /usr/local/zookeeper/conf/zoo.cfg (用zoo_sample.cfg制作$ZOOKEEPER_HOME/conf/zoo.cfg)
mkdir /tmp/zookeeper
mkdir /var/log/zookeeper
zookeeper的单机安装已经完成了。
第三步,安装zeromq以及jzmq
jzmq的安装貌似是依赖zeromq的,所以应该先装zeromq,再装jzmq。
1)安装zeromq:
wget http://download.zeromq.org/zeromq-2.2.0.tar.gz
tar zxf zeromq-2.2.0.tar.gz
cd zeromq-2.2.0
./configure
make
make install
sudo ldconfig (更新LD_LIBRARY_PATH)
zeromq安装完成。
注意:如有有依赖报错,需要安装:
jzmq dependencies 依赖包
sudo yum install uuid*
sudo yum install libtool
sudo yum install libuuid
sudo yum install libuuid-devel
2)安装jzmq
yum install git
git clone git://github.com/nathanmarz/jzmq.git
cd jzmq
./autogen.sh
./configure
make
make install
然后,jzmq就装好了.
注意:在./autogen.sh这步如果报错:autogen.sh:error:could not find libtool is required to run autogen.sh,这是因为缺少了libtool,可以用#yum install libtool*来解决