Centos7.6集群部署海豚调度3.1.5

news2025/1/12 15:50:37

目录

  • 前置准备工作(所有机器)
    • 主机规划
    • 数据库规划
    • 用户规划
    • 目录规划
    • 配置/etc/hosts
    • jdk安装
    • 进程树分析
    • 配置ssh免密
    • 部署zookeeper
    • 启动zookeeper
    • 下载DolphinScheduler 二进制包
    • 修改install_env.sh配置
    • 修改dolphinscheduler_env.sh配置文件
  • 安装(ty-m1)
    • 安装pg15
    • 配置dp数据库
    • 初始化元数据
    • 安装dolphinscheduler-ui
    • 启停服务
  • 登录
  • 参考

前置准备工作(所有机器)

主机规划

主机名主机ip角色服务(端口)
ty-m110.0.1.102masterMasterServer(5678),pg15(5432)
ty-m210.0.0.232workerWorkerServer(1234),alertServer
ty-m310.0.1.203workerWorkerServer(1234),apiServers(12345)

数据库规划

属性
主机名ty-m1
主机ip10.0.1.102
数据库版本pg15
${PGDATABASE}dp
${PGUSER}dp
${PGPORT}5432
${PGDATA}/data/pgsql/data
${PGHOME}/usr/local/pgsql

用户规划

用户名权限
dp具有sudo免密权限
# 添加用户dp
useradd dp
# 为用户dp设置密码
passwd dp
# sudo免密
sed -i '$adp  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 文件中有 “Defaults requirett” 这行,也请注释掉

目录规划

目录用途归属
/usr/local/jdk-20jdk安装目录root
/usr/local/zookeeperzookeeper安装目录root
/data/zookeeper/datazookeeper数据目录root
/usr/local/dolphinscheduler-app海豚调度UI安装目录dp
/usr/local/dolphinscheduler海豚调度二进制目录dp
mkdir -p /data/zookeeper/data
mkdir -p /usr/local/dolphinscheduler-app
chown -R dp.dp /usr/local/dolphinscheduler-app

配置/etc/hosts

echo '
10.0.1.102 ty-m1
10.0.0.232 ty-m2
10.0.1.203 ty-m3' >> /etc/hosts

jdk安装

# 我们把下载的东西全放在 /opt 下
# 下载jdk20
cd /opt && wget https://download.oracle.com/java/20/latest/jdk-20_linux-x64_bin.tar.gz
cd /usr/local/ && tar -zxvf /opt/jdk-20_linux-x64_bin.tar.gz
# 配置环境变量 JAVA_HOME 和 PATH
echo 'export JAVA_HOME=/usr/local/jdk-20
export PATH=$PATH:$JAVA_HOME/bin
' >> /etc/profile
# 使环境变量立即生效
source /etc/profile

进程树分析

  • macOS安装pstree
  • Fedora/Red/Hat/CentOS/Ubuntu/Debian安装psmisc
  • DolphinScheduler 本身不依赖 Hadoop、Hive、Spark,但如果你运行的任务需要依赖他们,就需要有对应的环境支持
yum -y install psmisc

配置ssh免密

# 切换到dp用户
su - dp
# 生成公钥
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
# 将公钥分发到所有机器上
ssh-copy-id -i ~/.ssh/id_rsa.pub -p 22 dp@ty-m1
ssh-copy-id -i ~/.ssh/id_rsa.pub -p 22 dp@ty-m2
ssh-copy-id -i ~/.ssh/id_rsa.pub -p 22 dp@ty-m3
chmod 600 ~/.ssh/authorized_keys

# 测试
ssh localhost
ssh ty-m1
ssh ty-m2
ssh ty-m3

部署zookeeper

# 切回root
exit

cd /opt && wget https://dlcdn.apache.org/zookeeper/zookeeper-3.7.1/apache-zookeeper-3.7.1-bin.tar.gz --no-check-certificate
cd /usr/local/ && tar -zxvf /opt/apache-zookeeper-3.7.1-bin.tar.gz && mv /usr/local/apache-zookeeper-3.7.1-bin /usr/local/zookeeper
echo '
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/data/zookeeper/data
# the port at which the clients will connect
clientPort=12181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1

