Ubuntu development environment to build stand-alone Storm
- View Ubuntu
- Install the JDK
- Installation Pythod
- Install Zookeeper
- Installation ZeroMQ
- Installation Jzmp
- Installation Storm
View Ubuntu is 32 or 64
uname -a
Return result ==> SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU / Linux, known as 64-bit Ubuntu
Install the JDK
# Download the 64-bit JDK
wget http://download.Oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
# Extract the JDK
tar -zxf jdk-7u79-linux-x64.tar.gz
# Set the JDK environment variables (steps 3, 4)
Step # 1: Open the profile file (/ etc / profile) or. bashrc file
I am here to edit the file .bahshrc
Excuting an order
sudo gedit ~/.bashrc
Python installation:
安装Python
#下载Python
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz
#解压python文件
tar zxf Python-2.7.2.tgz
#进入python目录
cd Python-2.7.2
#编译和安装
./configure
make
make install
Zookeeper installation:
安装Zookeeper
#下载zookeeper
wget http://apache.fayea.com/zookeeper/zookeeper-3.3.6/zookeeper-3.3.6.tar.gz
#解压zookeeper
tar zxf zookeeper-3.4.4.tar.gz
Modify the configuration file, set the environment variable.
ZeroMQ installation:
# I am here to download 4.2.1 download zeromq
http://zeromq.org/intro:get-the-software
#编译和安装
./configure
#在configure时可能会报缺包,安装即可:sudo apt-get install g++ uuid-dev
make
sudo make install
sudo ldconfig
Some people can not install some of the software primarily because of problems sources.list:
Back up:
cp /etc/apt/sources.list /etc/apt/sources.list.bak
Installation storm:
download:
https://storm.apache.org/downloads.html
安装Storm
#安装 storm
#wget https://storm.apache.org/downloads.html/
#解压 storm
tar -zxvf apache-storm-0.9.6.tar.gz
#设置环境变量
#步骤1:编辑 profile 目录
vim /etc/profile
Configuration file: ~ / .bashrc
Here are relatively easy to use:
sudo gedit /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
JZMQ installation:
I have here is a jzmq-master.zip downloaded package, and then follow the following steps may not last mvn package
下载: https://github.com/zeromq/jzmq
(1) 把 jzmq-master.zip 拷贝到zeromq目录.
unzip jzmq-master.zip
(2)
cd jzmq-jni/
./autogen.sh
./configure
make
make install
cd ..
mvn package
Profile configuration is as follows:
#export JAVA_HOME=/usr/local/jdk1.8.0_121
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/bin:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
#Zookeeper
export ZOOKEEPER_HOME=/usr/local/zookeeper-3.3.6
export PATH=$PATH:$ZOOKEEPER_HOME/bin
# set hadoop environment
export HADOOP_INSTALL=/usr/local/hadoop
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL
#storm
export STORM_HOME=/usr/local/apache-storm-1.1.0
export PATH=$PATH:$STORM_HOME/bin
Configuration zk:
zk installation directory under the conf directory
zoo_sample.cfg file
cp zoo_sample.cfg zoo.cfg
Configuring a stand-alone version here:
# 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=10
# the directory where the snapshot is stored.
dataDir=/usr/local/zookeeper-3.3.6/data
# the port at which the clients will connect
clientPort=2181
#server.1=192.168.61.128
Configuring Storm:
storm.zookeeper.servers:
- "192.168.61.128"
#nimbus.host: "192.168.61.128"
nimbus.seeds: ["192.168.61.128"]
ui.port: 9999
storm.zookeeper.port: 2181
storm.local.dir: "/usr/local/apache-storm-1.1.0/workdir"
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
192.168.61.128 is a native virtual machine address ifconfig - a to see
But the question is,
#步骤2:启动zookeeper
zkServer.sh start
zkServer.sh status #查看zkserver是否成功启动
#启动storm
#步骤1:进入storm下的bin目录
cd /home/linux/apache-storm-0.9.6/bin
#启动服务
storm nimbus
storm supervisor
storm ui
After starting the opening page has been given:
org.apache.storm.utils.NimbusLeaderNotFoundException: Could not find leader nimbus from seed hosts ["master" "slave1"]. Did you specify a valid list of nimbus hosts for config nimbus.seeds?
at org.apache.storm.utils.NimbusClient.getConfiguredClientAs(NimbusClient.java:90)
at org.apache.storm.ui.core$all_topologies_summary.invoke(core.clj:434)
at org.apache.storm.ui.core$fn__12605.invoke(core.clj:952)
at org.apache.storm.shade.compojure.core$make_route$fn__4631.invoke(core.clj:100)
at org.apache.storm.shade.compojure.core$if_route$fn__4619.invoke(core.clj:46)
at org.apache.storm.shade.compojure.core$if_method$fn__4612.invoke(core.clj:31)
at org.apache.storm.shade.compojure.core$routing$fn__4637.invoke(core.clj:113)
at clojure.core$some.invoke(core.clj:2570)
at org.apache.storm.shade.compojure.core$routing.doInvoke(core.clj:113)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invoke(core.clj:632)
Online: 1. the use of cluster installation
2. Delete zk, storm node, here the question again, simply not afford to delete, has also been given, or can not find nimbus
Increase to solve: finding the machine / etc / hosts issue, this is not configured, can not boot properly, has been annoying for several days, to get it, online approach has been said to be delete nodes, but according to the actual operation can not delete
You must be configured to restart zk restart storm OK:
It appears as follows: