前言

真是后知后觉,最近忙也要学习,把以前丢的都要拾起来。原理懂不懂也把环境搭起来学习。

  环境 

centos7

jdk 1.8

zookeeper 3.4.13

storm 1.2.2

安装

    1.zookeeper安装

         我装了三台虚拟机,配置如下:

jdk配置

vi /etc/profile

#java config
export JAVA_HOME=/opt/jdk/jdk1..0_201
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

设置静态ip

vi /etc/sysconfig/network-scripts/ifcfg-ens33 

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=--454f--d09dfde88267
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.5.201/202/203
GATEWAY=192.168.5.1
DNS1=114.114.114.114
DNS2=8.8.8.8

设置hosts,方便使用

vi /etc/hosts

192.168.5.201 centos01
192.168.5.202 centos02
192.168.5.203 centos03

机器配置好了,我们开始安装zookeeper

vi zoo.cfg

# The number of milliseconds of each tick
tickTime=
# The number of ticks that the initial
# synchronization phase can take
initLimit=
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/opt/zookeeper/data
# the port at which the clients will connect
clientPort=
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=
#
# 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=
# Purge task interval in hours
# Set to "" to disable auto purge feature
#autopurge.purgeInterval=
server.=centos01::
server.=centos02::
server.=centos03::
vi /etc/profile

# zookeeper
export ZK_HOME=/opt/zookeeper/zookeeper-3.4.
export PATH=$ZK_HOME/bin:$PATH

           2.storm安装

nimbus上的配置

########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "centos01"
- "centos02"
- "centos03"
#
# nimbus.seeds: ["host1", "host2", "host3"]
#
#
# ##### These may optionally be filled in:
storm.local.dir: "/usr/data/storm"
supervisor.slots.ports:
- 6700
- 6701
- 6702
nimbus.host: "centos01" ## 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:
- "centos01"
# - "server2"
worker.childopts: "-Xmx2048m"

supervisor上的配置

########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "centos01"
- "centos02"
- "centos03"
#
# nimbus.seeds: ["host1", "host2", "host3"]
#
#
# ##### These may optionally be filled in:
storm.local.dir: "/usr/data/storm"
supervisor.slots.ports:
- 6700
- 6701
- 6702
nimbus.host: "centos01" ## 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:
- "centos01"
# - "server2"
worker.childopts: "-Xmx2048m"
## Metrics Consumers
## max.retain.metric.tuples
## whitelist / blacklist
## - you can specify multiple whitelist / blacklist with regular expression
## expandMapType: expand metric with map type as value to multiple metrics
## - set to true when you would like to apply filter to expanded metrics
## - default value is false which is backward compatible value
## - only effective when expandMapType is set to true
# topology.metrics.consumer.register:
- "centos02"
- "centos03"
#
# nimbus.seeds: ["host1", "host2", "host3"]
#
#
# ##### These may optionally be filled in:
storm.local.dir: "/usr/data/storm"
supervisor.slots.ports:
- 6700
- 6701
- 6702
nimbus.host: "centos01" ## 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:
- "centos01"
# - "server2"
worker.childopts: "-Xmx2048m"
vi /etc/profile

# storm
export STORM_HOME=/opt/apache-storm-1.2.
export PATH=${STORM_HOME}/bin:$PATH

配置好后,我们开始启动吧!

先启动zookeeper

zkServer.sh start

[root@centos03 bin]# zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper/zookeeper-3.4./bin/../conf/zoo.cfg
Mode: leader

再启动storm

nimbus上启动

./storm nimbus >> /dev/null &
storm drpc >> /dev/null &
storm ui >> /dev/null & supervisor上启动 storm supervisor >> /dev/null &

在我实体电脑上访问http://192.168.5.201:8080时找不到网页,是防火墙的事

firewall-cmd --zone=public --add-port=/tcp --permanent

firewall-cmd --reload

好了!