## Metrics Providers
#
# https://prometheus.io Metrics Exporter
#metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
#metricsProvider.httpPort=7000
#metricsProvider.exportJvmInfo=true

server.1=ty-m1:12888:13888
server.2=ty-m2:14888:15888
server.3=ty-m3:16888:17888' > /usr/local/zookeeper/conf/zoo.cfg
# server.1=ty-m1:12888:13888
# server.2=ty-m2:14888:15888
# server.3=ty-m3:16888:17888
# 1 2 3 分别写进对应机器的zookeeper数据目录的myid文件中
# ty-m1
echo '1' > /data/zookeeper/data/myid
# ty-m2
echo '2' > /data/zookeeper/data/myid
# ty-m3
echo '3' > /data/zookeeper/data/myid

启动zookeeper

# 启动
/usr/local/zookeeper/bin/zkServer.sh start
# 查看状态
/usr/local/zookeeper/bin/zkServer.sh status

下载DolphinScheduler 二进制包

cd /opt && wget https://archive.apache.org/dist/dolphinscheduler/3.1.5/apache-dolphinscheduler-3.1.5-bin.tar.gz
cd /usr/local/ && tar -zxvf /opt/apache-dolphinscheduler-3.1.5-bin.tar.gz && mv /usr/local/apache-dolphinscheduler-3.1.5-bin /usr/local/dolphinscheduler
# 修改权限
chown -R dp:dp /usr/local/dolphinscheduler

修改install_env.sh配置

echo '#
# 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.
#

# ---------------------------------------------------------
# INSTALL MACHINE
# ---------------------------------------------------------
# A comma separated list of machine hostname or IP would be installed DolphinScheduler,
# including master, worker, api, alert. If you want to deploy in pseudo-distributed
# mode, just write a pseudo-distributed hostname
# Example for hostnames: ips="ds1,ds2,ds3,ds4,ds5", Example for IPs: ips="192.168.8.1,192.168.8.2,192.168.8.3,192.168.8.4,192.168.8.5"
ips=${ips:-"ty-m1,ty-m2,ty-m3"}

# Port of SSH protocol, default value is 22. For now we only support same port in all `ips` machine
# modify it if you use different ssh port
sshPort=${sshPort:-"22"}

# A comma separated list of machine hostname or IP would be installed Master server, it
# must be a subset of configuration `ips`.
# Example for hostnames: masters="ds1,ds2", Example for IPs: masters="192.168.8.1,192.168.8.2"
masters=${masters:-"ty-m1"}

# A comma separated list of machine <hostname>:<workerGroup> or <IP>:<workerGroup>.All hostname or IP must be a
# subset of configuration `ips`, And workerGroup have default value as `default`, but we recommend you declare behind the hosts
# Example for hostnames: workers="ds1:default,ds2:default,ds3:default", Example for IPs: workers="192.168.8.1:default,192.168.8.2:default,192.168.8.3:default"
workers=${workers:-"ty-m2:default,ty-m3:default"}

# A comma separated list of machine hostname or IP would be installed Alert server, it
# must be a subset of configuration `ips`.
# Example for hostname: alertServer="ds3", Example for IP: alertServer="192.168.8.3"
alertServer=${alertServer:-"ty-m2"}

# A comma separated list of machine hostname or IP would be installed API server, it
# must be a subset of configuration `ips`.
# Example for hostname: apiServers="ds1", Example for IP: apiServers="192.168.8.1"
apiServers=${apiServers:-"ty-m3"}

# The directory to install DolphinScheduler for all machine we config above. It will automatically be created by `install.sh` script if not exists.
# Do not set this configuration same as the current path (pwd). Do not add quotes to it if you using related path.
installPath=${installPath:-"/usr/local/dolphinscheduler-app"}

# The user to deploy DolphinScheduler for all machine we config above. For now user must create by yourself before running `install.sh`
# script. The user needs to have sudo privileges and permissions to operate hdfs. If hdfs is enabled than the root directory needs
# to be created by this user
deployUser=${deployUser:-"dp"}

# The root of zookeeper, for now DolphinScheduler default registry server is zookeeper.
zkRoot=${zkRoot:-"/dp"}' > /usr/local/dolphinscheduler/bin/env/install_env.sh

