【Oozie】安装配置Oozie

倾然丶 夕夏残阳落幕 提交于 2020-03-23 05:06:19

安装和配置Oozie

Oozie用于Hadoop的工作流配置;

参考链接:
《Install and Configure Apache Oozie Workflow Scheduler for CDH 4.X on RHEL/CentOS 6/5》
《How to Install Latest MySQL 5.7.9 on RHEL/CentOS 7/6/5 and Fedora 23/22/21》
主要内容:
  • 步骤1:安装Oozie
  • 步骤2:配置Oozie

安装Oozie

wget http://archive.cloudera.com/cdh4/one-click-install/redhat/6/x86_64/cloudera-cdh-4-0.x86_64.rpmyum --nogpgcheck localinstall cloudera-cdh-4-0.x86_64.rpmyum install oozieyum install oozie-client

配置Oozie


首先安装Mysql,可参考:
《How to Install Latest MySQL 5.7.9 on RHEL/CentOS 7/6/5 and Fedora 23/22/21》
注意点:执行 mysql_secure_installation时,应该先关闭Mysql,否则报错;
安装步骤:
wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpmyum localinstall mysql57-community-release-el6-7.noarch.rpm yum repolist enabled | grep "mysql.*-community.*"yum install mysql-community-serverservice mysqld start/stop/statusmysql --version
查看临时密码:
grep 'temporary password' /var/log/mysqld.logservice mysqld stopmysql_secure_installation
Sample Output
Securing the MySQL server deployment.Enter password for user root: Enter New Root PasswordVALIDATE PASSWORD PLUGIN can be used to test passwordsand improve security. It checks the strength of passwordand allows the users to set only those passwords which aresecure enough. Would you like to setup VALIDATE PASSWORD plugin?Press y|Y for Yes, any other key for No: yThere are three levels of password validation policy:LOW    Length >= 8MEDIUM Length >= 8, numeric, mixed case, and special charactersSTRONG Length >= 8, numeric, mixed case, special characters and dictionary                  filePlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2Using existing password for root.Estimated strength of the password: 50 Change the password for root ? ((Press y|Y for Yes, any other key for No) : yNew password: Set New MySQL PasswordRe-enter new password: Re-enter New MySQL PasswordEstimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : yBy default, a MySQL installation has an anonymous user,allowing anyone to log into MySQL without having to havea user account created for them. This is intended only fortesting, and to make the installation go a bit smoother.You should remove them before moving into a productionenvironment.Remove anonymous users? (Press y|Y for Yes, any other key for No) : ySuccess.Normally, root should only be allowed to connect from'localhost'. This ensures that someone cannot guess atthe root password from the network.Disallow root login remotely? (Press y|Y for Yes, any other key for No) : ySuccess.By default, MySQL comes with a database named 'test' thatanyone can access. This is also intended only for testing,and should be removed before moving into a productionenvironment.Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y- Dropping test database...Success.- Removing privileges on test database...Success.Reloading the privilege tables will ensure that all changesmade so far will take effect immediately.Reload privilege tables now? (Press y|Y for Yes, any other key for No) : ySuccess.All done! 
测试:
mysql -u root -p

配置Mysql相关属性:
说明:Mysql5.7 对密码的要求比较高,若是修改密码不成功,可以进行如下设置;
# mysql -uroot -pmysql> SHOW VARIABLES LIKE 'validate_password%';+--------------------------------------+--------+| Variable_name                        | Value  |+--------------------------------------+--------+| validate_password_dictionary_file    |        || validate_password_length             | 8      || validate_password_mixed_case_count   | 1      || validate_password_number_count       | 1      || validate_password_policy             | MEDIUM || validate_password_special_char_count | 1      |+--------------------------------------+--------+mysql> SET GLOBAL  validate_password_policy='LOW';  mysql> SET GLOBAL  validate_password_length=4; 

关于安全等级更详细的介绍如下
  • LOW 政策只测试密码长度。 密码必须至少有8个字符长。 MEDIUM 政策的条件 密
  • 码必须包含至少1数字字符,1 大写和小写字符,和1特别 (nonalphanumeric)字符。
  • STRONG 政策的情况 密码子字符串长度为4的或更长时间不能匹配 单词在字典文件中,如果一个人被指定。

[root@master ~]# mysql -uroot -pEnter password:Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 3Server version: 5.5.38 MySQL Community Server (GPL) by RemiCopyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> create database oozie;Query OK, 1 row affected (0.00 sec)mysql> grant all privileges on oozie.* to 'oozie'@'localhost' identified by 'oozie';Query OK, 0 rows affected (0.00 sec)mysql> grant all privileges on oozie.* to 'oozie'@'%' identified by 'oozie';Query OK, 0 rows affected (0.00 sec)mysql> exitBye
修改Oozie配置文件:
vi /etc/oozie/conf/oozie-site.xml
修改如下属性:(共4个)
<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</value></property><property><name>oozie.service.JPAService.jdbc.username</name><value>oozie</value></property><property><name>oozie.service.JPAService.jdbc.password</name><value>oozie</value></property>
说明:oozie.service.JPAService.jdbc.url 中的 localhost 实际上是“hostname”执行显示的值;

下载并安装MySQL JDBC 连接驱动JAR包到Oozie lib
[root@master oozie]# cd /tmp/[root@master tmp]# wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.31.tar.gz[root@master tmp]# tar -zxf mysql-connector-java-5.1.31.tar.gz	[root@master tmp]# cd mysql-connector-java-5.1.31[root@master mysql-connector-java-5.1.31]# cp mysql-connector-java-5.1.31-bin.jar /var/lib/oozie/
Create oozie database schema 
[root@master ~]# sudo -u oozie /usr/lib/oozie/bin/ooziedb.sh create -runSample Outputsetting OOZIE_CONFIG=/etc/oozie/confsetting OOZIE_DATA=/var/lib/ooziesetting OOZIE_LOG=/var/log/ooziesetting OOZIE_CATALINA_HOME=/usr/lib/bigtop-tomcatsetting CATALINA_TMPDIR=/var/lib/ooziesetting CATALINA_PID=/var/run/oozie/oozie.pidsetting CATALINA_BASE=/usr/lib/oozie/oozie-server-0.20setting CATALINA_OPTS=-Xmx1024msetting OOZIE_HTTPS_PORT=11443...DONEOozie DB has been created for Oozie version '3.3.2-cdh4.7.0'The SQL commands have been written to: /tmp/ooziedb-8250405588513665350.sql
安装 ExtJS lib以便在网页中浏览
[root@master ~]# cd /tmp/[root@master tmp]# wget http://archive.cloudera.com/gplextras/misc/ext-2.2.zip[root@master tmp]# unzip ext-2.2.zip[root@master tmp]# mv ext-2.2 /var/lib/oozie/
开启Oozie Server
[root@master tmp]# service oozie statusnot running.[root@master tmp]# service oozie start[root@master tmp]# service oozie statusrunning[root@master tmp]# oozie admin -oozie http://localhost:11000/oozie -statusSystem mode: NORMAL
通过web访问:http://IP:11000










易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!