Oozie的安装

查了一下Oozie翻译:驯象人,Hadoop得名来源于创始人Doug Cutting的孩子给一大象玩具取的名字,而oozie作为Hadoop上的工作流引擎,名字取得真的很贴切。
先获取oozie的版本,目前最新的是3.3.1.
http://mirror.bit.edu.cn/apache/oozie/3.3.1/
此版本需要自己build,需要先下载安装JDK, maven, hadoop, extjs libray 2.2.
我的环境:
[list]
[*]Ubuntu
[*]JDK 1.6.0_43
[*]maven 3.0.7
[*]Hadoop 1.0.4
[*]extjs 2.2 (Oozie web-console需要)
[/list]
1. Build:
./bin/mkdistro.sh -DskipTests
成功build后,会在目录里生成一个distribution.
[img]http://dl.iteye.com/upload/attachment/0082/1331/a8f8f34d-cb57-3750-8618-3b34bfb75559.png[/img]
hadoop安装时创建的hadoop组和hadoop用户对oozie目录是没有权限,所以最好一开始创建oozie组和oozie用户,同时赋予权限,不然会报错.偷懒用了root用户。新用户下记得export JAVA_HOME=<JDK安装路径>

2.安装oozie:
[*]Create a libext/ directory in the directory where Oozie was expanded.
If using a version of Hadoop bundled in Oozie hadooplibs/ , copy the corresponding Hadoop JARs from hadooplibs/ to the libext/ directory. If using a different version of Hadoop, copy the required Hadoop JARs from such version in the libext/ directory.
If using the ExtJS library copy the ZIP file to the libext/ directory.

根据官方文档在distibution的目录下(/usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1)创建libext,因为装的hadoop版本是1.0.4,所以拷贝$HADOOP_HOME/lib下的所有jar包到libext下,同时拷贝ext-2.2.zip到该目录下。
[b][color=red]还要拷贝$HADOOP_HOME下的所有jar包到libext.[/color][/b]

[*]运行oozie-setup.sh创建oozie.war

cd /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/bin
./oozie-setup.sh

成功运行后

New Oozie WAR file with added 'ExtJS library, JARs' at /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/oozie-server/webapps/oozie.war

INFO: Oozie is ready to be started


[*]拷贝oozie.war到tomcat部署目录下

root@ubuntu:/usr/local/oozie-3.3.1/webapp/src/main/webapp# cp /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/oozie.war ./


[*]修改配置oozie-site.xml,将false改成true.
vi /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/conf/oozie-site.xml

<property>
<name>oozie.service.JPAService.create.db.schema</name>
<value>[color=red]true[/color]</value>
<description>
Creates Oozie DB.

If set to true, it creates the DB schema if it does not exist. If the DB schema exists is a NOP.
If set to false, it does not create the DB schema. If the DB schema does not exist it fails start up.
</description>
</property>

[*]创建Oozie DB

cd /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/bin
./ooziedb.sh create -sqlfile oozie.sql -run

成功运行后

DONE
Check DB schema does not exist
DONE
Check OOZIE_SYS table does not exist
DONE
Create SQL schema
DONE
DONE
Create OOZIE_SYS table
DONE
Oozie DB has been created for Oozie version '3.3.1'

[*]运行oozie

cd /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/bin
./oozie-start.sh

用浏览器访问http://localhost:11000/oozie/就能看到oozie web console.
[img]http://dl.iteye.com/upload/attachment/0082/1344/f13c315f-ba57-36ee-8ac3-7e9d75e2d9e2.png[/img]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值