修改dolphinscheduler_env.sh配置文件

echo '#
# 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.
#

# JAVA_HOME, will use it to start DolphinScheduler server
export JAVA_HOME=${JAVA_HOME:-/usr/local/jdk-20}

# Database related configuration, set database type, username and password
export DATABASE=${DATABASE:-postgresql}
export SPRING_PROFILES_ACTIVE=${DATABASE}
export SPRING_DATASOURCE_URL="jdbc:postgresql://10.0.1.102:5432/dp"
export SPRING_DATASOURCE_USERNAME="dp"
export SPRING_DATASOURCE_PASSWORD="000000"

# DolphinScheduler server related configuration
export SPRING_CACHE_TYPE=${SPRING_CACHE_TYPE:-none}
export SPRING_JACKSON_TIME_ZONE=${SPRING_JACKSON_TIME_ZONE:-UTC}
export MASTER_FETCH_COMMAND_NUM=${MASTER_FETCH_COMMAND_NUM:-10}

# Registry center configuration, determines the type and link of the registry center
export REGISTRY_TYPE=${REGISTRY_TYPE:-zookeeper}
export REGISTRY_ZOOKEEPER_CONNECT_STRING=${REGISTRY_ZOOKEEPER_CONNECT_STRING:-localhost:12181}

# Tasks related configurations, need to change the coinfiguration if you use the related tasks.
export HADOOP_HOME=${HADOOP_HOME:-/usr/local/hadoop}
export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/usr/locail/hadoop/etc/hadoop}
export SPARK_HOME1=${SPARK_HOME1:-/usr/local/spark1}
export SPARK_HOME2=${SPARK_HOME2:-/usr/local/spark2}
export PYTHON_HOME=${PYTHON_HOME:-/usr/local/python}
export HIVE_HOME=${HIVE_HOME:-/usr/local/hive}
export FLINK_HOME=${FLINK_HOME:-/usr/local/flink}
export DATAX_HOME=${DATAX_HOME:-/usr/local/datax}
export SEATUNNEL_HOME=${SEATUNNEL_HOME:-/opt/soft/seatunnel}
export CHUNJUN_HOME=${CHUNJUN_HOME:-/opt/soft/chunjun}

export PATH=$HADOOP_HOME/bin:$SPARK_HOME1/bin:$SPARK_HOME2/bin:$PYTHON_HOME/bin:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_HOME/bin:$SEATUNNEL_HOME/bin:$CHUNJUN_HOME/bin:$PATH'> /usr/local/dolphinscheduler/bin/env/dolphinscheduler_env.sh

安装(ty-m1)

安装pg15

Centos7.6安装postgresql15

配置dp数据库

Centos7.6安装postgresql15——建库

初始化元数据

su - dp
bash /usr/local/dolphinscheduler/tools/bin/upgrade-schema.sh

安装dolphinscheduler-ui

bash /usr/local/dolphinscheduler/bin/install.sh

启停服务

# 一键停止集群所有服务
bash /usr/local/dolphinscheduler/bin/stop-all.sh

# 一键开启集群所有服务
bash /usr/local/dolphinscheduler/bin/start-all.sh

# 启停 Master
bash /usr/local/dolphinscheduler/bin/dolphinscheduler-daemon.sh stop master-server
bash /usr/local/dolphinscheduler/bin/dolphinscheduler-daemon.sh start master-server

# 启停 Worker
bash /usr/local/dolphinscheduler/bin/dolphinscheduler-daemon.sh start worker-server
bash /usr/local/dolphinscheduler/bin/dolphinscheduler-daemon.sh stop worker-server

# 启停 Api
bash /usr/local/dolphinscheduler/bin/dolphinscheduler-daemon.sh start api-server
bash /usr/local/dolphinscheduler/bin/dolphinscheduler-daemon.sh stop api-server

# 启停 Alert
bash /usr/local/dolphinscheduler/bin/dolphinscheduler-daemon.sh start alert-server
bash /usr/local/dolphinscheduler/bin/dolphinscheduler-daemon.sh stop alert-server

登录

http://223.242.38.242:12345/dolphinscheduler/ui/

  • 初始账号密码:admin/dolphinscheduler123
    在这里插入图片描述

