git clone https://github.com/azkaban/azkaban.git
vim azkaban-common/src/main/java/azkaban/jobExecutor/ProcessJob.java
231行
将final boolean isExecuteAsUser = this.sysProps.getBoolean(EXECUTE_AS_USER, true); 里面的true修改为false
#编译,
./gradlew distTar
#最后会显示:BUILD SUCCESSFUL
#把相应的tar包复制出来,这五个是用得到的
mv azkaban/azkaban-db/build/distributions/azkaban-db-3.91.0-361-g3eb607f.tar.gz /export
mv azkaban/azkaban-exec-server/build/distributions/azkaban-exec-server-3.91.0-361-g3eb607f.tar.gz /export
mv azkaban/azkaban-solo-server/build/distributions/azkaban-solo-server-3.91.0-361-g3eb607f.tar.gz /export
mv azkaban/azkaban-hadoop-security-plugin/build/distributions/azkaban-hadoop-security-plugin-3.91.0-361-g3eb607f.tar.gz /export
mv azkaban/azkaban-web-server/build/distributions/azkaban-web-server-3.91.0-361-g3eb607f.tar.gz /export
#解压tar包
tar zxf azkaban-db-3.91.0-361-g3eb607f.tar.gz
tar zxf azkaban-exec-server-3.91.0-361-g3eb607f.tar.gz
tar zxf azkaban-hadoop-security-plugin-3.91.0-361-g3eb607f.tar.gz
tar zxf azkaban-solo-server-3.91.0-361-g3eb607f.tar.gz
tar zxf azkaban-web-server-3.91.0-361-g3eb607f.tar.gz
#修改下目录名
mv azkaban-web-server-3.91.0-361-g3eb607f azkaban-web
mv azkaban-db-3.91.0-361-g3eb607f azkaban-db
mv azkaban-exec-server-3.91.0-361-g3eb607f azkaban-exec
mv azkaban-solo-server-3.91.0-361-g3eb607f azkaban-solo
mv azkaban-hadoop-security-plugin-3.91.0-361-g3eb607f azkaban-hadoop
#复制插件到web
cp -a /export/azkaban-solo/plugins/ /export/azkaban-web
CREATE DATABASE azkaban;
use azkaban;
--sql文件在刚才编译后的azkaban-db目录里,all的应该只有一个。
source /export/azkaban-db/create-all-sql-3.91.0-361-g3eb607f.sql;
cd azkaban-web/
keytool -keystore keystore -alias jetty -genkey -keyalg RSA
输入密钥库口令: #123456
再次输入新口令: #123456
您的名字与姓氏是什么? #直接回车
[Unknown]:
您的组织单位名称是什么? #直接回车
[Unknown]:
您的组织名称是什么? #直接回车
[Unknown]:
您所在的城市或区域名称是什么? #直接回车
[Unknown]:
您所在的省/市/自治区名称是什么? #直接回车
[Unknown]:
该单位的双字母国家/地区代码是什么? #输入 CN
[Unknown]: CN
CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=CN是否正确?
[否]: Y #输入 Y
输入 的密钥口令
(如果和密钥库口令相同, 按回车): #直接回车
Warning:
JKS 密钥库使用专用格式。建议使用 "keytool -importkeystore -srckeystore keystore -destkeystore keystore -deststoretype pkcs12" 迁移到行业标准格式 PKCS12。
完成上述工作后,将在当前目录生成 keystore 证书文件,将keystore 考贝到 azkaban web服务器根目录中,由于我目前在web server目录中,就不用复制了;
**注意:**修改Linux服务器时区,可以date看下是不是当前时间,不是的话执行以下命令
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
====azkaban web服务器配置conf=
azkaban.properties
# Azkaban Personalization Settings
azkaban.name=test
azkaban.label=test
azkaban.color=#FF3601
azkaban.default.servlet.path=/index
#修改-写自己的绝对路径
web.resource.dir=/export/azkaban-web/web
#修改-设置时区
default.timezone.id=Asia/Shanghai
# Azkaban UserManager class
user.manager.class=azkaban.user.XmlUserManager
#修改-写自己的绝对路径
user.manager.xml.file=/export/azkaban-web/conf/azkaban-users.xml
# Loader for projects
executor.global.properties=/export/azkaban-web/conf/global.properties
azkaban.project.dir=projects
# Velocity dev mode
velocity.dev.mode=false
# Azkaban Jetty server properties.
jetty.maxThreads=25
jetty.port=8081
# 修改-新增
jetty.ssl.port=8443
jetty.keystore=/export/azkaban-web/keystore
jetty.password=123456
jetty.keypassword=123456
jetty.truststore=/export/azkaban-web/keystore
jetty.trustpassword=123456
# Project Manager settings
#project.temp.dir=/temp
#project.version.retention=3
# Azkaban Executor settings
# 修改-新增
executor.port=12321
# mail settings
mail.sender=
mail.host=
job.failure.email=
job.success.email=
lockdown.create.projects=false
cache.directory=cache
# JMX stats
jetty.connector.stats=true
executor.connector.stats=true
# 修改-新增
# Azkaban plugin settings
azkaban.jobtype.plugin.dir=/export/azkaban-web/plugins/jobtypes
# Azkaban mysql settings by default. Users should configure their own username and password.
database.type=mysql
mysql.port=3306
mysql.host=192.168.56.70
mysql.database=azkaban
mysql.user=root
mysql.password=root
mysql.numconnections=100
#Multiple Executor
azkaban.use.multiple.executors=true
azkaban.executorselector.filters=StaticRemainingFlowSize,MinimumFreeMemory,CpuStatus
azkaban.executorselector.comparator.NumberOfAssignedFlowComparator=1
azkaban.executorselector.comparator.Memory=1
#配置文件azkaban-users.xml
增加 管理员用户 admin
"azkaban" password="azkaban" roles="admin" groups="azkaban"/>
"metrics" password="metrics" roles="metrics"/>
"admin" password="123456" roles="admin,metrics"/>
"admin" permissions="ADMIN"/>
"metrics" permissions="METRICS"/>
</azkaban-users>
azkaban 执行服务器(executor)配置conf==========
azkaban.properties
# Azkaban Personalization Settings
azkaban.name=test
azkaban.label=test
azkaban.color=#FF3601
azkaban.default.servlet.path=/index
#修改-写自己的绝对路径
web.resource.dir=web
#修改-设置时区
default.timezone.id=Asia/Shanghai
# Azkaban UserManager class
user.manager.class=azkaban.user.XmlUserManager
user.manager.xml.file=/export/azkaban-exec/conf/azkaban-users.xml
# Loader for projects
executor.global.properties=/export/azkaban-exec/conf/global.properties
azkaban.project.dir=projects
# Velocity dev mode
velocity.dev.mode=false
# Azkaban Jetty server properties.
jetty.use.ssl=false
jetty.maxThreads=25
jetty.port=8081
# Where the Azkaban web server is located
azkaban.webserver.url=http://192,168.56.70:8081
# mail settings
mail.sender=
mail.host=
# User facing web server configurations used to construct the user facing server URLs. They are useful when there is a reverse proxy between Azkaban web servers and users.
# enduser -> myazkabanhost:443 -> proxy -> localhost:8081
# when this parameters set then these parameters are used to generate email links.
# if these parameters are not set then jetty.hostname, and jetty.port(if ssl configured jetty.ssl.port) are used.
# azkaban.webserver.external_hostname=myazkabanhost.com
# azkaban.webserver.external_ssl_port=443
# azkaban.webserver.external_port=8081
job.failure.email=
job.success.email=
lockdown.create.projects=false
cache.directory=cache
# JMX stats
jetty.connector.stats=true
executor.connector.stats=true
# Azkaban plugin settings
# 这里添加一个端口配置
executor.port=12321
azkaban.execution.dir=executions
azkaban.jobtype.plugin.dir=/export/azkaban-exec/plugins/jobtypes
# Azkaban mysql settings by default. Users should configure their own username and password.
database.type=mysql
mysql.port=3306
mysql.host=192.168.56.70
mysql.database=azkaban
mysql.user=root
mysql.password=root
mysql.numconnections=100
# Azkaban Executor settings
executor.maxThreads=50
executor.flow.threads=30
azkaban.executor.runtimeProps.override.eager=false
/bin/start-exec.sh
/bin/start-web.sh
如果启动azkaban-web报错:No active executors found
前往MySQL数据库执行:
update azkaban.executors set active=1;