当前位置: 首页 > 工具软件 > Zeppelin > 使用案例 >

Zeppelin源码编译指南

公良同
2023-12-01

依赖安装及配置

操作系统:ubuntu 20.04

CPU架构:x86_64

安装依赖:

sudo apt-get update
sudo apt-get install git openjdk-8-jdk npm libfontconfig r-base-dev r-cran-evaluate

安装maven

wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz

sudo tar -zxf apache-maven-3.6.3-bin.tar.gz -C /usr/local/
sudo ln -s /usr/local/apache-maven-3.6.3/bin/mvn /usr/local/bin/mvn

npm国内源配置

npm config set registry https://registry.npm.taobao.org

源码下载

git clone https://github.com/apache/zeppelin.git

编译修改

进入zeppelin目录

cd zeppelin

zeppelin在进行zeppelin-web模块编译时,会使用到bower模块,默认下载方式会出现下载超时的问题,下面提供两种方法进行修改。

如果你本地无法配置代理,建议直接使用镜像加速方法。

bower配置代理

修改zeppelin-web/.bowerrc文件,新增代理设置:

其中proxy以及https-proxy设置为你本地配置的代理

{
  "directory": "bower_components",
  "json": "bower.json"
}

改为:

{
  "directory": "bower_components",
  "json": "bower.json",
  "proxy": "http://127.0.0.1:10809",
  "https-proxy": "http://127.0.0.1:10809"
}

镜像加速

在zeppelin-web/package.json文件中新增:

"devDependencies" : {
   "bower-nexus3-resolver" : "*"
}

将zeppelin-web/.bowerrc文件改为:

{
  "directory": "bower_components",
  "json": "bower.json",
  "registry" : {
    "search" : [ "http://home.lrting.top:38081/repository/bower-public/" ]
   },
 "resolvers" : [ "bower-nexus3-resolver" ]
}

源码编译

mvn clean package -Pbuild-distr

编译完成之后,即可在

zeppelin-distribution/target目录下得到如下安装包

xiaozhch5@ubuntu:~/zeppelin$ ll zeppelin-distribution/target/
total 1522408
drwxrwxr-x 6 xiaozhch5 xiaozhch5       4096 Oct 13 23:18 ./
drwxrwxr-x 4 xiaozhch5 xiaozhch5       4096 Oct 13 23:17 ../
drwxrwxr-x 2 xiaozhch5 xiaozhch5       4096 Oct 13 23:17 archive-tmp/
drwxrwxr-x 2 xiaozhch5 xiaozhch5       4096 Oct 13 23:17 classes/
drwxrwxr-x 3 xiaozhch5 xiaozhch5       4096 Oct 13 23:17 maven-shared-archive-resources/
-rw-rw-r-- 1 xiaozhch5 xiaozhch5         30 Oct 13 23:17 .plxarc
drwxrwxr-x 3 xiaozhch5 xiaozhch5       4096 Oct 13 23:17 zeppelin-0.10.1-SNAPSHOT/
-rw-rw-r-- 1 xiaozhch5 xiaozhch5 1558910346 Oct 13 23:18 zeppelin-0.10.1-SNAPSHOT.tar.gz

更多大数据资料参考:

从大数据到人工智能

 类似资料: