oozie的安装配置

1.下载oozie

http://archive.cloudera.com/cdh5/cdh/5/oozie-4.1.0-cdh5.5.2.tar.gz

解压到指定路径 /usr/local/

tar -xvf oozie-4.1.0-cdh5.5.0-sdh.tar.gz 

2.修改配置文件

修改oozie/conf/oozie-site.xml

    
        oozie.service.JPAService.jdbc.driver
        com.mysql.jdbc.Driver
    

    
        oozie.service.JPAService.jdbc.url
        jdbc:mysql://172.17.0.2:3306/oozie?createDatabaseIfNotExist=true
    

    
        oozie.service.JPAService.jdbc.username
        root
    

    
        oozie.service.JPAService.jdbc.password
        LIU123!@
    
    
        oozie.service.HadoopAccessorService.hadoop.configurations
        *=/opt/hadoop/hadoop-2.6.0/etc/hadoop/
    

3.移动oozie.war

将编译好的oozie.war移动到oozie/oozie-server/webapps/文件夹下

4.生成oozie数据库相关的表

#执行命令

[root@81f67f1e0f0c oozie]# bin/ooziedb.sh create -sqlfile oozie.sql -run DB Connection


  setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"
  setting OOZIE_LOG=/var/log/sdh-oozie

Validate DB Connection
DONE
Check DB schema does not exist
DONE
Check OOZIE_SYS table does not exist
DONE
Create SQL schema
DONE
Create OOZIE_SYS table
DONE

Oozie DB has been created for Oozie version '4.1.0-cdh5.5.0'


The SQL commands have been written to: oozie.sql

5.启动运行

(1)开启示例

bin/oozied.sh start

(2)运行oozie

bin/oozied.sh run

(3)可能出现下面的错误

(1)REASON: java.lang.NoClassDefFoundError: org/apache/hadoop/util/ReflectionUtils

(2)REASON: java.lang.NoClassDefFoundError: org/apache/hadoop/mapred/JobConf

(3)REASON: org.apache.oozie.service.ServiceException: E0103: Could not load service classes, Cannot load JDBC driver class 'com.mysql.jdbc.Driver'

需要添加依赖包

将oozie/libext/文件jia夹下的所有jar包移动到lib下

cp * oozie/oozie-server/webapps/oozie/WEB-INF/lib

会出现如下界面

oozie的安装配置_第1张图片

解决办法将oozie/libext/ext-2.2.zip解压到oozie-server/webapps/oozie/

unzip ext-2.2.zip

重新启动打开浏览器则出现

oozie的安装配置_第2张图片

你可能感兴趣的:(hadoop)