storm-0.9.2 集群安装

来源:互联网 发布:sql视频教程 编辑:程序博客网 时间:2024/05/21 17:03


scp -r  bigdata@gs-server-v-127:~/storm_eco bigdata@gs-server-v-128:~/storm_eco
scp -r  bigdata@gs-server-v-127:~/storm_eco bigdata@gs-server-v-129:~/storm_eco
安装GCC
sudo yum install gcc*




# sudo yum install uuid*
# sudo yum install e2fsprogs*
# sudo yum install libuuid*
sudo yum install update-rc.d 








1. 安装python2.7.2
============================
# wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz
cd ~/storm_eco/python
# tar zxvf Python-2.7.2.tgz
# cd Python-2.7.2
# ./configure
# make 
# make install
# sudo vi /etc/ld.so.conf
--
文件末尾追加
/usr/local/lib
--


#sudo ldconfig
============================




4. 安装storm
============================
# http://mirror.bit.edu.cn/apache/incubator/storm/apache-storm-0.9.2-incubating/
cd ~/storm_eco/storm
tar zxvf apache-storm-0.9.1-incubating.tar.gz


mv apache-storm-0.9.1-incubating storm-0.9.1
mkdir $STORM_HOME/workdir


vi storm.yaml


vi $STORM_HOME/conf/storm.yaml
# vi ~/.bashrc
--
追加
 export STORM_HOME=/usr/local/storm-0.7.1
 export PATH=$PATH:$STORM_HOME/bin
--
============================




storm.zookeeper.servers:
- "10.200.200.56"
- "10.200.200.57"
- "10.200.200.58"


storm.local.dir: "$STORM_HOME/workdir"
nimbus.host: "10.200.200.56"


supervisor.slots.ports:
    - 6700
    - 6701
    - 6702
    - 6703


scp -r  bigdata@gs-server-v-127:~/storm_eco/storm/storm-0.9.2 bigdata@gs-server-v-128:~/storm_eco/storm/
scp -r  bigdata@gs-server-v-127:~/storm_eco/storm/storm-0.9.2 bigdata@gs-server-v-129:~/storm_eco/storm/


scp -r  bigdata@gs-server-v-127:/home/bigdata/storm_test/md.log bigdata@gs-server-v-128:/home/bigdata/storm_test/
scp -r  bigdata@gs-server-v-127:/home/bigdata/storm_test/md.log bigdata@gs-server-v-129:/home/bigdata/storm_test/
scp -r  bigdata@gs-server-v-128:/home/bigdata/profile bigdata@gs-server-v-127:/etc/profile


scp -r  bigdata@gs-server-v-127:/etc/profile bigdata@gs-server-v-128:/home/bigdata/
================================================================
启动


Nimbus 在Nimbus机器上运行bin/storm nimbus&
Supervisor 在每台工作机器上运行bin/storm supervisor&, supervisor负责启动和终止工作机器上的工作进程。
UI storm UI是一个可以查看storm运行状态的的一个网站,通过bin/storm ui&运行,访问地址: http://{nimbus.host}:8080/。


storm jar /home/bigdata/storm_hellworld-1.0-SNAPSHOT-jar-with-dependencies.jar com.gridsum.stormdemo.TopologyMain /home/bigdata/storm_test/md.log
$STORM_HOME/bin/storm jar /home/bigdata/storm_hellworld-1.0-SNAPSHOT.jar com.gridsum.stormdemo.TopologyMain /home/bigdata/storm_test/md.log
$STORM_HOME/bin/storm kill Count-Word-Topology-With-Refresh-Cache






$STORM_HOME/bin/storm jar /home/bigdata/storm_hellworld-1.0-SNAPSHOT-jar-with-dependencies.jar com.gridsum.stormdemo.TopologyMain /home/bigdata/mdtest/input2.log


本地执行:
mvn exec:java -Dexec.mainClass=”TopologyMain” -Dexec.args=”src/main/resources/md.log


http://ifeve.com/getting-started-with-storm-2/




http://tomcat.apache.org/download-70.cgi
http://localhost:8080/webtest/stormtest/send.jsp
http://localhost:8080/webtest/stormtest/view.jsp


zadd count_FilteredObjects 2 FilteredObjects
zadd count_ParsedObjects 5 ParsedObjects
zadd count_FilteredObjects 10 FilteredObjects
flushall


String inputPath = "/home/bigdata/mdtest/md.log";
String outputPath = "/home/bigdata/storm_test/md.log";


mvn install
reimport




wget http://download.redis.io/releases/redis-2.8.7.tar.gz
$REDIS_HOME/src/redis-server&


 <dependency>
            <groupId>org.apache.storm</groupId>
            <artifactId>storm-core</artifactId>
            <version>0.9.2-incubating</version>
            <!-- keep storm out of the jar-with-dependencies -->
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>2.1.0</version>
            <scope>compile</scope>
        </dependency>


        <dependency>
            <artifactId>md-logreader</artifactId>
            <groupId>com.gridsum.md</groupId>
            <version>1.0-SNAPSHOT</version>
        </dependency>

keys


lrange "count_FilteredObjects" 0 -1


zrange count_FilteredObjects 0 -1 withscores
zrange count_ParsedObjects 0 -1 withscores
ParsedObjects


export PATH=$JAVA_HOME/bin:$PATH 
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar


sudo cp src/redis-server /usr/local/bin
sudo cp src/redis-cli /usr/local/bin




openjdk
0 0
原创粉丝点击