概述
一、准备工作
1.准备软件
oozie和ext2.2
2.Hadoop
3.mysql
建数据库
mysql> create database oozie;
二、安装和配置
1.上传解压oozie安装包
tar -zxvf oozie-4.1.0-cdh5.7.0.tar.gz -C /opt/modules/
2.修改hadoop里面的core-site.xml
(1)修改core-site.xml
#root替换为自己用户名
<property>
<name>hadoop.proxyuser.root.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.root.groups</name>
<value>*</value>
</property>
(2)重启hadoop集群服务
sbin/start-dfs.sh
sbin/start-yarn.sh
启动history
sbin/mr-jobhistory-daemon.sh start historyserver
3.生成libext目录,并拷贝相关的jar包
(1)oozie安装目录下
mkdir libext
(2)oozie安装目录同级目录下解压oozie-hadooplibs-4.1.0-cdh5.7.0.tar.gz
tar -zxvf oozie-hadooplibs-4.1.0-cdh5.7.0.tar.gz -C /opt/modules/
解压缩后,在/opt/modules/oozie-4.1.0-cdh5.7.0目录下会增加hadooplibs包!
(3)拷贝解压出来的jar包到{OOZIE_HOME}/libext
cp hadooplibs/hadooplib-2.6.0-cdh5.7.0.oozie-4.1.0-cdh5.7.0/* /opt/modules/oozie-4.1.0-cdh5.7.0/libext/
(4)拷贝ext-2.2.zip到{OOZIE_HOME}/libext
cp /opt/software/ext-2.2.zip libext/
(5)拷贝mysql的驱动包到{OOZIE_HOME}/libext里面
cp /opt/modules/hive-1.1.0-cdh5.7.0/lib/mysql-connector-java-5.1.27-bin.jar /opt/modules/oozie-4.1.0-cdh5.7.0/libext/
4.修改oozie配置文件 {OOZIE_HOME}/conf/oozie-site.xml
<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://hadoop:3306/oozie</value>
</property>
<property>
<name>oozie.service.JPAService.jdbc.username</name>
<value>root</value>
</property>
<property>
<name>oozie.service.JPAService.jdbc.password</name>
<value>123456</value>
</property>
** 关联HDFS
<property>
<name>oozie.service.HadoopAccessorService.hadoop.configurations</name>
<value>*=/opt/modules/hadoop-2.6.0-cdh5.7.0/etc/hadoop</value>
</property>
5、依次执行以下命令
(1)在{OOZIE_HOME},生产web工程(war)
bin/oozie-setup.sh prepare-war
(2)如果报错
unzip: command not found
是因为centOS默认没有unzip解压缩命令,所以解决是安装unzip
yum install -y unzip zip
(3)上传包到HDFS
bin/oozie-setup.sh sharelib create
-fs hdfs://hadoop:8020
-locallib oozie-sharelib-4.1.0-cdh5.7.0-yarn.tar.gz
(4)生成数据库
bin/oozie-setup.sh db create -run -sqlfile oozie.sql
结果:
setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"
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.7.0'
The SQL commands have been written to: oozie.sql
(5)检测成功生成的数据库
(a)mysql数据库中
use oozie;
show tables;
结果
mysql> show tables;
+------------------------+
| Tables_in_oozie
|
+------------------------+
| BUNDLE_ACTIONS
|
| BUNDLE_JOBS
|
| COORD_ACTIONS
|
| COORD_JOBS
|
| OOZIE_SYS
|
| OPENJPA_SEQUENCE_TABLE |
| SLA_EVENTS
|
| SLA_REGISTRATION
|
| SLA_SUMMARY
|
| VALIDATE_CONN
|
| WF_ACTIONS
|
| WF_JOBS
|
+------------------------+
12 rows in set (0.00 sec)
(b)oozie.sql文件:刚刚创建的oozie数据库中数据表的所有sql语句
cat /opt/modules/oozie-4.1.0-cdh5.7.0/oozie.sql
结果:
...
CREATE INDEX I_WF_CTNS_PENDING_AGE ON WF_ACTIONS (pending_age);
CREATE INDEX I_WF_CTNS_STATUS ON WF_ACTIONS (status);
CREATE INDEX I_WF_CTNS_WF_ID ON WF_ACTIONS (wf_id);
CREATE INDEX I_WF_JOBS_END_TIME ON WF_JOBS (end_time);
CREATE INDEX I_WF_JOBS_EXTERNAL_ID ON WF_JOBS (external_id);
CREATE INDEX I_WF_JOBS_LAST_MODIFIED_TIME ON WF_JOBS (last_modified_time);
CREATE INDEX I_WF_JOBS_PARENT_ID ON WF_JOBS (parent_id);
CREATE INDEX I_WF_JOBS_STATUS ON WF_JOBS (status);
create table OOZIE_SYS (name varchar(100), data varchar(100))
insert into OOZIE_SYS (name, data) values ('db.version', '3')
insert into OOZIE_SYS (name, data) values ('oozie.version', '4.1.0-cdh5.7.0')
6.启动服务
bin/oozied.sh start
7.测试前端页面oozie
http://hadoop:11000/oozie/
8.oozie停止脚本
bin/oozie-stop.sh
最后
以上就是苗条大船为你收集整理的oozie(1):oozie安装步骤一、准备工作二、安装和配置的全部内容,希望文章能够帮你解决oozie(1):oozie安装步骤一、准备工作二、安装和配置所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复