azkaban的安装

一、下载上传文件

二、创建目录

mkdir /opt/soft/azkaban

三、解压

tar -zxvf /opt/install/azkaban-db-3.84.4.tar.gz -C /opt/soft/azkaban
tar -zxvf /opt/install/azkaban-exec-server-3.84.4.tar.gz -C /opt/soft/azkaban
tar -zxvf /opt/install/azkaban-web-server-3.84.4.tar.gz -C /opt/soft/azkaban

四、改名字

mv /opt/install/azkaban-db-3.84.4.tar.gz -C /opt/soft/azkaban/azkaban-db
mv /opt/install/azkaban-exec-server-3.84.4.tar.gz -C /opt/soft/azkaban/azkaban-exec
mv /opt/install/azkaban-web-server-3.84.4.tar.gz -C /opt/soft/azkaban/azkaban-web

五、修改配置

(1)进入opt/soft/mysql8修改

vim ./my.cnf
max_allowed_packet = 1024M

(2)进入/opt/soft/azkaba/azkaban-exec/plugins/jobtypes/修改

# set execute-as-user
execute.as.user=false

azkaban.native.lib=false

(3)进入修改/opt/soft/azkaba/azkaban-exec/conf/修改

 7  default.timezone.id=Asia/Shanghai
 21 azkaban.webserver.url=http://192.168.91.11:8081
 43 mysql.port=3306
 44 mysql.host=192.168.91.11
 45 mysql.database=kb23azkaban
 46 mysql.user=azkaban
 47 mysql.password=azkaban
 52 executor.port=12321

(4)进入修改/opt/soft/azkaba/azkaban-web/conf/修改

vim ./azkaban.properties 
 40 mysql.port=3306
 41 mysql.host=192.168.91.11
 42 mysql.database=kb23azkaban
 43 mysql.user=azkaban
 44 mysql.password=azkaban
 48 #MinimumFreeMemory(学习不需要,需要8G)
 49 azkaban.executorselector.filters=StaticRemainingFlowSize,CpuStatus

vim ./azkaban-users.xml 

(5)修改mysql驱动

cd /opt/soft/azkaba/azkaban-web/lib
rm -rf ./mysql-connector-java-5.0.29.jar
# xftp或者拷贝至当前文件夹下mysql-connector-java-8.0.29.jar

cd /opt/soft/azkaba/azkaban-exec/lib
rm -rf ./mysql-connector-java-5.0.29.jar
# xftp或者拷贝至当前文件夹下mysql-connector-java-8.0.29.jar

六、进入mysql

# 1、登录mysql
mysql -uroot -proot
# 2、创建文件
mysql> show databases;
mysql> create databases kb23azkaban;
mysql> use ka23azkaban;
mysql> source /opt/soft/azkaban/azkaban-db/create-all-sql-0.1.0-SNAPSHOT.sql;

七、激活

[root@azkaban23 azkaban-exec]# curl -G "192.168.91.11:12321/executor?action=activate" && echo
{"status":"success"}

mysql> select * from executors;

azkaban的安装_第1张图片

八、启动/关闭

[root@azkaban23 ~]# cd /opt/soft/azkaba/azkaban-web/
[root@azkaban23 azkaban-web]# ./bin/start-web.sh 
[root@azkaban23 azkaban-web]# cd /opt/soft/azkaba/azkaban-exec/
[root@azkaban23 azkaban-exec]# ./bin/start-exec.sh 
[root@azkaban23 azkaban-exec]# jps
6256 Jps
2210 AzkabanExecutorServer
2552 AzkabanWebServer

[root@azkaban23 azkaban-exec]# ./bin/shutdown-exec.sh 
[root@azkaban23 azkaban-exec]# cd ../azkaban-web/
[root@azkaban23 azkaban-web]# ./bin/shutdown-web.sh 

九、登录网页http://192.168.91.11:8081

(1)创建文件

azkaban的安装_第2张图片

(2)上传文件

azkaban的安装_第3张图片

(3)常用代码

①XXX.flow

azkaban的安装_第4张图片

②azkaban.project

azkaban-flow-version: 2.0

③其他XXX.sh

#!/bin/bash

echo "do jobA.sh"

你可能感兴趣的:(linux,azkaban,mysql)