下载安装包

直接进官网下载 https://dolphinscheduler.apache.org/zh-cn/download/download.html

参考官方文档 https://dolphinscheduler.apache.org/zh-cn/docs/1.3.2/user_doc/cluster-deployment.html

我下载的是1.3.2版本
apache-dolphinscheduler-incubating-1.3.2-dolphinscheduler-bin.tar.gz

基础环境

系统版本:   centos6.5
普通用户:   hadoop
家目录:      /hadoop
JDK1.8:     /hadoop/app/jdk1.8.0_281
mysql5.7.27:         /hadoop/app/mysql
zookeeper-3.5.6:  /hadoop/app/zookeeper-3.5.6
hadoop-2.7.7:       /hadoop/app/hadoop-2.7.7

安装机器IP及hostname
192.168.100.10 bigdata01
192.168.100.11 bigdata02
192.168.100.12 bigdata03

配置sudo免密

使用root用户给每台机器配置sudo免密

vi /etc/sudoers

添加

hadoop ALL=(ALL) NOPASSWD: NOPASSWD: ALL

注释
# Defaults requirett

或者

echo 'hadoop  ALL=(ALL)  NOPASSWD: NOPASSWD: ALL' >> /etc/sudoers
sed -i 's/Defaults requirett/#Defaults requirett/g' /etc/sudoers

注意:
因为是以 sudo -u {linux-user} 切换不同linux用户的方式来实现多用户运行作业,所以部署用户需要有 sudo 权限,而且是免密的。
如果/etc/sudoers文件中有"Default requiretty"这行,须要注释掉
如果用到资源上传的话,还需要在`HDFS或者MinIO`上给该部署用户分配读写的权限

 配置hostname

在所有机器上使用root用户配置hostname

vi /etc/hosts

192.168.100.10 bigdata01

192.168.100.11 bigdata02
192.168.100.12 bigdata03

配置ssh免密

在三台机器上都使用hadoop用户配置ssh免密

ssh-keygen -t rsa -m PEM

一直按回车,都设置为默认值,然后再当前用户的Home目录下的.ssh目录中会生成公钥文件(id_rsa.pub)和私钥文件(id_rsa)

分发公钥

ssh-copy-id 192.168.100.10
ssh-copy-id 192.168.100.11
ssh-copy-id 192.168.100.12

注意:正常设置后,ssh bigdata01 是不需要再输入密码的

配置JAVA环境

hadoop用户已经安装/hadoop/app/jdk1.8.0_281
将jdk软链/bin/java下

因为已经存在open-jdk软链接,需root用户修改

sudo ln -snf /hadoop/app/jdk1.8.0_281/bin/java /bin/java

数据库初始化

CREATE DATABASE dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON dolphinscheduler.* TO 'root'@'%' IDENTIFIED BY '123';
GRANT ALL PRIVILEGES ON dolphinscheduler.* TO 'root'@'localhost' IDENTIFIED BY '123';
flush privileges;

添加mysql-connector-java 驱动jar包

手动添加 [ mysql-connector-java 驱动 jar ] 包mysql-connector-java-5.1.49.jar到lib目录

下载mysql-connector-java-5.1.49.jar包

修改配置文件conf/datasource.properties 

vi conf/datasource.properties

spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://ywjcapp4:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
spring.datasource.username=root
spring.datasource.password=123

执行建表及导入基础数据脚本

sh script/create-dolphinscheduler.sh

配置运行参数

vi conf/env/dolphinscheduler_env.sh

export HADOOP_HOME=/hadoop/app/hadoop-2.7.7
export HADOOP_CONF_DIR=/hadoop/app/hadoop-2.7.7/etc/hadoop
#export SPARK_HOME1=/opt/soft/spark1
#export SPARK_HOME2=/opt/soft/spark2
#export PYTHON_HOME=/opt/soft/python

export JAVA_HOME=/opt/soft/java

#export HIVE_HOME=/opt/soft/hive
#export FLINK_HOME=/opt/soft/flink
#export DATAX_HOME=/opt/soft/datax/bin/datax.py

