oozie4.2.0配置运行

oozie4.2.0配置运行
1: 发布包生成后,拷贝$OOZIE_HOME/distor/target/oozie-4.2.0-distro.tar.gz至任意目录解压缩
2: 进入oozie-4.2.0/conf目录,vim oozie-env.sh 看着里面变量根据注释按需解锁...
3: 进入oozie-4.2.0/conf目录,vim oozie-site.xml 进行配置,简单配置如下:
     < property >
       
< name > oozie.service.JPAService.create.db.schema </ name >
       
< value > true </ value >
    
</ property >

    
< property >
       
< name > oozie.service.JPAService.jdbc.driver </ name >
       
< value > com.mysql.jdbc.Driver </ value >
    
</ property >

    
< property >
       
< name > oozie.service.JPAService.jdbc.url </ name >
       
< value > jdbc:mysql: // localhost:3306/oozie?createDatabaseIfNotExist=true</value>
     </ property >

    
< property >
       
< name > oozie.service.JPAService.jdbc.username </ name >
       
< value > root </ value >
    
</ property >

    
< property >
       
< name > oozie.service.JPAService.jdbc.password </ name >
       
< value > mysql201 </ value >
    
</ property >

    
< property >
       
< name > oozie.service.HadoopAccessorService.hadoop.configurations </ name >
       
< value >*=/ home / hadoop / hadoop - 2.6 . 2 / etc / hadoop </ value >
    
</ property >

    
< property >
       
< name > oozie.service.JPAService.pool.max.active.conn </ name >
       
< value > 10 </ value >
    
</ property >
详细配置信息见oozie-default.xml.reference
4:在oozie-4.2.0根目录下创建libext ---> mkdir -p libext
5:  拷贝ext-2.2.zip包到libext目录下
6:拷贝hadoop相关包到libext目录下---> cp $HADOOP_HOME/share/hadoop/*/*.jar libext/
                                                       cp $HADOOP_HOME/share/hadoop/*/lib/*.jar libext/
7:  拷贝mysql驱动到libext目录下
8:把hadoop与tomcat冲突jar包去掉,我修改了oozie的pom文件下载的是tomcat7
     mv servlet-api-2.5.jar servlet-api-2.5.jar.bak 
     mv jsp-api-2.1.jar jsp-api-2.1.jar.bak
     mv jasper-compiler-5.5.23.jar jasper-compiler-5.5.23.jar.bak
     mv jasper-runtime-5.5.23.jar jasper-runtime-5.5.23.jar.bak
9:按照官网说明依次执行
     $OOZIE_HOME/bin/oozie-setup.sh prepare-war
     $OOZIE_HOME/bin/oozie-setup.sh sharelib create -fs hdfs://localhost:9000   --这里的url改成你的fs.default.name的value值
     $OOZIE_HOME/bin/ooziedb.sh create -sqlfile oozie.sql -run
     $OOZIE_HOME/bin/oozied.sh start
检测状态:$OOZIE_HOME/bin/oozie admin -oozie http://localhost:11000/oozie -status

执行第9步的oozie-setup.sh sharelib create -fs hdfs://localhost:9000    hadoop需正常运行

严重说明。。第6步拷贝hadoop相关包到libext目录下,有个问题,如果采用hadoop2系列,那么用的是yarn,拷贝的时候需要去掉mapreduced1里面mr1的jar包,否则oozie运行时会出现奇葩问题。切记切记!!~

你可能感兴趣的:(oozie4.2.0配置运行)