centos7下安装storm步骤的更多相关文章

  1. linux系统,在centos7环境下安装jdk步骤

    记录一下安装jdk1.8版本的出错过程: 按照这个博客内容安装的,以及修改文件权限博客 [Linux]CentOS7下安装JDK详细过程 [Linux]目录文件权限的查看和修改[转] 1.安装的jdk ...

  2. centOS7下安装GUI图形界面

    1.如何在centOS7下安装GUI图形界面 当你安装centOS7服务器版本的时候,系统默认是不会安装GUI的图形界面程序,这个需要手动安装CentOS7 Gnome GUI包. 2.在系统下使用命 ...

  3. docker(一) Centos7下安装docker

    docker(一) Centos7下安装dockerdocker(二) windows10下安装dockerdocker(三) 镜像和容器常用命令 docker(四) 使用Dockerfile构建镜像 ...

  4. centos7下安装指定版本mysql5.7.23

    现在mysql版本已经到MySQL 8.0(GA)稳定版本了,所以需求是想简单又快速在centos7下安装指定版本例如MySQL 5.7(GA)版本有下面这种方法 首先需要到mysql官网这里下载对应 ...

  5. CentOS7 下安装 iSCSI Target(tgt) ,使用 Ceph rbd

    目录 一.iSCSI 介绍 1. iSCSI 定义 2. 几种常见的 iSCSI Target 3. 优缺点比较 二.安装步骤 1. 关闭防火墙 2. 关闭selinux 3. 通过 yum 安装 t ...

  6. Docker学习之Centos7下安装

    Docker学习之Centos7下安装 centos7 64下直接使用yum安装docker环境,步骤如下: 卸载旧版本docker sudo yum remove docker docker-com ...

  7. 【python3】——centos7下安装

    centos7下安装python3总步骤分三步: 一.依赖解决: 1.安装依赖包: yum install zlib-devel bzip2-devel openssl-devel ncurses-d ...

  8. centos7下安装zookeeper&zookeeper集群的搭建

    一.centos7下安装zookeeper 1.zookeeper 下载地址 https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ 2.安装步骤 ...

  9. CentOS7 下 安装 supervisor以及使用

    CentOS7 下 安装 supervisor 以及使用 手动安装 [注] linux环境必须安装 python 1.获取supervisor包:[https://pypi.python.org/py ...

随机推荐

  1. css content属性

    content 属性与 :before 及 :after 伪元素配合使用,来插入生成内容. 用于定义元素之前或之后放置的生成内容.默认地,这往往是行内内容,不过该内容创建的框类型可以用属性 displ ...

  2. leetcode 141. 环形链表(C++)

    给定一个链表,判断链表中是否有环. 为了表示给定链表中的环,我们使用整数 pos 来表示链表尾连接到链表中的位置(索引从 0 开始). 如果 pos 是 -1,则在该链表中没有环. 示例 1: 输入: ...

  3. WPF样式统一之DevExpress设置窗体,控件为Office风格

    DevExpress相信不少人用过,虽然人家不是免费的,但是用过的应该都知道,确实是花了心血的C#插件,下面来介绍下在DevExpress下如何统一设置自己的WPF程序为经典Windows风格. 窗体 ...

  4. Vulnhub渗透测试练习(一) ----------Breach1.0

    教程网址 https://www.freebuf.com/articles/system/171318.html 学习经验总结 1.使用jre的bin目录下的keytool命令来输入秘钥库口令进而获取 ...

  5. 正则表达式从入门到放弃「Java」

    正则表达式能做什么? 正则表达式可以用来搜索.编辑或处理文本. 「都懂它可以处理文本,可到底是怎么回事?」 正则表达式的定义 百度百科:正则表达式是对字符串操作的一种逻辑公式,就是用事先定义好的一些特 ...

  6. mybatis多对多

    这里我们以用户 user 表和 角色role 表为例,假定一个用户能被分配成多重角色,而一种角色也能分给多个用户,故用户和角色构成多对多的关系 需求:给定角色id,查询这个角色所属的所有用户信息 ①. ...

  7. 3. ZooKeeper客户端(一)

    ZooKeeper常用客户端有三种:原生客户端.zkClient.curator 项目中使用前,需要导入相关依赖 <dependencies> <dependency> < ...

  8. springcloud费话之配置中心基础(SVN)

    目录: springcloud费话之Eureka基础 springcloud费话之Eureka集群 springcloud费话之Eureka服务访问(restTemplate) springcloud ...

  9. k3 cloud中库存转移处理

     有个苗木基地的苗木要转移到另一个,是做那个单据 解决办法:两个基地是同一组织  做直接调拨单就行了 ,不同组织做调拨申请单,然后做 分布式调出  分布式调入

  10. java crm 系统 进销存 springmvc SSM项目项目源码

    统介绍: 1.系统采用主流的 SSM 框架 jsp JSTL bootstrap html5 (PC浏览器使用) 2.springmvc +spring4.3.7+ mybaits3.3  SSM 普 ...