Article Directory
1. Download the installation package
Select zeppelin-0.8.1-bin-all.tgz
2. Upload the installation package
Upload to Linux opt
folder and unzip
tar -zvxf zeppelin-0.8.1-bin-all.tgz
Renamed
mv zeppelin-0.8.1-bin-all zpln
3. Modify the configuration file
- Enter
zpln
theconf
folder below
3.1 Modify zeppelin-site.xml file
mv zeppelin-site.xml.template zeppelin-site.xml
Enter file
vi zeppelin-site.xml
Modify the port number: the default is 8080, in order to avoid conflicts, modify it to other port numbers such as 8000
<property>
<name>zeppelin.server.port</name>
<value>8000</value>
<description>Server port.</description>
</property>
3.2 Modify zeppelin-env.sh file
mv zeppelin-env.sh.template zeppelin-env.sh
Add JAVA_HOME and HADOOP_CONF_DIR (specify your own java and hadoop installation directory)
vi zeppelin-env.sh
Add to
export JAVA_HOME=/opt/jdk1.8.0_221
export HADOOP_CONF_DIR=/opt/hadoop/etc/hadoop
4. Start zeppelin
Enter the bin directory to execute
./zeppelin-daemon.sh start
Visit 192.168.83.100:8000 (host ip: set port number)
Close zepplin
./zeppelin-daemon.sh stop
5. Configure hive interpreter
There is no default hive interpreter in Zepplin, but we can add it through the jdbc interpreter.
5.1 Environment and variable configuration
- Copy the hive configuration file
hive-site.xml
to zpln/conf.
cp /opt/hive/conf/hive-site.xml /opt/zpln/conf/
- Copy the jar package
Copy the following two jar packages to the interperter in the zeppelin installation directory. (The version is determined according to the version installed by yourself)
cp /opt/hadoop/share/hadoop/common/hadoop-common-2.6.0-cdh5.14.2.jar /opt/zpln/interpreter/jdbc
cp /opt/hive/lib/hive-jdbc-1.1.0-cdh5.14.2-standalone.jar /opt/zpln/interpreter/jdbc
5.2 Configure integrated hive on the web interface
- In the upper right corner anonymous --> interpreter --> +Create a new integrated environment called hive
- Set properties
default.driver org.apache.hive.jdbc.HiveDriver
default.url jdbc:hive2://192.168.42.200:10000
default.user root
Click Save and restart the hive interpreter.
- Background startup and hiveserver2
nohup hive --service hiveserver2 &
6. Use Zepplin's hive interpreter
In Zepplin, click on notebook to create a notebook through create new note.
The name can be any, and the Default Interpreter select hive.
Verify hive interpreter ( 注意,zepplin中操作hive不能有分号
)
%hive
show databases