安装:

安装 zookeeper :

  • 下载 zookeeper :http://zookeeper.apache.org/releases.html#download
  • 将 zookeeper-3.4.7.tar.gz 解压到目录,/usr/local/zookeeper-3.4.7。
  • 拷贝zookeeper的conf/zoo_sample.cfg并重命名为zoo.cfg,内容修改如下:
    # 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=/usr/local/zookeeper-3.4.7/data
    # the port at which the clients will connect
    clientPort=2181
    # the maximum number of client connections.
    # increase this if you need to handle more clients
    #maxClientCnxns=60
    #
    # Be sure to read the maintenance section of the
    # administrator guide before turning on autopurge.
    #
    # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
    #
    # The number of snapshots to retain in dataDir
    #autopurge.snapRetainCount=3
    # Purge task interval in hours
    # Set to "0" to disable auto purge feature
    #autopurge.purgeInterval=1 # log dir
    dataLogDir=/usr/local/zookeeper-3.4.7/log
  • 建立zookeeper集群的myid文件

    cd /usr/local/zookeeper-3.4.7/data
    echo 1 > myid
  • 启动zookeeper

    cd /usr/local/zookeeper-3.4.7/bin
    ./zkServer.sh start

安装 storm :

  • 配置nimbus
    修改storm的/usr/local/storm-0.10.0/conf/storm.yaml文件如下:
########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "192.168.1.63"
# - "server2"
#
nimbus.host: "192.168.1.63"
#
#
# ##### These may optionally be filled in:
#
## List of custom serializations
# topology.kryo.register:
# - org.mycompany.MyType
# - org.mycompany.MyType2: org.mycompany.MyType2Serializer
#
## List of custom kryo decorators
# topology.kryo.decorators:
# - org.mycompany.MyDecorator
#
## Locations of the drpc servers
# drpc.servers:
# - "server1"
# - "server2" ## Metrics Consumers
# topology.metrics.consumer.register:
# - class: "backtype.storm.metric.LoggingMetricsConsumer"
# parallelism.hint: 1
# - class: "org.mycompany.MyMetricsConsumer"
# parallelism.hint: 1
# argument:
# - endpoint: "metrics-collector.mycompany.org"
  • 启动storm
cd /usr/local/storm-0.10.0/
./storm nimbus >/dev/null 2>&1 &
./storm supervisor >/dev/null 2>&1 &
./storm ui >/dev/null 2>&1 &

发布程序

./storm jar /home/jsecode/topology/storm-starter-0.10.0.jar storm.ykd.test.SegmentTopologyMain /home/jsecode/topology/testdata/gpsdata
  • 日志配置
    修改文件 /usr/local/storm-0.10.0/log4j2/worker.xml
<configuration monitorInterval="60">
<properties>
<property name="pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} %c{1.} [%p] %msg%n</property>
<property name="patternNoTime">%msg%n</property>
</properties>
<appenders> <RollingFile name="SegmentLog"
fileName="${sys:storm.log.dir}/gpsSegmentw.log"
filePattern="${sys:storm.log.dir}/gpsSegmentw.%i.log">
<PatternLayout>
<pattern>${pattern}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB -->
</Policies>
<DefaultRolloverStrategy max="9"/>
</RollingFile> <RollingFile name="RsLog"
fileName="${sys:storm.log.dir}/rs.log"
filePattern="${sys:storm.log.dir}/rs.%i.log">
<PatternLayout>
<pattern>${pattern}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB -->
</Policies>
<DefaultRolloverStrategy max="9"/>
</RollingFile> <RollingFile name="A1"
fileName="${sys:storm.log.dir}/${sys:logfile.name}"
filePattern="${sys:storm.log.dir}/${sys:logfile.name}.%i.gz">
<PatternLayout>
<pattern>${pattern}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB -->
</Policies>
<DefaultRolloverStrategy max="9"/>
</RollingFile>
<RollingFile name="STDOUT"
fileName="${sys:storm.log.dir}/${sys:logfile.name}.out"
filePattern="${sys:storm.log.dir}/${sys:logfile.name}.out.%i.gz">
<PatternLayout>
<pattern>${patternNoTime}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB -->
</Policies>
<DefaultRolloverStrategy max="4"/>
</RollingFile>
<RollingFile name="STDERR"
fileName="${sys:storm.log.dir}/${sys:logfile.name}.err"
filePattern="${sys:storm.log.dir}/${sys:logfile.name}.err.%i.gz">
<PatternLayout>
<pattern>${patternNoTime}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB -->
</Policies>
<DefaultRolloverStrategy max="4"/>
</RollingFile>
<Syslog name="syslog" format="RFC5424" host="localhost" port="514"
protocol="UDP" appName="[${sys:storm.id}:${sys:worker.port}]" mdcId="mdc" includeMDC="true"
facility="LOCAL5" enterpriseNumber="18060" newLine="true" exceptionPattern="%rEx{full}"
messageId="[${sys:user.name}:${sys:logging.sensitivity}]" id="storm"/>
</appenders>
<loggers> <Logger name="storm.ykd.test.bolt.SavePosdataTrackSegmentBolt" level="debug">
<AppenderRef ref="RsLog"/>
</Logger> <Logger name="storm.ykd.test" level="debug">
<AppenderRef ref="SegmentLog"/>
</Logger> <root level="info"> <!-- We log everything -->
<appender-ref ref="A1"/>
<appender-ref ref="syslog"/>
</root>
<Logger name="STDERR" level="INFO">
<appender-ref ref="STDERR"/>
<appender-ref ref="syslog"/>
</Logger>
<Logger name="STDOUT" level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="syslog"/>
</Logger>
</loggers>
</configuration>

