黑猴子的家:Oozie编译源码

1、修改/etc/hosts

得到ip地址,写到/etc/hosts文件里
[root@node1 opt]# ping repository.cloudera.com
[root@node1 opt]# vim /etc/hosts
34.204.243.96 repository.cloudera.com

2、安装jdk 1.8.44

https://www.jianshu.com/p/b37c70d61e2a

3、安装maven 3.3.9

https://www.jianshu.com/p/8bfefcc0cf10

4、下载oozie 源码

http://oozie.apache.org/

5、解压oozie 源码

[root@hadoop102 software]# tar -xzvf oozie-4.3.1.tar.gz -C /opt/module/

6、编辑oozie 的pom.xml文件

  慎重修改,不要一下子改很多,有的jar在中央maven仓,没有
[root@hadoop102 software]# cd /opt/module/oozie-4.3.1/
[root@hadoop102 oozie-4.3.1]# vim oozie-4.3.1/pom.xml  

7、下载依赖

[root@hadoop102 repository]# echo ${MAVEN_REPO}
/opt/module/apache-maven-3.3.9/m2/repository

pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar

mkdir -p ${MAVEN_REPO}/org/pentaho/pentaho-aggdesigner-algorithm/5.1.5-jhyde
cd ${MAVEN_REPO}/org/pentaho/pentaho-aggdesigner-algorithm/5.1.5-jhyde
wget http://repo.spring.io/plugins-release/org/pentaho/pentaho-aggdesigner-algorithm/5.1.5-jhyde/pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar

doxia-module-twiki-1.0-alpha-9.2y.jar

mkdir -p ${MAVEN_REPO}/org/apache/maven/doxia/doxia-module-twiki/1.0-alpha-9.2y                  
cd ${MAVEN_REPO}/org/apache/maven/doxia/doxia-module-twiki/1.0-alpha-9.2y                    
wget https://repository.cloudera.com/content/repositories/releases/org/apache/maven/doxia/doxia-module-twiki/1.0-alpha-9.2y/doxia-module-twiki-1.0-alpha-9.2y.jar --no-check-certificate

doxia-core-1.0-alpha-9.2y.jar

mkdir -p ${MAVEN_REPO}/org/apache/maven/doxia/doxia-module-twiki
cd ${MAVEN_REPO}/org/apache/maven/doxia/doxia-module-twiki
wget https://repository.cloudera.com/content/repositories/releases/org/apache/maven/doxia/doxia-core/1.0-alpha-9.2y/doxia-core-1.0-alpha-9.2y.jar --no-check-certificate

8、pig安装

http://pig.apache.org/

[root@hadoop102 software]# tar -xzvf pig-0.16.0.tar.gz -C /opt/module/
[root@hadoop102 software]# vim  /etc/profile
##PIG_HOME
export PIG_HOME=/opt/module/pig-0.16.0
export PATH=$PATH:$PIG_HOME/bin

[root@hadoop102 software]# source /etc/profile
[root@hadoop102 pig-0.16.0]# pig -info

9、编译oozie

注意编译命令后面有很多组件版本,请注意版本匹配问题和默认的版本。很容易在中央仓库中找不到对应版本的jar包。
bin/mkdistro.sh -Phadoop-2  -DskipTests(成功)
/opt/module/oozie-4.3.1/distro/target/oozie-4.3.1-distro.tar.gz

cd oozie-4.3.0
bin/mkdistro.sh  -DskipTests -Puber -Phadoop-2 \
-Dhadoop.version=2.7.2 \
-Dhadoop.auth.version=2.7.2 \
-Ddistcp.version=2.7.2 \
-Dsqoop.version=1.4.3 \
-Dhive.version=1.2.0 \
-Dhbase.version=0.94.7

你可能感兴趣的:(黑猴子的家:Oozie编译源码)