在这里插入图片描述

参考

开源任务调度平台dolphinscheduler-3.1.3/3.1.4部署及使用指南(未完)

【ZooKeeper】ZooKeeper安装及简单操作

Version 3.1.5/部署指南/集群部署(Cluster)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/436134.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

virtualbox 安装centos

在virtualbox安装centos时&#xff0c;遇到了一些问题&#xff0c;此处记录下&#xff0c;希望可以帮助一些小伙伴。 一、下载centos 进入官网下载地址&#xff1a;Download (centos.org) 然后选择阿里云镜像地址&#xff1a;centos-7.9.2009-isos-x86_64安装包下载_开源镜像…

TensorFlow版本与其他库的版本之间问题

使用TensorFlow的版本不一样&#xff0c;对应的库的版本也需不一样&#xff0c;这个有许多需要注意的地方。 比如Keras库&#xff0c; 当我使用tensorflow2.1.0版本时&#xff0c;安装Keras2.10.0这个库会导致运行报错&#xff0c; 那么就需要降低其版本到与之匹配&#xff…

AQS 和CAS详解

&#x1f3c6;今日学习目标&#xff1a; &#x1f340;JDBC事务 Hibernate事务 EJB事务详解 ✅创作者&#xff1a;林在闪闪发光 ⏰预计时间&#xff1a;30分钟 &#x1f389;个人主页&#xff1a;林在闪闪发光的个人主页 &#x1f341;林在闪闪发光的个人社区&#xff0c;欢迎你…

初识Linux篇

初识Linux篇 Linux环境的搭建1.什么是Linux2.Linux环境的安装云服务器Linux安装 总结 Linux环境的搭建 &#x1f60a;首先&#xff0c;在学习Linux之前&#xff0c;先了解一下Linux&#x1f60a; 1.什么是Linux Linux是一种操作系统软件&#xff0c;就像手机中的安卓&#xff…

Vue中的导航守卫

router官网-导航守卫 导航守卫常用的主要有三种&#xff1a;全局前置守卫(beforeEach)、路由独享守卫(beforeEnter)、组件内守卫(beforeRouteEnter) 路由独享守卫 在路由配置上直接定义 beforeEnter 守卫 <body> <div id"app"><h1>欢迎使用路由&l…

在没有魔法的情况下,如果让ChatGPT帮我们写代码

ChatGPT写代码 ✋ChatGPT 是一个基于人工智能的自然语言处理模型&#xff0c;可以帮助程序员更高效地、更自然地与计算机交互。ChatGPT 可以解决程序员在日常开发中遇到的各种问题&#xff0c;例如语法错误、API 使用、代码实现、架构设计等等。 &#x1f4a5;通过与 ChatGPT…

操作系统1(什么是操作系统、程序和编译器)

1.什么是操作系统&#xff1f; 1.什么是操作系统&#xff1f; 对单一计算机硬件系统做出抽象、支撑程序执行的软件系统。通过“虚拟化”硬件资源为程序运行提供服务的软件。 操作系统可以访问任何硬件资源。 2.什么是程序&#xff1f; 程序就是一个状态机。 程序计算sysc…

面了十几家公司测试岗,我终于悟了,面试无非就是这些题

测试岗的面试其实都是大同小异的&#xff0c;这里我收集整理了185道高频面试题&#xff0c;希望对在找工作或者准备跳槽的各位小伙伴有所帮助&#xff01; 一. 测试基础 1.如何制定测试计划 参考答案&#xff1a; 测试计划包括测试目标、测试范围、测试环境的说明、测试类型…

SpringBoot 实现多个子域共享 cookie

SpringBoot 实现多个子域共享 cookie 项目信息cookie 共享需求如何实现 环境配置配置域SpringBoot 配置 https 访问 后端代码验证验证后端解析 cookie 项目信息 使用SpringBoot web框架&#xff0c;版本号 2.7.10 <dependency><groupId>org.springframework.boot&…

Ambari 操作HDP组件迁移