storm在linux系统下安装调试的更多相关文章

  1. storm在windows系统下安装调试

    基础知识 Storm是一个分布式的,可靠的,容错的数据流处理系统.它会把工作任务委托给不同类型的组件,每个组件负责处理一项简单特定的任务.Storm集群的输入流由一个被称作spout的组件管理,spo ...

  2. 在Linux系统下安装大于mysql5.5版本的数据库

    linux下mysql 5.5的安装方法: 1.安装所需要系统库相关库文件      gcc等开发包,在安装linux系统的时候安装. 2.创建mysql安装目录 # mkdir -p /usr/lo ...

  3. Linux 系统下安装 rz/sz 命令及使用说明

    Linux 系统下安装 rz/sz 命令及使用说明 rz/sz命令,实现将本地的文件上传到服务器或者从服务器上下载文件到本地,但是很多Linux系统初始并没有这两个命令,以下为安装和使用的具体步骤: ...

  4. Linux 系统下安装 python-skimage

    Linux 系统下安装 python-skimage 安装必须的依赖 // python-mumpy // python-scipy // python-matplotlib $ sudo apt-g ...

  5. Linux系统下安装Redis和Redis集群配置

    Linux系统下安装Redis和Redis集群配置 一. 下载.安装.配置环境: 1.1.>官网下载地址: https://redis.io/download (本人下载的是3.2.8版本:re ...

  6. Linux系统下安装Gitlab

    Linux系统下安装Gitlab 一.简介 GitLab是利用 Ruby on Rails 一个开源的版本管理系统,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目.它拥有与 ...

  7. 在虚拟机的Linux系统下安装wineqq

    |   版权声明:本文为博主原创文章,未经博主允许不得转载. 本文参考教程:http://www.ubuntukylin.com/ukylin/forum.php?mod=viewthread& ...

  8. 【linux配置】Linux系统下安装rz/sz命令以及使用说明

    Linux系统下安装rz/sz命令以及使用说明 对于经常使用Linux系统的人员来说,少不了将本地的文件上传到服务器或者从服务器上下载文件到本地,rz / sz命令很方便的帮我们实现了这个功能,但是很 ...

  9. linux系统下安装jdk,mysql,tomcat 和redis 和jedis入门案例

    Day47笔记Linux+redis入门 Day47   知识讲解:Jedis 1.Linux上jdk,mysql,tomcat安装(看着文档安装) 准备工作: 因为JDK,TOMCAT,MYSQL的 ...

随机推荐

  1. 解决Unable to reach a settlement: [diffie-hellman-group1-sha1, diffie-hellman-group-exchange-sha1] and [curve25519-sha256@li

    SharpSSH或JSCH使用diffie-hellman-group1-sha1和diffie-hellman-group-exchange-sha1密钥交换算法,而OpenSSH在6.7p1版本之 ...

  2. hadoop之快照

    在hadoop第前几个版本中是没有快照功能的,2.x中是有这个特性的 Hadoop 2.x HDFS新特性   HDFS快照 HDFS快照     在2.x终于实现了快照     设置一个目录为可快照 ...

  3. 8.桥接模式(Bridge Pattern)

    using System; namespace ConsoleApplication6 { class Program { static void Main(string[] args) { // 创 ...

  4. ubuntu下eclipse无法启动问题

    添加-vm和对应参数 -vm/jdk安装目录/bin/java-startupplugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.j ...

  5. javascript栈的建立样码

    早上参加小孩的一年级入学前,看看相关的东东啦.. function Stack() { var items = []; this.push = function(element){ items.pus ...

  6. php session跨页面传递 session值丢失问题

    .session_start();应该尽量放置到页面的顶部: .如果php.ini里面没有配置 session Autostart的话,每次会话之前,都得手动开启session:session_sta ...

  7. Codeforces Round #Pi (Div. 2) D. One-Dimensional Battle Ships set乱搞

    D. One-Dimensional Battle ShipsTime Limit: 2 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/con ...

  8. ajax请求成功后打开新窗口地址

    转自:http://www.cnblogs.com/linjiqin/p/3148205.html jQuery.ajax({       "type":"post&qu ...

  9. QUnit使用笔记-4保持原子性与分组

    原子性: 当将许多测试用例放到一起测试的时候,可能会因为相互的副作用而出错:这个时候应该尽可能将他们分别放到test()中测试: 对应测试到Dom,应该尽可能地使用#qunit-fixture,因为它 ...

  10. 简单几何(线段相交)+模拟 POJ 3449 Geometric Shapes

    题目传送门 题意:给了若干个图形,问每个图形与哪些图形相交 分析:题目说白了就是处理出每个图形的线段,然后判断是否相交.但是读入输出巨恶心,就是个模拟题加上线段相交的判断,我第一次WA不知道输出要按字 ...