Azkaban安装部署
在root的用户下搭建的
• Azkaban安装部署(可参照:http://azkaban.github.io/azkaban/docs/latest/)
1):前提 安装JDK,安装Hadoop,Hive客户端环境
2):前提 安装 git 的命令 :apt-get install git
3):把github的azkaban源码下载
命令:git clone https://github.com/azkaban/azkaban.git
4)进入azkaban
然后命令: vim azkaban-common/src/main/java/azkaban/jobExecutor/ProcessJob.java
最后将final boolean isExecuteAsUser = this.sysProps.getBoolean(EXECUTE_AS_USER, true);
true修改false (修改它之后,下载五个不会出错)
进行azkaban路径
==》运行这句话会生成5个压缩包
命令:./gradlew distTar
azkaban-db-3.37.0-10-gdd67b02.tar.gz
azkaban-exec-server-3.37.0-10-gdd67b02.tar.gz
azkaban-hadoop-security-plugin-3.37.0-10-gdd67b02.tar.gz
azkaban-solo-server-3.37.0-10-gdd67b02.tar.gz
azkaban-web-server-3.37.0-10-gdd67b02.tar.gz
这个5包是分别放在azkaban-*/build/distributions/*下
是在当前azkaban文件夹下,那么先把5包拷贝出来,放到/opt/azkaban-jar文件夹
命令:cp azkaban-*/build/distributions/*.tar.gz /opt/azkaban-tar
把这五个包解压,然后重命令 ,把这个5包放到另外的路径下/opt/azkaban/
它们分别都在azkaban-db, azkaban-exec-server,azkaban-hadoop,azkaban-solo-server,azkaban-web-server
5):MySql
安装mysql命令: apt-get install mysql-server 密码 自定义
运行mysql的命令 : mysql -uroot -p
数据数据库命令 : create database azkaban;
打开某个数据库 : use azkaban;
将azkaban sql表结构导入mysql : source /opt/azkaban/azkaban-db/create-all-sql-3.37.0-10-gdd67b02.sql
6):部署 azkaban-web-server
将/opt/azkaban/azkaban-solo-server下的conf目录拷贝到/opt/azkaban/azkaban-web-server目录,
命令: cp -r /opt/azkaban/azkaban-solo-server/conf /opt/azkaban/azkaban-web-server/conf
配置azkaban.properties
azkaban.properties的配置 记得自己登录的mysql密码
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
# Azkaban Personalization Settings
azkaban.name=Test
azkaban.label=My Local Azkaban
azkaban.color=#FF3601
azkaban.default.servlet.path=/index
web.resource.dir=web/
default.timezone.id=America/Los_Angeles
# Azkaban UserManager class
user.manager.class=azkaban.user.XmlUserManager
user.manager.xml.file=conf/azkaban-users.xml
# Loader for projects
#executor.global.properties=conf/global.properties
azkaban.project.dir=projects
database.type=mysql
mysql.port=3306
mysql.host=localhost
mysql.database=azkaban
mysql.user=root
mysql.password=zhu
mysql.numconnections=100
# Velocity dev mode
velocity.dev.mode=false
# Azkaban Jetty server properties.
jetty.use.ssl=false
jetty.maxThreads=25
jetty.port=8081
# Azkaban Executor settings
executor.maxThreads=50
executor.port=12321
executor.flow.threads=30
# JMX stats
jetty.connector.stats=true
executor.connector.stats=true
azkaban.native.lib=false
配置log4j.properties
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
log4j.rootLogger=INFO,C
log4j.appender.C=org.apache.log4j.ConsoleAppender
log4j.appender.C.Target=System.err
log4j.appender.C.layout=org.apache.log4j.PatternLayout
log4j.appender.C.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
7):部署 azkaban-exec-server
将/opt/azkaban/azkaban-solo-server下的conf目录拷贝到/opt/azkaban/azkaban-exec-server目录,
命令: cp -r /opt/azkaban/azkaban-solo-server/conf /opt/azkaban/azkaban-exec-server/conf
配置azkaban.properties
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
# Azkaban Personalization Settings
default.timezone.id=Asia/Shanghai
# Loader for projects
executor.global.properties=conf/global.properties
azkaban.project.dir=projects
database.type=mysql
mysql.port=3306
mysql.host=localhost
mysql.database=azkaban
mysql.user=root
mysql.password=zhu
mysql.numconnections=100
# Azkaban Executor settings
executor.maxThreads=50
executor.port=12321
executor.flow.threads=30
# JMX stats
jetty.connector.stats=true
executor.connector.stats=true
# Azkaban plugin settings
azkaban.jobtype.plugin.dir=plugins/jobtypes
azkaban.native.lib=false
配置log4j.properties
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
log4j.rootLogger=INFO,C
log4j.appender.C=org.apache.log4j.ConsoleAppender
log4j.appender.C.Target=System.err
log4j.appender.C.layout=org.apache.log4j.PatternLayout
log4j.appender.C.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
8):hadoop-common-2.8.1.jar,derby.jar
找到之前配置的hadoop文件夹 找到 hadoop-common-2.8.1.jar
配置hadoop文件夹路径/share/hadoop/common/路径找下找的 hadoop-common-2.8.1.jar
derby.jar
/usr/local/jdk1.8.0_144/db/lib/derby.jar
找到hadoop-common-2.8.1.jar和derby.jar包都拷贝到azkaban-exec-server和azkaban-web-server
安装目录下的extlib目录,没有则创建一个
找不到就下载
9):启动web-server和exec-server
进入azkaban-exec-server目录,执行bin/azkaban-executor-start.sh
进入azkaban-web-server目录,执行bin/azkaban-web-start.sh
启动成功否它都会产生进程
通过http://localhost:8081可访问到web-ui,可以开始创建任务,
访问是需要的用户名密码在 azkaban-web-server/conf/azkaban-users.xml 配置