1、官网地址
2、下载 Azkaban 3.59 源码
(1)首页 -> Downloads
(2)Releases
We use ‘Github Releases’ for creating version numbers. Release tags can be found here: https://github.com/azkaban/azkaban/releases
(3)GitHub -> azkaban3.59.0 Source code(tar.gz)
2021-05-22日查最新版本是4.0.0
3、安装部署Maven
1)上传Maven安装包
[alex@hadoop102 software]$ mkdir azkaban
[alex@hadoop102 software]$ ls -l azkaban/
-rw-r--r-- 1 root root 8491533 May 20 10:48 apache-maven-3.3.9-bin.tar.gz
2)修改用户组
[alex@hadoop102 software]$ sudo chown -R alex:alex azkaban/
3)解压Maven
[alex@hadoop102 software]$ tar -xzvf azkaban/apache-maven-3.3.9-bin.tar.gz -C ../module/
4)配置环境变量
[alex@hadoop102 apache-maven-3.3.9]$ sudo vim /etc/profile
## MAVEN_HOME
export MAVEN_HOME=/opt/module/apache-maven-3.3.9
export PATH=$PATH:$MAVEN_HOME/bin
[alex@hadoop102 apache-maven-3.3.9]$ source /etc/profile
5)检查环境变量
[alex@hadoop102 apache-maven-3.3.9]$ mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /opt/module/apache-maven-3.3.9
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /opt/module/jdk1.8.0_144/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.el7.x86_64", arch: "amd64", family: "unix"
6)创建maven本地仓位置
[alex@hadoop102 module]$ mkdir -p m2/repository
7)配置settings.xml
[alex@hadoop102 apache-maven-3.3.9]$ vim conf/settings.xml
<localRepository>/opt/module/m2/repository</localRepository>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>nexus-aliyun</id>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>alimaven-new</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/repository/central/</url>
</mirror>
<mirror>
<id>aliyun-repos</id>
<name>aliyun-repos</name>
<url>https://maven.aliyun.com/repository/public</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>sonatype-repos-s</id>
<name>sonatype-repos-s</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>repo2</id>
<name>Mirror from Maven Repo2</name>
<url>http://repo2.maven.org/maven2/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>centor</id>
<name>Mirror from Maven central</name>
<url>http://central.maven.org/maven2/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>https://repo1.maven.org/maven2/</url>
</mirror>
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
4、安装部署Gradle
1)下载地址
https://services.gradle.org/distributions/gradle-4.6-all.zip
发布版本的下载
https://gradle.org/releases/
2)上传gradle
[alex@hadoop102 software]$ ls -l azkaban/
-rw-r--r-- 1 root root 106724289 May 20 11:08 gradle-4.6-all.zip
3)修改用户组
[alex@hadoop102 software]$ sudo chown -R alex:alex azkaban/
4)解压gradle
[alex@hadoop102 software]$ unzip azkaban/gradle-4.6-all.zip -d ../module/
5)配置环境变量
[alex@hadoop102 module]$ sudo vim /etc/profile
## GRADLE_HOME
export GRADLE_HOME=/opt/module/gradle-4.6
export PATH=$PATH:$GRADLE_HOME/bin
[alex@hadoop102 gradle-4.6]$ source /etc/profile
6)检查环境变量
[alex@hadoop102 module]$ gradle -version
------------------------------------------------------------
Gradle 4.6
------------------------------------------------------------
Build time: 2018-02-28 13:36:36 UTC
Revision: 8fa6ce7945b640e6168488e4417f9bb96e4ab46c
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_144 (Oracle Corporation 25.144-b01)
OS: Linux 3.10.0-862.el7.x86_64 amd64
7)配置gradle
配置Gradle使用maven本地仓库,这样Gradle就不会重新下载已经存在maven本地仓库的jar包,从而节省时间和空间。
在环境变量中加入新的系统变量:GRADLE_USER_HOME 变量值是maven本地仓库的路径,本文为例/opt/module/m2/repository
此时,Gradle下载的文件将放到指定的仓库路径中。但是还需要修改build.gradle文件中加入mavenLocal() 引用本地仓库
repositories { //repositories闭包
mavenLocal() //配置先从本地仓库寻找jar包,优先寻找上一个配置,找到不执行下面的配置
mavenCentral() //配置从中央仓库寻找
google() //第三方仓库
jcenter() //代码托管库:设置之后可以在项目中轻松引用jcenter上的开源项目
}
配置GRADLE_USER_HOME
[alex@hadoop102 module]$ sudo vim /etc/profile
export GRADLE_USER_HOME=/opt/module/m2/repository
[alex@hadoop102 module]$ source /etc/profile
配置build.gradle文件
[alex@hadoop102 wrapper]$ cd /opt/module/azkaban-3.84.4/
[alex@hadoop102 azkaban-3.59.0]$ vim build.gradle
repositories {
mavenLocal()
mavenCentral()
}
5、Ant安装部署
1)上传安装包
[alex@hadoop102 software]$ ls -l azkaban/
-rw-r--r-- 1 root root 5635116 May 20 11:36 apache-ant-1.9.9-bin.tar.gz
2)修改用户组
[alex@hadoop102 software]$ sudo chown -R alex:alex azkaban/
3)解压Ant
[alex@hadoop102 software]$ tar -xzvf azkaban/apache-ant-1.9.9-bin.tar.gz -C ../module/
4)配置环境变量
[alex@hadoop102 module]$ sudo vim /etc/profile
## ANT_HOME
export ANT_HOME=/opt/module/apache-ant-1.9.9
export PATH=$PATH:$ANT_HOME/bin
[alex@hadoop102 module]$ source /etc/profile
5)检查环境变量
[alex@hadoop102 module]$ ant -v
Apache Ant(TM) version 1.9.9 compiled on February 2 2017
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed
[alex@hadoop102 module]$ ant -version
Apache Ant(TM) version 1.9.9 compiled on February 2 2017
6、Jdk安装部署
[alex@hadoop102 module]$ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
7、编译azkaban
1)上传azkaban
[alex@hadoop102 software]$ ls -l azkaban/
-rw-r--r-- 1 root root 19050888 May 20 11:43 azkaban-3.59.0.tar.gz
2)修改用户组
[alex@hadoop102 software]$ sudo chown -R alex:alex azkaban/
3)解压azkaban
[alex@hadoop102 software]$ tar -xzvf azkaban/azkaban-3.59.0.tar.gz -C ../module/
4)修改gradle-wrapper.properties配置文件
目的:防止从网上下载gradle-4.6-all.zip包
[alex@hadoop102 ~]$ cd /opt/module/azkaban-3.59.0/gradle/wrapper/
[alex@hadoop102 wrapper]$ pwd
/opt/module/azkaban-3.59.0/gradle/wrapper
[alex@hadoop102 wrapper]$ ll
total 60
-rw-rw-r-- 1 alex alex 54708 Sep 25 2018 gradle-wrapper.jar
-rw-rw-r-- 1 alex alex 779 Sep 25 2018 gradle-wrapper.properties
[alex@hadoop102 wrapper]$ vim gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
distributionUrl=gradle-4.6-all.zip
5)拷贝gradle包
[alex@hadoop102 wrapper]$ pwd
/opt/module/azkaban-3.59.0/gradle/wrapper
[alex@hadoop102 wrapper]$ cp /opt/software/azkaban/gradle-4.6-all.zip ./
6)安装依赖
[alex@hadoop102 azkaban]$ sudo yum install -y git glibc-headers gcc-c++
7)开始编译源码
[alex@hadoop102 ~]$ cd /opt/module/azkaban-3.59.0/
[alex@hadoop102 azkaban-3.59.0]$ ./gradlew distTar
./gradlew build installDist
./gradlew build installDist -x test
8)编译成功后文件位置
[root@hadoop102 azkaban-3.59.0]# find /opt/module/azkaban-3.59.0/ -name azkaban*.tar.gz
/opt/module/azkaban-3.59.0/azkaban-db/build/distributions/azkaban-db-0.1.0-SNAPSHOT.tar.gz
/opt/module/azkaban-3.59.0/azkaban-exec-server/build/distributions/azkaban-exec-server-0.1.0-SNAPSHOT.tar.gz
/opt/module/azkaban-3.59.0/azkaban-hadoop-security-plugin/build/distributions/azkaban-hadoop-security-plugin-0.1.0-SNAPSHOT.tar.gz
/opt/module/azkaban-3.59.0/azkaban-solo-server/build/distributions/azkaban-solo-server-0.1.0-SNAPSHOT.tar.gz
/opt/module/azkaban-3.59.0/azkaban-web-server/build/distributions/azkaban-web-server-0.1.0-SNAPSHOT.tar.gz
文件说明
azkaban-db:初始化数据库存储相关。
azkaban-exec-server:调度执行相关。
azkaban-solo-server:单机安装配置相关。
azkaban-web-server:azkaban web页面