码迷,mamicode.com
首页 > 其他好文 > 详细

storm集群安装

时间:2015-06-03 19:53:33      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:cookie   master   

role     IP              hostname         
master: 192.168.1.147   cdh1
slave 1:192.168.1.142   cdh2
slave 2:192.168.1.143   cdh3
############################################


Install step
########################
#1.Install JDK7
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-linux-x64.tar.gz

sudo  tar zxvf jdk-7u67-linux-x64.tar.gz -C /opt/

cat >/etc/profile.d/java.sh<<EOF
export JAVA_HOME=/opt/jdk1.7.0_67
export PATH=\$PATH:\$JAVA_HOME/bin
EOF

source /etc/profile.d/java.sh
##################################

#2.Config CDH5 yum


curl -LO http://archive.cloudera.com/cdh5/one-click-install/redhat/6/x86_64/cloudera-cdh-5-0.x86_64.rpm

 
yum localinstall cloudera-cdh-5-0.x86_64.rpm -y
yum clean all -y

yum repolist

rpm --import http://archive.cloudera.com/cdh5/redhat/5/x86_64/cdh/RPM-GPG-KEY-cloudera

 

#3.Install Zookeeper


yum install zookeeper* -y


cat >/etc/zookeeper/conf/zoo.cfg <<EOF
maxClientCnxns=50
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/var/lib/zookeeper
clientPort=2181
server.1=cdh1:2888:3888
server.2=cdh2:2888:3888
server.3=cdh3:2888:3888
EOF


#4. Sync config for zookeeper


scp -r /etc/zookeeper/conf azureuser@cdh2:/etc/zookeeper/
scp -r /etc/zookeeper/conf zaureuser@cdh3:/etc/zookeeper/


#5.Initialize and start the zookeeper service


#on cdh1
/etc/init.d/zookeeper-server init --myid=1 && /etc/init.d/zookeeper-server start


#on cdh2
/etc/init.d/zookeeper-server init --myid=2 && /etc/init.d/zookeeper-server start


#on cdh3
/etc/init.d/zookeeper-server init --myid=3 && /etc/init.d/zookeeper-server start


#5. Testing
zookeeper-client -server cdh1:2181


#6. Download Zeromq


yum -y install gcc gcc-c++ git libuuid-devel uuid-devel libtool


wget http://download.zeromq.org/zeromq-4.0.4.tar.gz

 
tar zxvf zeromq-4.0.4.tar.gz


cd zeromq-4.0.4 && ./configure && make && make install


#7. Download jzmq

git clone git://github.com/nathanmarz/jzmq.git
cd jzmq && ./autogen.sh && ./configure && make && make install


#8. Install storm


wget https://github.com/downloads/nathanmarz/storm/storm-0.8.1.zip

 
unzip storm-0.8.1.zip


mv storm-0.8.1 /usr/lib/storm


cat > /etc/profile.d/storm.sh <<EOF
export STORM_HOME=/usr/lib/storm
export PATH=\$PATH:\$STORM_HOME/bin
EOF


source /etc/profile.d/storm.sh


#9. create stored directory for storm


mkdir -p /opt/storm


#10. config storm.yaml file


cat >/usr/lib/storm/conf/storm.yaml <<EOF
 storm.zookeeper.servers:
     - "cdh1"
     - "cdh2"
     - "cdh3"
 ui.port: 8081
 nimbus.host: "cdh1"
 storm.local.dir: "/opt/storm"
 supervisor.slots.ports:
    - 6700
    - 6701
    - 6702
    - 6703
EOF



#11. start nimbus on cdh1


nohup storm nimbus >/dev/null 2>&1 &


#12. start supervisor on each node


nohup storm supervisor >/dev/null 2>&1 &


#13. start ui on cdh1


nohup storm ui >/dev/null 2>&1 &


storm集群安装

标签:cookie   master   

原文地址:http://jinyan2049.blog.51cto.com/881440/1657931

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!