export PATH=$JAVA_HOME/bin:$PATH

修改一键部署配置文件 conf/config/install_config.conf中的各参数

vi conf/config/install_config.conf
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# # NOTICE : If the following config has special characters in the variable `.*[]^${}\+?|()@#&`, Please escape, for example, `[` escape to `\[`
# 这里填 mysql or postgresql
dbtype="mysql" # db config
# 数据库连接地址
dbhost="bigdata01:3306" # 数据库用户名,此处需要修改为上面设置的{user}具体值
username="root" # 数据库名
dbname="dolphinscheduler" # 数据库密码, 如果有特殊字符,请使用\转义,需要修改为上面设置的{password}具体值
password="123" # Zookeeper地址
zkQuorum="bigdata01:2181,bigdata02:2181,bigdata03:2181" # #将DS安装到哪个目录,如: /opt/soft/dolphinscheduler,不同于现在的目录
installPath="/hadoop/app/ds" #使用哪个用户部署,使用第3节创建的用户
# Note: the deployment user needs to have sudo privileges and permissions to operate hdfs. If hdfs is enabled, the root directory needs to be created by itself
deployUser="hadoop" # 邮件配置,以qq邮箱为例
# 邮件协议
mailProtocol="SMTP" # 邮件服务地址
mailServerHost="smtp.qq.com" # 邮件服务端口
# note: Different protocols and encryption methods correspond to different ports, when SSL/TLS is enabled, make sure the port is correct.
mailServerPort="25" # mailSender和mailUser配置成一样即可
# 发送者
mailSender="xxx@qq.com" # 发送用户
mailUser="xxx@qq.com" # 邮箱密码
# note: The mail.passwd is email service authorization code, not the email login password.
mailPassword="xxx" # TLS协议的邮箱设置为true,否则设置为false
starttlsEnable="true" # 开启SSL协议的邮箱配置为true,否则为false。注意: starttlsEnable和sslEnable不能同时为true
# only one of TLS and SSL can be in the true state.
sslEnable="false" #note: 邮件服务地址值,参考上面 mailServerHost
sslTrust="smtp.qq.com" # 业务用到的比如sql等资源文件上传到哪里,可以设置:HDFS,S3,NONE,
# 单机如果想使用本地文件系统,请配置为HDFS,因为HDFS支持本地文件系统;
# 如果不需要资源上传功能请选择NONE。强调一点:使用本地文件系统不需要部署hadoop
# resource storage type:HDFS,S3,NONE
resourceStorageType="HDFS" # 如果上传资源保存想保存在hadoop上,hadoop集群的NameNode启用了HA的话,
# 需要将hadoop的配置文件core-site.xml和hdfs-site.xml放到安装路径(/hadoop/app/ds/conf)的conf目录下,并配置namenode cluster名称;
# 如果NameNode不是HA,则只需要将mycluster修改为具体的ip或者主机名即可
# if resourceStorageType is HDFS,defaultFS write namenode address,HA you need to put core-site.xml and hdfs-site.xml in the conf directory.
# if S3,write S3 address,HA,for example :s3a://dolphinscheduler,
# Note,s3 be sure to create the root directory /dolphinscheduler
defaultFS="hdfs://nn1:8020" # if resourceStorageType is S3, the following three configuration is required, otherwise please ignore
s3Endpoint="http://192.168.xx.xx:9010"
s3AccessKey="xxxxxxxxxx"
s3SecretKey="xxxxxxxxxx" # 如果没有使用到Yarn,保持以下默认值即可;
# 如果ResourceManager是HA,则配置为ResourceManager节点的主备ip或者hostname,比如"192.168.xx.xx,192.168.xx.xx";
# 如果是单ResourceManager请配置yarnHaIps=""即可
# if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty
yarnHaIps="bigdata01,bigdata02" # 如果ResourceManager是HA或者没有使用到Yarn保持默认值即可;
# 如果是单ResourceManager,请配置真实的ResourceManager主机名或者ip
# if resourcemanager HA enable or not use resourcemanager, please skip this value setting; If resourcemanager is single, you only need to replace yarnIp1 to actual resourcemanager hostname.
# singleYarnIp="yarnIp1" # 资源上传根路径,主持HDFS和S3,由于hdfs支持本地文件系统,需要确保本地文件夹存在且有读写权限
# resource store on HDFS/S3 path, resource file will store to this hadoop hdfs path, self configuration, please make sure the directory exists on hdfs and have read write permissions。/dolphinscheduler is recommended
resourceUploadPath="/hadoop/data/dolphinscheduler" # 具备权限创建resourceUploadPath的用户
# who have permissions to create directory under HDFS/S3 root path
# Note: if kerberos is enabled, please config hdfsRootUser=
hdfsRootUser="hadoop" # kerberos config
# whether kerberos starts, if kerberos starts, following four items need to config, otherwise please ignore
kerberosStartUp="false"
# kdc krb5 config file path
krb5ConfPath="$installPath/conf/krb5.conf"
# keytab username
keytabUserName="hdfs-mycluster@ESZ.COM"
# username keytab path
keytabPath="$installPath/conf/hdfs.headless.keytab" # api server port
apiServerPort="12345" # 在哪些机器上部署DS服务,本机选localhost
# install hosts
# Note: install the scheduled hostname list. If it is pseudo-distributed, just write a pseudo-distributed hostname
ips="bigdata01,bigdata02,bigdata03" #ssh端口,默认22
# ssh port, default 22
# Note: if ssh port is not default, modify here
sshPort="22" #master服务部署在哪台机器上
# run master machine
# Note: list of hosts hostname for deploying master
masters="bigdata01,bigdata02" # worker服务部署在哪台机器上,并指定此worker属于哪一个worker组,下面示例的default即为组名
# run worker machine
# note: need to write the worker group name of each worker, the default value is "default"
workers="bigdata01:default,bigdata02:default,bigdata03:default" # 报警服务部署在哪台机器上
# run alert machine
# note: list of machine hostnames for deploying alert server
alertServer="bigdata01" # 后端api服务部署在在哪台机器上
# run api machine
# note: list of machine hostnames for deploying api server
apiServers="bigdata01"

