前言

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

  环境 

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. vue同意本站协议的制作

    <!doctype html> <html> <head> <meta charset="UTF-8"> <title> ...

  2. PTA 1154 Vertex Coloring

    题目链接:1154 Vertex Coloring A proper vertex coloring is a labeling of the graph's vertices with colors ...

  3. URL的‘#’号

    转载自:传送门 去年9月,twitter改版. 一个显著变化,就是URL加入了"#!"符号.比如,改版前的用户主页网址为 http://twitter.com/username 改 ...

  4. 协程分析之context上下文切换

    协程现在已经不是个新东西了,很多语言都提供了原生支持,也有很多开源的库也提供了协程支持. 最近为了要给tbox增加协程,特地研究了下各大开源协程库的实现,例如:libtask, libmill, bo ...

  5. bash 特殊符号的含义

    bash常见特殊符号及含义 linux中shell变量的含义解释

  6. vuejs基础-v-for用法

    Vue指令之v-for和key属性 迭代数组 <ul> <li v-for="(item, i) in list">索引:{{i}} --- 姓名:{{it ...

  7. MySQL安装教程并使用springboot2和Mybatis测试

    目录 MySQL是什么 MySQL安装 开始使用一下MySQL 用spring boot2+Mybatis试试MySQL 创建数据库和表 拉通spring boot2+mybatis MySQL是什么 ...

  8. python学习三十三天函数匿名函数lambda用法

    python函数匿名函数lambda用法,是在多行语句转换一行语句,有点像三元运算符,只可以表示一些简单运算的,lambda做一些复杂的运算不太可能.分别对比普通函数和匿名函数的区别 1,普通的函数用 ...

  9. spring bean-- autowired的正确用法

    这两天用idea写spring注入的时候每一次 @Autowired Worker worker; 都会报黄,用过这个ide的都知道,说明你代码需要重构了. 然后提示的信息是 Spring Team ...

  10. mpvue 微信小程序半屏弹框(half-screen-dialog)

    <template> <div> <a @click="isShow">half-screen-dialog</a> <!-- ...