在linux上,可以直接wget http://archive.apache.org/dist/oozie/4.1.0/oozie-4.1.0.tar.gz下载
下载完,可以解压出来根据自己的一些环境编译。
散仙这里的一些环境如下:
Hadoop2.2
JDK1.7
Maven3.0.5
Ant1.9.4
Hive0.13.1
Pig0.12.1
所以,需要修改在oozie的根目录下的pom文件:
1,修改JDK版本
2,如有必要可修改各个组件的版本,在跟目录下执行
grep -l "2.3.0" `find . -name "pom.xml"`
./pom.xml
./hadooplibs/hadoop-distcp-2/pom.xml
./hadooplibs/hadoop-test-2/pom.xml
./hadooplibs/hadoop-utils-2/pom.xml
./hadooplibs/hadoop-2/pom.xml
将查出来的pom文件,修改对应hadoop版本,hive,hbase,pig等组件版本
注意使用(sed -e 's/2.3.0/2.2.0/g' pom.xml 替换可能更快,但是建议自己去修改,因为改的地方并不是太多!)
注意,在4.1.0里,需要把下面这个保持成2.3.0,hadoop的版本可以是2.2.0如果,不改的话,编译Zookeeper-Scurity-Test时候,会报错
[INFO] Apache Oozie ZooKeeper Security Tests ............. FAILURE [2.204s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5:27.818s
[INFO] Finished at: Fri May 15 12:50:50 CST 2015
[INFO] Final Memory: 132M/237M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project oozie-zookeeper-security-tests: Could not resolve dependencies for project org.apache.oozie:oozie-zookeeper-security-tests:jar:4.1.0: Failed to collect dependencies for [org.apache.curator:curator-test:jar:2.5.0 (test), org.apache.hadoop:hadoop-minikdc:jar:2.2.0 (test), org.apache.oozie:oozie-core:jar:4.1.0 (test), org.apache.oozie:oozie-core:jar:tests:4.1.0 (test), org.apache.oozie:oozie-hadoop:jar:2.2.0.oozie-4.1.0 (provided), org.apache.oozie:oozie-hadoop-test:jar:2.2.0.oozie-4.1.0 (test)]: Failed to read artifact descriptor for org.apache.hadoop:hadoop-minikdc:jar:2.2.0: Could not transfer artifact org.apache.hadoop:hadoop-minikdc:pom:2.2.0 from/to Codehaus repository (http://repository.codehaus.org/): peer not authenticated -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :oozie-zookeeper-security-tests
<!-- 修改对应的hadoop的安装用户,散仙这里是search -->
<property>
<name>oozie.system.id</name>
<value>oozie-search</value>
<description>
The Oozie system ID.
</description>
</property>
<!-- 修改hadoop的conf的文件目录 -->
<property>
<name>oozie.service.HadoopAccessorService.hadoop.configurations</name>
<value>*=/home/search/hadoop/etc/hadoop</value>
<description>
Comma separated AUTHORITY=HADOOP_CONF_DIR, where AUTHORITY is the HOST:PORT of
the Hadoop service (JobTracker, HDFS). The wildcard '*' configuration is
used when there is no exact match for an authority. The HADOOP_CONF_DIR contains
the relevant Hadoop *-site.xml files. If the path is relative is looked within
the Oozie configuration directory; though the path can be absolute (i.e. to point
to Hadoop client conf/ directories in the local filesystem.
</description>
</property>
<!-- 修改oozie的share lib的HDFS目录 -->
<property>
<name>oozie.service.WorkflowAppService.system.libpath</name>
<value>/user/search/share/lib</value>
<description>
System library path to use for workflow applications.
This path is added to workflow application if their job properties sets
the property 'oozie.use.system.libpath' to true.
</description>
</property>
<!-- 修改代理用户Hue需要用到,下面这两个配置,在Hadoop的core-site.xml中,同样需要添加,代理用户提交作业功能 -->
<property>
<name>oozie.service.ProxyUserService.proxyuser.search.hosts</name>
<value>*</value>
</property>
<property>
<name>oozie.service.ProxyUserService.proxyuser.search.groups</name>
<value>*</value>
</property>