执行一键安装

sh install.sh

注意:
将hadoop的配置文件 core-site.xml 和 hdfs-site.xml 放到/hadoop/app/ds/conf下面:

cp /hadoop/app/hadoop-2.7.7/etc/hadoop/core-site.xml /hadoop/app/ds/conf
cp /hadoop/app/hadoop-2.7.7/etc/hadoop/hdfs-site.xml /hadoop/app/ds/conf

重启服务

/hadoop/app/ds/bin/stop_all.sh
/hadoop/app/ds/bin/start_all.sh

  进程说明

MasterServer 主要负责 DAG 的切分和任务状态的监控
    WorkerServer/LoggerServer 主要负责任务的提交、执行和任务状态的更新。LoggerServer 用于 Rest Api 通过 RPC 查看日志
    ApiServer 提供 Rest Api 服务,供 UI 进行调用
    AlertServer 提供告警服务

查看前台web页面

初始账号、密码: admin/dolphinscheduler123

http://192.168.100.10:12345/dolphinscheduler

OK,安装完成!

linux 之 DolphinScheduler 安装步骤的更多相关文章

  1. Centos linux php扩展安装步骤

    使用phpinfo()函数输出PHP信息,然后找到Configuration File (php.ini) apachectl 其设计意图是帮助管理员控制Apache httpd后台守护进程的功能. ...

  2. Linux VMware tools安装步骤

    Linux VMware tools安装步骤: 1.安装环境介绍 #虚拟机版本:VMware-workstation-full-10 #linux分发版本:CentOS-6.4-i386-LiveCD ...

  3. 【转】postgresql 9.4 在linux环境的安装步骤详解

    本文章来为各位介绍一篇关于postgresql 9.4 在linux环境的安装步骤详解,希望文章能够对各位新手朋友带来帮助的哦. 环境说明系统:centos 6.4 64位软件:postgresql ...

  4. linux的客户端安装步骤配置

    现有一个***.tar.gz的客户端软件,现在客户端安装步骤如下 说明:此软件是一个网络客户端认证软件,因为采用虚拟机中的linux主机,所以此主机的网路配置从只能使用Bridge模式,而不能使用NA ...

  5. PhantomJS linux系统下安装步骤及使用方法(网页截屏功能)

    PhantomJS 是一个基于 WebKit 的服务器端 JavaScript API.它全面支持web而不需浏览器支持,其快速,原生支持各种Web标准: DOM 处理, CSS 选择器, JSON, ...

  6. Linux gd库安装步骤说明

    gd 库是 PHP 处理图形的扩展库,它提供了一系列用来处理图片的 API(应用程序编程接口),使用 gd 库可以处理图片或者生成图片.在网站上,gd 库通常用来生成缩略图,或者对图片加水印,或者生成 ...

  7. Apache Linux下Apache安装步骤

    Apache简介         Apache HTTP Server(简称Apache)是Apache软件基金会的一个开放源码的网页服务器,可以在大多数计算机操作系统中运行,由于其多平台和安全性被广 ...

  8. linux下redis安装步骤

    1.官网上下载redis最新包,我下载的是redis-5.0.3.tar.gz,上传至服务器 2.解压缩:tar zxvf redis-5.0.3.tar.gz3.cd redis-5.0.3进入re ...

  9. linux下jdk安装步骤

    1. 登录Linux,切换到root用户 su root 获取root用户权限,当前工作目录不变(需要root密码) 或 sudo -i 不需要root密码直接切换成root(需要当前用户密码) 2. ...

