storm核心概念详解
This commit is contained in:
71
notes/installation/Linux下Python安装.md
Normal file
71
notes/installation/Linux下Python安装.md
Normal file
@ -0,0 +1,71 @@
|
||||
## Linux下Python安装
|
||||
|
||||
>**系统环境**:centos 7.6
|
||||
>
|
||||
>**Python版本**:Python-3.6.8
|
||||
|
||||
### 1.环境依赖
|
||||
|
||||
Python3.x的安装需要需要这四个依赖:gcc, zlib, zlib-devel, openssl-devel,这四个软件需要先进行安装
|
||||
|
||||
```shell
|
||||
yum install gcc -y
|
||||
yum install zlib -y
|
||||
yum install zlib-devel -y
|
||||
yum install openssl-devel -y
|
||||
```
|
||||
|
||||
### 2.下载编译
|
||||
|
||||
官方下载地址: https://www.python.org/downloads/
|
||||
|
||||
```shell
|
||||
# wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz
|
||||
```
|
||||
|
||||
### 3.解压编译
|
||||
|
||||
```shell
|
||||
# tar -zxvf Python-3.6.8.tgz
|
||||
```
|
||||
|
||||
进入解压后目录进行编译,可以指定编译安装的路径,这里我们指定为`/usr/app/python3.6`
|
||||
|
||||
```shell
|
||||
# cd Python-3.6.8
|
||||
# ./configure --prefix=/usr/app/python3.6
|
||||
# make && make install
|
||||
```
|
||||
|
||||
### 4.环境变量配置
|
||||
|
||||
```shell
|
||||
vim /etc/profile
|
||||
```
|
||||
|
||||
```shell
|
||||
export PYTHON_HOME=/usr/app/python3.6
|
||||
export PATH=${PYTHON_HOME}/bin:$PATH
|
||||
```
|
||||
|
||||
使得环境变量立即生效:
|
||||
|
||||
```shell
|
||||
source /etc/profile
|
||||
```
|
||||
|
||||
### 5.验证安装是否成功
|
||||
|
||||
输入python3命令,如果能进入python交互环境,则代表安装成功
|
||||
|
||||
```shell
|
||||
[root@hadoop001 app]# python3
|
||||
Python 3.6.8 (default, Mar 29 2019, 10:17:41)
|
||||
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
|
||||
Type "help", "copyright", "credits" or "license" for more information.
|
||||
>>> 1+1
|
||||
2
|
||||
>>> exit()
|
||||
[root@hadoop001 app]#
|
||||
```
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
>**系统环境**:centos 7.6
|
||||
>
|
||||
>**Spark版本**:spark-2.2.3-bin-hadoop2.6
|
||||
|
||||
|
||||
|
||||
|
102
notes/installation/Storm单机版本环境搭建.md
Normal file
102
notes/installation/Storm单机版本环境搭建.md
Normal file
@ -0,0 +1,102 @@
|
||||
# Storm单机版本环境搭建
|
||||
|
||||
|
||||
|
||||
>**storm版本**:1.2.2
|
||||
|
||||
|
||||
|
||||
<nav>
|
||||
<a href="#1安装环境要求">1.安装环境要求</a><br/>
|
||||
<a href="#2下载并解压">2.下载并解压</a><br/>
|
||||
<a href="#3配置环境变量">3.配置环境变量</a><br/>
|
||||
<a href="#4启动相关进程">4.启动相关进程</a><br/>
|
||||
<a href="#5验证是否启动成功">5.验证是否启动成功</a><br/>
|
||||
</nav>
|
||||
### 1.安装环境要求
|
||||
|
||||
按照[官方文档](http://storm.apache.org/releases/1.2.2/Setting-up-a-Storm-cluster.html)的要求:
|
||||
|
||||
> you need to install Storm's dependencies on Nimbus and the worker machines. These are:
|
||||
>
|
||||
> 1. Java 7+ (Apache Storm 1.x is tested through travis ci against both java 7 and java 8 JDKs)
|
||||
> 2. Python 2.6.6 (Python 3.x should work too, but is not tested as part of our CI enviornment)
|
||||
|
||||
storm 运行依赖于Java 7+ 和 Python 2.6.6 +,所以需要先安装以上两个软件。
|
||||
|
||||
由于以上两个软件在多个环境中都有依赖,其安装步骤单独整理至:
|
||||
|
||||
+ [Linux环境下JDK安装](https://github.com/heibaiying/BigData-Notes/blob/master/notes/installation/Linux下JDK安装.md)
|
||||
|
||||
+ [Linux环境下Python安装](https://github.com/heibaiying/BigData-Notes/blob/master/notes/installation/Linux下Python安装.md)
|
||||
|
||||
|
||||
|
||||
### 2.下载并解压
|
||||
|
||||
官方下载地址:http://storm.apache.org/downloads.html
|
||||
|
||||
下载后进行解压:
|
||||
|
||||
```shell
|
||||
# tar -zxvf apache-storm-1.2.2.tar.gz
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 3.配置环境变量
|
||||
|
||||
```shell
|
||||
# vim /etc/profile
|
||||
```
|
||||
|
||||
添加环境变量:
|
||||
|
||||
```shell
|
||||
export STORM_HOME=/usr/app/apache-storm-1.2.2
|
||||
export PATH=$STORM_HOME/bin:$PATH
|
||||
```
|
||||
|
||||
使得配置的环境变量生效:
|
||||
|
||||
```shell
|
||||
# source /etc/profile
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 4.启动相关进程
|
||||
|
||||
因为要启动多个进程,所以这里我们统一用后台进程的方式启动
|
||||
|
||||
```shell
|
||||
# 启动zookeeper
|
||||
nohup sh storm dev-zookeeper &
|
||||
# 启动主节点 nimbus
|
||||
nohup sh storm nimbus &
|
||||
# 启动从节点 supervisor
|
||||
nohup sh storm supervisor &
|
||||
# 启动UI界面 ui
|
||||
nohup sh storm ui &
|
||||
# 启动日志查看服务 logviewer
|
||||
nohup sh storm logviewer &
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 5.验证是否启动成功
|
||||
|
||||
验证方式一:jps 查看进程
|
||||
|
||||
```shell
|
||||
[root@hadoop001 app]# jps
|
||||
1074 nimbus
|
||||
1283 Supervisor
|
||||
620 dev_zookeeper
|
||||
1485 core
|
||||
9630 logviewer
|
||||
```
|
||||
|
||||
验证方式二: 访问8080端口,查看Web-UI界面
|
||||
|
||||
<div align="center"> <img width="600px" src="https://github.com/heibaiying/BigData-Notes/blob/master/pictures/storm-web-ui.png"/> </div>
|
Reference in New Issue
Block a user