概述
1.进入/opt目录下解压缩
tar -zxvf oozie-4.2.0.tar.gz
2.oozie-4.2.0目录下新建libext 目录并拷贝相关jar包到目录
cp $HADOOP_HOME/share/hadoop/*/*.jar libext/
cp $HADOOP_HOME/share/hadoop/*/lib/*.jar libext/
并把mysql-connector-java-5.1.25-bin.jar、ext-2.2.zip也拷贝到libext目录
3.把hadoop与tomcat冲突jar包去掉
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
4.配置oozie-site.xml文件
<configuration>
<property>
<name>oozie.service.ProxyUserService.proxyuser.hadoop.hosts</name>
<value>*</value>
<description>
List of hosts the '#USER#' user is allowed to perform 'doAs'
operations.
The '#USER#' must be replaced with the username o the user who is
allowed to perform 'doAs' operations.
The value can be the '*' wildcard or a list of hostnames.
For multiple users copy this property and replace the user name
in the property name.
</description>
</property>
<property>
<name>oozie.service.ProxyUserService.proxyuser.hadoop.groups</name>
<value>*</value>
<description>
List of groups the '#USER#' user is allowed to impersonate users
from to perform 'doAs' operations.
The '#USER#' must be replaced with the username o the user who is
allowed to perform 'doAs' operations.
The value can be the '*' wildcard or a list of groups.
For multiple users copy this property and replace the user name
in the property name.
</description>
</property>
<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://bigdata03:3306/oozielast?createDatabaseIfNotExist=true&autoReconnect=true</value>
</property>
<property>
<name>oozie.service.JPAService.jdbc.username</name>
<value>oozie</value>
</property>
<!--设置系统库存放在hdfs中,注意只有在job.properties中将设置oozie.use.system.libpath=true才会引用系统库注意,下面ns1是namenode的逻辑名称,根据自己集群的情况进行更改即可,${user.name}用户名-->
<property>
<name>oozie.service.WorkflowAppService.system.libpath</name>
<value>hdfs://ns1/user/${user.name}/share/lib_4.2</value>
</property>
<property>
<name>oozie.servlet.CallbackServlet.max.data.len</name>
<value>200000</value>
</property>
<property>
<name>oozie.service.JPAService.jdbc.password</name>
<value>oozie</value>
</property>
<property>
<name>oozie.service.HadoopAccessorService.hadoop.configurations</name>
<value>*=/home/hadoop/hadoop-2.6.0/etc/hadoop</value>
</property>
<property>
<name>oozie.service.SparkConfigurationService.spark.configurations</name>
<value>*=/home/hadoop/spark-1.5.1-bin-hadoop2.6/conf</value>
</property>
<!-- timezone configuration -->
<property>
<name>oozie.processing.timezone</name>
<value>GMT+0800</value>
</property>
<property>
<name>oozie.email.smtp.host</name>
<value>smtp.163.com</value>
</property>
<property>
<name>oozie.email.smtp.port</name>
<value>25</value>
</property>
<property>
<name>oozie.email.from.address</name>
<value>liuwb_007@163.com</value>
</property>
<property>
<name>oozie.email.smtp.auth</name>
<value>true</value>
</property>
<property>
<name>oozie.email.smtp.username</name>
<value>liuwb_007@163.com</value>
</property>
<property>
<name>oozie.email.smtp.password</name>
<value>liuwb123</value>
</property>
<property>
<name>yarn.app.mapreduce.am.command-opts</name>
<value>-Xmx4096m -Djava.io.tmpdir=./tmp -verbose:class</value>
</property>
</configuration>
https://github.com/forezp/SpringCloudLearning
<property>
<name>hadoop.proxyuser.root.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.root.groups</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.trustfar.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.trustfar.groups</name>
<value>*</value>
</property>
5.修改hadoop core-site.xm;
<property>
<name>hadoop.proxyuser.root.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.root.groups</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.trustfar.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.trustfar.groups</name>
<value>*</value>
</property>
6.配置环境变量
export OOZIE_HOME=/opt/oozie-4.2.0
export OOZIE_CONFIG=/opt/oozie-4.2.0/conf
export PATH=$PATH:$OOZIE_HOME/bin
7.启动前的初始化
a. 打war包
bin/oozie-setup.sh prepare-war
b. 初始化数据库
bin/ooziedb.sh create -sqlfile oozie.sql -run
c. 修改oozie-4.2.0/oozie-server/conf/server.xml文件,注释掉下面的记录
<!--<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />-->
d. 在oozie-4.2.0目录下有一个 oozie-sharelib-4.2.0.tar.gz。使用tar -zxvf oozie-sharelib-4.2.0.tar.gz将它解压。解压出后是一个share目录。进入到share/lib/sqoop中。将sqoop-1.4.6.jar去掉(我这边改成sqoop-1.4.6.jar.bak)。
将mysql-connector-java-5.1.35.jar复制到/opt/oozie-4.2.0/share/lib/sqoop目录中。如果没有这个jar,将不能从mysql将数据导入或导出。
e,将这个share上传到hdfs上:
hdfs dfs -put /opt/oozie-4.2.0/share/user/trustfar
8.启动oozie
bin/oozie-start.sh
查看启动状态
oozie admin -oozie http://localhost:11000/oozie -status
如果是System model:Normal,表明启动成功,否则失败。
浏览器页面访问http://ip:11000/oozie/
关闭oozie
bin/oozie-stop.sh
最后
以上就是虚心乌龟为你收集整理的oozie4.2.0安装的全部内容,希望文章能够帮你解决oozie4.2.0安装所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复