随机推荐

  1. Kafaka相关命令

    开启zookeeper命令(备注:先进入zookeeper的bin目录) ./zkServer.sh start 关闭zookeeper命令(备注:先进入zookeeper的bin目录) ./zkSe ...

  2. 基于阿里云 ecs 使用 docker 方式部署 showDoc

    官网文档:https://www.showdoc.cc/help?page_id=65610 (建议先看下这个) 首先说明一下,我 ecs 镜像是 CentOS 7.6 64位 1. 首先在 服务器上 ...

  3. 基于注解的方式搭建mybatis开发框架

    1.创建工程 <groupId>com.hope</groupId>     <artifactId>day01_eesy_01mybatis</artifa ...

  4. 第三届“传智杯”全国大学生IT技能大赛(初赛A组)题解

    留念 C - 志愿者 排序..按照题目规则说的排就可以.wa了两发我太菜了qwq #include<bits/stdc++.h> using namespace std; const in ...

  5. Python 3 字典(Dictionary)

    字典是另一种可变容器模型,且可存储任意类型对象. 字典的每个键值 key=>value 对用冒号 : 分割,每个键值对之间用逗号 , 分割,整个字典包括在花括号 {} 中 ,格式如下所示: d ...

  6. C# .exe和.dll文件图标资源提取工具

    Windows 可执行文件(.exe)和动态库文件(.dll)图标资源提取工具 GitHub 功能 图标资源预览 图标资源导出(仅支持导出 PNG 格式) 代码 获取图标资源使用了 Win32 API ...

  7. pipeline 结构设计

    目录 一.pipeline步骤 二.案例 pipeline详解 只生成一次制品 不同环境部署 系统集成测试 指定版本部署 一.pipeline步骤 当团队开始设计第一个pipeline时,该如何下手呢 ...

  8. 什么是git?

    目录 一.简介 Git与SVN 区别 一.简介 Git 是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目. Git 是 Linus Torvalds 为了帮助管理 Linux 内核 ...

  9. [BUUCTF]REVERSE——相册

    相册 附件 步骤: apk文件,习惯用apkide打开,看它反编译成了jar,就换jadx-gui打开,题目提示找邮箱,因此在导航栏里搜索mail 看到了sendMailByJavaMail(java ...

  10. 工作簿合并(Excel代码集团)

    同一文件夹内N个工作簿 ,每个工作簿里N个工作表,最终合并到一个工作表里的代码. 假设每个表格结构相同,第一行为标题,第二行为表头,表头内容固定,行数不固定,列固定14,工作表数量不固定,工作簿数量不 ...