一、先安装nodejs和npm,根据zeppelin-web下的pom.xml中的java
<execution>node
<id>install node and npm</id>python
<goals>git
<goal>install-node-and-npm</goal>github
</goals>web
<configuration>npm
<nodeVersion>v0.10.22</nodeVersion>frontend
<npmVersion>1.3.8</npmVersion>maven
</configuration>grunt
</execution>
来肯定要安装的版本
二、设置npm config set registry "http://registry.npmjs.org/"
三、npm install -g bower,安装完成后测试下bower是否加入环境变量
四、npm install -g grunt-cli,安装完成后测试下grunt是否加入环境变量
五、删除zeppelin-web下的pom.xml中的
<plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> <version>0.0.23</version> <executions> <execution> <id>install node and npm</id> <goals> <goal>install-node-and-npm</goal> </goals> <configuration> <nodeVersion>v0.10.22</nodeVersion> <npmVersion>1.3.8</npmVersion> </configuration> </execution> <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</arguments> </configuration> </execution> </executions> </plugin>
而后在zeppelin-web目录下依次执行
npm install,
bower --allow-root install,
grunt --no-color --force,
mvn install -DskipTests,
把web项目打包,在target目录下会生成war
六、在项目根目录下执行(根据你的需求替换版本)
mvn clean package -Pbuild-distr -Pspark-1.6 -Phadoop-2.6 -Pyarn -Ppyspark -Dhadoop.version=2.6.0-cdh5.4.2 -Pvendor-repo -DskipTests
七、完成后zeppelin-distribution找到打好的包
八、配置(黑色为必填项,红色为pyspark配置看http://my.oschina.net/ldl123292/blog/657531)
/conf/zeppelin-env.sh
export JAVA_HOME=/usr/java/jdk1.8.0_45
export SPARK_HOME=/home/spark-1.6.0-bin-hadoop2.6
export PYSPARK_PYTHON=/home/spark-1.6.0-bin-hadoop2.6/python
export PYTHONPATH=/home/spark-1.6.0-bin-hadoop2.6/python:/home/spark-1.6.0-bin-hadoop2.6/python/lib/py4j-0.9-src.zip
export MASTER=spark://hadoop02:7077
/conf/zeppelin-site.xml(修改项目端口号)
<property>
<name>zeppelin.server.port</name>
<value>8800</value>
<description>Server port.</description>
</property>
九、zeppelin-0.5.6-incubating/lib下将jackson-*-2.5.0.jar替换为jackson-*-2.4.4.jar,不替换好像是没法执行sc.textFile之类的
十、启动