dolphinscheduler单机部署安装
Posted Mr.zhou_Zxy
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了dolphinscheduler单机部署安装相关的知识,希望对你有一定的参考价值。
dolphinscheduler安装部署
一 安装
## 将安装包上传到software下
[root@hadoop_zxy software]# tar -zxvf apache-dolphinscheduler-incubating-1.3.4-dolphinscheduler-bin.tar.gz -C /zxy/apps/
[root@hadoop_zxy apps]# mv apache-dolphinscheduler-incubating-1.3.4-dolphinscheduler-bin/ dolphinscheduler-1.3.4
## 将mysql-connector-java-5.1.47-bin.jar放置在dolphin下的lib目录下
##配置环境变量
[root@hadoop_zxy dolphinscheduler-1.3.4]# vim /etc/profile
## 添加以下内容
export DOLP_HOME=/zxy/apps/dolphinscheduler-1.3.4
export PATH=$PATH:$DOLP_HOME/bin
[root@hadoop_zxy dolphinscheduler-1.3.4]# source /etc/profile
二 MySQL配置
[root@hadoop_zxy dolphinscheduler-1.3.4]# mysql -uroot -p密码
mysql> CREATE DATABASE dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
Query OK, 1 row affected (0.01 sec)
mysql> GRANT ALL PRIVILEGES ON dolphinscheduler.* TO 'dolphinscheduler'@'%' IDENTIFIED BY 'DophinScheduler123';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
## 更改策略设置为0,最低级的密码,只需大于8位即可
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON dolphinscheduler.* TO 'dolphinscheduler'@'%' IDENTIFIED BY 'DophinScheduler123';
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> GRANT ALL PRIVILEGES ON dolphinscheduler.* TO 'dolphinscheduler'@'localhost' IDENTIFIED BY 'DophinScheduler123';
Query OK, 0 rows affected, 2 warnings (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> exit;
三 修改数据源
[root@hadoop_zxy conf]# vim datasource.properties
## 将原有pgsql的数据源配置注释掉,添加MySQL的
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://***.***.**.**:3306/dolphinscheduler?useSSL=false
spring.datasource.username=dolphinscheduler
spring.datasource.password=DophinScheduler123
四 初始化MySQL
[root@hadoop_zxy script]# ll
total 36
-rw-rw-r-- 1 1004 1004 1577 Dec 16 2020 create-dolphinscheduler.sh
-rw-rw-r-- 1 1004 1004 4703 Dec 16 2020 dolphinscheduler-daemon.sh
-rw-rw-r-- 1 1004 1004 1807 Dec 16 2020 monitor-server.sh
-rw-rw-r-- 1 1004 1004 1701 Dec 16 2020 remove-zk-node.sh
-rw-rw-r-- 1 1004 1004 2247 Dec 16 2020 scp-hosts.sh
-rw-rw-r-- 1 1004 1004 2020 Dec 16 2020 start-all.sh
-rw-rw-r-- 1 1004 1004 2015 Dec 16 2020 stop-all.sh
-rw-rw-r-- 1 1004 1004 1578 Dec 16 2020 upgrade-dolphinscheduler.sh
[root@hadoop_zxy script]# chmod +x *
[root@hadoop_zxy script]# ll
total 36
-rwxrwxr-x 1 1004 1004 1577 Dec 16 2020 create-dolphinscheduler.sh
-rwxrwxr-x 1 1004 1004 4703 Dec 16 2020 dolphinscheduler-daemon.sh
-rwxrwxr-x 1 1004 1004 1807 Dec 16 2020 monitor-server.sh
-rwxrwxr-x 1 1004 1004 1701 Dec 16 2020 remove-zk-node.sh
-rwxrwxr-x 1 1004 1004 2247 Dec 16 2020 scp-hosts.sh
-rwxrwxr-x 1 1004 1004 2020 Dec 16 2020 start-all.sh
-rwxrwxr-x 1 1004 1004 2015 Dec 16 2020 stop-all.sh
-rwxrwxr-x 1 1004 1004 1578 Dec 16 2020 upgrade-dolphinscheduler.sh
[root@hadoop_zxy script]#
[root@hadoop_zxy script]# ./create-dolphinscheduler.sh
...
12:42:19.951 [main] INFO org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler - upgrade DolphinScheduler finished
12:42:19.951 [main] INFO org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler - create DolphinScheduler success
五 创建jdk链接
## 默认读取/usr/bin/java,将创建原有的jdk文件到整个目录
[root@hadoop_zxy dolphinscheduler-1.3.4]# ln -s /zxy/apps/jdk1.8.0_311/ /usr/bin/java
六 修改配置文件
[root@hadoop_zxy config]# pwd
/zxy/apps/dolphinscheduler-1.3.4/conf/config
[root@hadoop_zxy config]# ls
install_config.conf
[root@hadoop_zxy config]# vim install_config.conf
install_config.conf
# 数据库类型
dbtype="mysql"
# 数据库IP+Port
dbhost="***.***.**.**:3306"
# 数据库用户名
username="dolphinscheduler"
# 数据库名
dbname="dolphinscheduler"
# 数据库用户密码
password="DophinScheduler123"
# zookeeper地址,这里安装的伪分布式
zkQuorum="***.***.**.**:2181,***.***.**.**:2182,***.***.**.**:2183"
# dolphinscheduler的install路径(重新创建自定义路径,不是DS的解压目录)
installPath="/zxy/apps/dolphinscheduler-1.3.4/dolphinscheduler"
# 使用哪个用户创建
deployUser="dolphinscheduler"
# 邮件配置协议,以下关于邮件内容,根据需要使用
mailServerHost="smtp.exmail.qq.com"
# 邮件服务端口
mailServerPort="25"
# 邮件发送者
mailSender="xxxxxxxxxx"
# 邮件接收者
mailUser="xxxxxxxxxx"
# 邮箱密码
mailPassword="xxxxxxxxxx"
# TSL协议邮箱设置为true,否则为false
starttlsEnable="true"
# 开启SSL协议配置为true,否则false,但是starttlsEnable和sslEnable不能同时为true
sslEnable="false"
# 邮件服务地址
sslTrust="smtp.exmail.qq.com"
# 业务用到的比如sql等资源文件上传到哪里,可以设置:HDFS,S3,NONE,单机如果想使用本地文件系统,请配置为HDFS,因为HDFS支持本地文件系统;如果不需要资源上传功能请选择NONE。强调一点:使用本地文件系统不需要部署hadoop
resourceStorageType="NONE"
#如果上传资源保存想保存在hadoop上,hadoop集群的NameNode启用了HA的话,需要将hadoop的配置文件core-site.xml和hdfs-site.xml放到安装路径的conf目录下,本例即是放到/opt/soft/dolphinscheduler/conf下面,并配置namenode cluster名称;如果NameNode不是HA,则只需要将mycluster修改为具体的ip或者主机名即可
defaultFS="hdfs://mycluster:8020"
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=""即可
yarnHaIps="192.168.xx.xx,192.168.xx.xx"
# 如果ResourceManager是HA或者没有使用到Yarn保持默认值即可;如果是单ResourceManager,请配置真实的ResourceManager主机名或者ip
singleYarnIp="yarnIp1"
# 资源上传根路径,主持HDFS和S3,由于hdfs支持本地文件系统,需要确保本地文件夹存在且有读写权限
resourceUploadPath="/zxy/apps/dolphinscheduler-1.3.4/data/dolphinscheduler"
# 具备权限创建resourceUploadPath的用户
hdfsRootUser="hdfs"
kerberosStartUp="false"
krb5ConfPath="$installPath/conf/krb5.conf"
keytabUserName="hdfs-mycluster@ESZ.COM"
keytabPath="$installPath/conf/hdfs.headless.keytab"
# DS的api端口号
apiServerPort="12345"
# 单机服务,如果是多台服务器可以用','连接
ips="***.***.**.**"
# SSH端口,默认22
sshPort="22"
# 单机服务,如果是多台服务器,可以设置master启动在哪台服务器
masters="***.***.**.**"
# 选择worker部署在哪台服务器上,default为组名
workers="***.***.**.**:default"
# 报警服务部署在哪台服务器
alertServer="***.***.**.**"
# 后端AIP部署在哪台
apiServers="***.***.**.**"
七 启动
启动zookeeper
[root@hadoop_zxy zookeeper-3.6.3]# bin/zkServer.sh start zoo1.cfg
ZooKeeper JMX enabled by default
Using config: /zxy/apps/zookeeper/zookeeper-3.6.3/bin/../conf/zoo1.cfg
Starting zookeeper ... STARTED
[root@hadoop_zxy zookeeper-3.6.3]# bin/zkServer.sh start zoo2.cfg
ZooKeeper JMX enabled by default
Using config: /zxy/apps/zookeeper/zookeeper-3.6.3/bin/../conf/zoo2.cfg
Starting zookeeper ... STARTED
[root@hadoop_zxy zookeeper-3.6.3]# bin/zkServer.sh start zoo3.cfg
ZooKeeper JMX enabled by default
Using config: /zxy/apps/zookeeper/zookeeper-3.6.3/bin/../conf/zoo3.cfg
Starting zookeeper ... STARTED
[root@hadoop_zxy zookeeper-3.6.3]#
启动dolphinscheduler
## 启动ds [sh install.sh] 关闭ds [sh stop-all.sh]
[root@hadoop_zxy dolphinscheduler-1.3.4]# sh install.sh
[root@hadoop_zxy bin]# jps
6081 Jps
5763 ApiApplicationServer
5078 QuorumPeerMain
4983 QuorumPeerMain
5607 MasterServer
5643 WorkerServer
5679 LoggerServer
5183 QuorumPeerMain
[root@hadoop_zxy bin]#
八 登录
http://**...:12345/dolphinscheduler
登录名:admin
密码:dolphinscheduler123
以上是关于dolphinscheduler单机部署安装的主要内容,如果未能解决你的问题,请参考以下文章
大数据篇:DolphinScheduler-1.2.0.release安装部署