介绍
用于做数据分析和可视化
一、二进制安装
1)下载二进制包
2)解压缩
tar -xzvf zeppelin-0.5.6-incubating-bin-all.tgz
cd zeppelin-0.5.6-incubating-bin-all
bin/zeppelin-daemon.sh start
注:默认端口是8080,若此端口被占用,到conf下
cp zeppelin-site.xml.template zeppelin-site.xml
vim zeppelin-site.xml
<property>
<name>zeppelin.server.addr</name>
<value>172.16.1.29</value>
<description>Server address</description>
</property>
<property>
<name>zeppelin.server.port</name>
<value>8080</value>
<description>Server port.</description>
</property>
修改zeppelin.server.port端口,zeppelin.server.addr默认是0.0.0.0可以不修改,也可以修改成本机ip(云服务器一定要ip addr看一下本机的ip,而不是绑定的外网ip),java版本1.7。
访问Zeppelin
localhost:8080 访问到zepplin主页。
注:1.主界面默认端口为8080,若此端口被占用,则启动会出错。可以到conf目录下
[root@public_view_databank conf]# cp zeppelin-site.xml.template zeppelin-site.xml
修改其中的参数
<property>
<name>zeppelin.server.addr</name>
<value>0.0.0.0</value>
<description>Server address</description>
</property>
<property>
<name>zeppelin.server.port</name>
<value>9090</value>
<description>Server port.</description>
</property>
修改zeppelin.server.port
Zeppelin.server.addr可以默认0.0.0.0也可以修改成本地ip
二、源码安装
1)下载源码包
Zeppelin 0.5.6-incubating:
wget http://mirror.bit.edu.cn/apache/incubator/zeppelin/0.5.6-incubating/zeppelin-0.5.6-incubating.tgz
Zeppelin 0.6.0-SNAPSHOT:
git clone https://github.com/apache/zeppelin.git
2)配置环境
# Requirements
+ Git
+ Java 1.7
+ Tested on Mac OSX, Ubuntu 14.X, CentOS 6.X, Windows 7 Pro SP1
+ Maven (if you want to build from the source code)
+ Node.js Package Manager (npm, downloaded by Maven during build phase)
# 编译环境构建
## git install
[root@gitlab-machine ~]# git version
git version 1.7.1
## install jdk
[root@gitlab-machine~]#wget http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
[root@gitlab-machine ~]# tar -zxf jdk-7u79-linux-x64.tar.gz -C /opt/
[root@gitlab-machine ~]# cd /opt/
[root@gitlab-machine opt]# ln -s jdk1.7.0_79 jdk
[root@gitlab-machine opt]# vim ~/.bash_profile 追加
export JAVA_HOME=/opt/jdk
export PATH=.:$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
[root@gitlab-machine opt]# source ~/.bash_profile
[root@gitlab-machine opt]# java -version
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
## install maven
[root@gitlab-machineopt]#wget http://www.eu.apache.org/dist/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
[root@gitlab-machine opt]# tar -zxf apache-maven-3.3.3-bin.tar.gz
[root@gitlab-machine opt]# ln -s apache-maven-3.3.3 maven
[root@gitlab-machine opt]# echo "export MAVEN_HOME=/opt/maven" >> ~/.bash_profile
[root@gitlab-machineopt]# echo "export PATH=$MAVEN_HOME/bin:$PATH:$HOME/bin" >> ~/.bash_profile
[root@gitlab-machine opt]# source ~/.bash_profile
[root@gitlab-machine opt]# mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T19:57:37+08:00)
Maven home: /opt/maven
Java version: 1.7.0_79, vendor: Oracle Corporation
Java home: /opt/jdk1.7.0_79/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-504.el6.x86_64", arch: "amd64", family: "unix"
## install node.js
yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum repolist
[root@gitlab-machine opt]# yum search nodejs npm|wc -l
21
[root@gitlab-machine opt]# sudo yum install nodejs npm --enablerepo=epel
[root@gitlab-machine opt]# node -v
v0.10.42
[root@gitlab-machine opt]# npm -v
1.3.6
[root@gitlab-machine opt]# cd /data/
## build zeppline
[root@gitlab-machine opt]# cd /data/
[root@gitlab-machinedata]#wget https://github.com/apache/zeppelin/archive/v0.5.6.zip
[root@gitlab-machine data]# unzip v0.5.6.zip
[root@gitlab-machine data]# cd zeppelin-0.5.6/
[root@gitlab-machine zeppelin-0.5.6]# nohup mvn clean package -Pspark-1.6 -Phadoop-2.6 -Pyarn -Ppyspark -DskipTests > nohup.out &
[root@gitlab-machine zeppelin-0.5.6]# jobs
[1]+ Running nohup mvn clean package -Pspark-1.6 -Phadoop-2.6 -Pyarn -Ppyspark -DskipTests > nohup.out &
参考地址:https://github.com/apache/zeppelin/
[root@gitlab-machine zeppelin-0.5.6]# tail -f nohup.out
1.Exception in thread "main" Exception: java.lang.OutOfMemoryError thrown
解决办法:
export MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512m"
2.[INFO] Zeppelin: Elasticsearch interpreter ................ SUCCESS [15:56 min]
[INFO] Zeppelin: web Application .......................... FAILURE [03:51 min]
[INFO] Zeppelin: Server ................................... SKIPPED
[INFO] Zeppelin: Packaging distribution ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20:57 min
[INFO] Finished at: 2016-06-08T02:19:40-04:00
[INFO] Final Memory: 93M/957M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:npm (npm install) on project zeppelin-web: Failed to run task: ‘npm install --color=false‘ failed. (error code 126) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :zeppelin-web
网上查找修改zeppelin-web下的pom.xml
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
</execution>
<execution>
<id>bower install</id>
<goals>
<goal>bower</goal>
</goals>
<configuration>
<arguments>--allow-root install</arguments>
</configuration>
</execution>
<execution>
<id>grunt build</id>
<goals>
<goal>grunt</goal>
</goals>
<configuration>
<arguments>--no-color --force</arguments>
</configuration>
</execution>
</executions>
</plugin>
[root@host-172-16-1-80 zeppelin-web]# npm install
[root@host-172-16-1-80 zeppelin-web]# bower –alow-root install
[root@host-172-16-1-80 zeppelin-web]# grunt –force
[root@host-172-16-1-80 zeppelin-web]# mvn install -DskipTests
启动zeppelin
[root@bigdata-redhadoop-1 src]# cd zeppelin-0.5.6-incubating
[root@bigdata-redhadoop-1 zeppelin-0.5.6-incubating]# bin/zeppelin-daemon.sh start
Log dir doesn‘t exist, create /opt/bigcrh/zeppelin/src/zeppelin-0.5.6-incubating/logs
Pid dir doesn‘t exist, create /opt/bigcrh/zeppelin/src/zeppelin-0.5.6-incubating/run
Zeppelin start [ OK ]
[root@public_view_databank ~]# jps
18710 ZeppelinServer
解释器