目录 ​ 一、集群信息 1.1 HDP版本信息 1.2 服务器信息 二、服务迁移操作 一、集群信息 1.1 HDP版本信息 1.2 服务器信息 角色 IP 组件 hdp103 192.168.2.152 NameNode hdp104 192.168.2.153 新 NameNode hdp105 192.168.2.154 旧NameNode 二、服务迁移操作 我…

6、苹果签名原理

一、iOS应用签名原理 代码签名双层代码签名描述文件 1.1 代码签名 代码签名是对可执行文件或脚本进行数字签名,用来确认软件在签名后未被修改或损坏的措施. 和数字签名原理一样,只不过签名的数据是代码. 1.1.1 简单的代码签名 - 在iOS出来之前,以前的主流操作系统(Mac/Win…

自动控制原理模拟卷5

自动控制原理模拟题五 Question1 液位自动控制系统原理示意图如下图所示,在任意情况下,希望液面高度 c c c维持不变,说明系统工作原理并画出系统方块图。 解: 当电位器电刷位于中点位置时,电动机不动,控制阀门有一定的开度,使水箱中流入水量与流出水量相等,从而液面保…

C6678-缓存和内存

C6678-缓存和内存 全局内存映射扩展内存控制器&#xff08;XMC&#xff09;-MPAX内存保护与地址扩展使用例程缓存 全局内存映射 扩展内存控制器&#xff08;XMC&#xff09;-MPAX内存保护与地址扩展 每个C66x核心都具有相同大小的L1和L2缓存&#xff0c;并且可配置为普通内存使…

【微信小程序-原生开发】实用教程21 - 分包

分包的流程 当微信小程序主包大小超过2M时&#xff0c;则需要对微信小程序进行分包&#xff0c;方法如下&#xff1a; 1. 转移页面文件 在项目根目录下&#xff0c;新建文件夹 package1 &#xff08;即自定义的分包名为 package1 &#xff09;文件夹 package1 内新建文件夹 p…

C嘎嘎~~【初识C++ 中篇】

初识C 中篇 1.缺省参数2.函数重载2.1函数重载的概念2.2函数重载的原理 3.auto关键字3.1类型别名思考&#xff08;typedef&#xff09;3.2auto的简介3.3auto的使用规则3.4 auto不能推导的场景 4.基于范围的for循环4.1范围for的语法4.2范围for的使用条件 1.缺省参数 缺省参数是 声…

02_2440soc_内存地址映射和选择,寄存器地址的选择

大多数arm芯片从0开始启动 nand_flash控制器外接nand_flash 256M cpu直接接nor_flash 2M nor_flash启动时候 nor_flash上面烧了bin文件 nor_flash基地址为0 cpu直接读nor上的第一个指令(前4字节),执行 cpu继续读取其他指令 执行 如果使用nor启动,片内的sram的地址就是 0x4000…

实战:内存分配与回收策略

java技术体系的自动内存管理&#xff0c;最根本的目标是自动化地解决两个问题&#xff1a;自动给对象分配内存以及自动回收分配给对象的内存。 1 前置知识 1.1 Minor GC 与Full GC Minor GC: 新生代GC&#xff0c;是指发生新生代的垃圾收集动作。Minor GC非常频繁&#xff0…

mac m1安装stable-diffusion

安装stable-diffusion 安装Homebrew安装python及其他依赖下载model安装Stable-Diffusion-WebUI执行./webui.sh作图http://127.0.0.1:7860 安装Homebrew 查询是否安装 brew -v安装 /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.…

14.网络爬虫—selenium详讲

网络爬虫—selenium详讲 一selenium简介Selenium 的优点 二安装模块三设置浏览器驱动确认版本&#xff1a;查找对应驱动下载驱动 四使用模块selenium选取元素方法selenium嵌套页面元素定位selenium网页下拉selenium下拉表选择selenium行为链selenium等待 五错误解决方案六结束语…

[oeasy]python0135_python_语义分析_ast_抽象语法树_abstract_syntax_tree

语义分析_抽象语法树_反汇编 回忆 上次回顾了一下历史 python 是如何从无到有的看到 Guido 长期的坚持和努力 python究竟是如何理解 print(“hello”)的&#xff1f;这些ascii字母如何被组织起来执行&#xff1f; 纯文本 首先编写Guido的简历 print("1982------Gui…