cdh6.3.2集成zeppelin0.10.1及简单使用

  • Post author:
  • Post category:其他




前提准备

自行安装好cdh6.3.2集群



一.集成

1.下载二进制包 https://dlcdn.apache.org/zeppelin/zeppelin-0.10.1/zeppelin-0.10.1-bin-all.tgz至目录/opt

cd /opt
wget https://dlcdn.apache.org/zeppelin/zeppelin-0.10.1/zeppelin-0.10.1-bin-all.tgz

2.解压到/opt/zeppelin目录下

mkdir /opt/zeppelin
tar -xvf zeppelin-0.10.1-bin-all.tgz -C /opt/zeppelin

在这里插入图片描述

3.在Zeppelin配置文件目录中,创建名为zeppelin-env.sh的环境文件,在其中配置Hadoop配置目录、hive的配置文件的classpath目录、Zeppelin服务器的IP地址和端口号。

cd /opt/zeppelin/conf

vim zeppelin-env.sh

export HIVE_HOME=/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hive
export JAVA_HOME=/usr/java/default
export MASTER=local[*]
export ZEPPELIN_JAVA_OPTS="-Dmaster=yarn-client -Dspark.yarn.jar=/opt/zeppelin/interpreter/spark/spark-interpreter-0.10.1.jar"
export DEFAULT_HADOOP_HOME=/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop
export SPARK_HOME=/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/spark
export HADOOP_HOME=${HADOOP_HOME:-$DEFAULT_HADOOP_HOME}
if [ -n "$HADOOP_HOME" ]; then
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HADOOP_HOME}/lib/native
fi
export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/etc/hadoop/conf}

vim zeppelin-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
        Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->

<configuration>

<property>
  <name>zeppelin.server.addr</name>
  <value>192.168.1.163</value>
  <description>Server binding address</description>
</property>

<property>
  <name>zeppelin.server.port</name>
  <value>9091</value>
  <description>Server port.</description>
</property>

</configuration>

4.将zeppelin安装目录的权限设置为777,所属群组设为root

cd /opt
chown -R root:root zeppelin/
chmod -R 777 zeppelin/

5.配置zeppelin的用户名密码

将admin这行的注释删掉。等号两边分别为用户名和密码,逗号后面设置的是权限,这里设置为zeppelin = zeppelin, admin

cd /opt/zeppelin/conf
cp shiro.ini.template shiro.ini
vim shiro.ini

在这里插入图片描述

6.启动Zeppelin

cd /opt/zeppelin
./bin/zeppelin-daemon.sh start

二.使用

1.从浏览器可以打开zeppelin:http://192.168.1.163:9091/

输入设置好的用户名/密码 zeppelin/zeppelin

2.新建note

在这里插入图片描述

3.简单查询hive里的数据

在这里插入图片描述



版权声明:本文为qq_25073261原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。