写个dolphinscheduler伪集群本地部署的shell脚本-不要docker容器安装的
#!/bin/bash
#定义一些变量 base_dir=$(pwd) dolphinscheduler_version=1.3.3 dolphinscheduler_home=/usr/local/dolphinscheduler mysql_host=localhost mysql_port=3306 mysql_user=root mysql_password=123456 zookeeper_quorum=localhost:2181 zookeeper_root=/dolphinscheduler
#安装Java环境 yum install -y java-1.8.0-openjdk
#创建dolphinscheduler用户 useradd dolphinscheduler passwd dolphinscheduler
#下载并解压dolphinscheduler安装包 cd $base_dir wget https://github.com/apache/dolphinscheduler/releases/download/v${dolphinscheduler_version}/apache-dolphinscheduler-${dolphinscheduler_version}-bin.tar.gz tar -zxvf apache-dolphinscheduler-${dolphinscheduler_version}-bin.tar.gz -C /usr/local/ ln -s /usr/local/apache-dolphinscheduler-${dolphinscheduler_version}-bin $dolphinscheduler_home
#修改dolphinscheduler配置文件 cd $dolphinscheduler_home/conf cp application.properties{,.bak} sed -i "s#spring.datasource.url=jdbc:mysql://localhost:3306/dolphinscheduler#spring.datasource.url=jdbc:mysql://${mysql_host}:${mysql_port}/dolphinscheduler#g" application.properties sed -i "s#spring.datasource.username=root#spring.datasource.username=${mysql_user}#g" application.properties sed -i "s#spring.datasource.password=123456#spring.datasource.password=${mysql_password}#g" application.properties sed -i "s#zookeeper.quorum=localhost:2181#zookeeper.quorum=${zookeeper_quorum}#g" application.properties sed -i "s#zookeeper.root=/dolphinscheduler#zookeeper.root=${zookeeper_root}#g" application.properties
#创建dolphinscheduler数据库 cd $dolphinscheduler_home/script/ mysql -h${mysql_host} -P${mysql_port} -u${mysql_user} -p${mysql_password} < dolphinscheduler.sql
#启动dolphinscheduler服务 cd $dolphinscheduler_home/bin sh dolphinscheduler-daemon.sh start
#查看dolphinscheduler服务状态 sh dolphinscheduler-daemon.sh status
echo "dolphinscheduler伪集群本地部署成功!"
原文地址: https://www.cveoy.top/t/topic/rrk 著作权归作者所有。请勿转载和采集!