Mydatahorbor安装配置(支持直接复制代码安装)

mydataharbor 是一个数据库中间件、支持全量、增量、实时同步,遗憾的是脚本得自己写
官方网址:https://www.mydataharbor.com
为了防止各种坑,整合到一个目录下面了,脚本没写,跟脚本没啥区别了

目录结构如下

├── mydatahorbor
│   ├── zookeeper 3.7.0
│   ├── console 1.0.4
│   ├── server 1.0.4

国外下载地址:

https://www.apache.org/dyn/closer.lua/zookeeper/zookeeper-3.7.0/apache-zookeeper-3.7.0-bin.tar.gz
https://github.com/mydataharbor/mydataharbor/releases/download/1.0.4/mydataharbor-console-1.0.4-bin.tar.gz
https://github.com/mydataharbor/mydataharbor/releases/download/1.0.4/mydataharbor-server-1.0.4-bin.tar.gz

国内下载地址

http://down.starli.top/database-tools/zookeeper/apache-zookeeper-3.7.0-bin.tar.gz
http://down.starli.top/database-tools/mydataharbor/mydataharbor-console-1.0.4-bin.tar.gz
http://down.starli.top/database-tools/mydataharbor/mydataharbor-server-1.0.4-bin.tar.gz

一、安装环境

yum install -y wget vim java

二、安装zookeeper

1.基础安装

mkdir /mydataharbor #创建目录
cd /mydataharbor    #进入目录
http://down.starli.top/database-tools/zookeeper/apache-zookeeper-3.7.0-bin.tar.gz   #下载ZK
tar -zxf apache-zookeeper-3.7.0-bin.tar.gz  #解压
mv apache-zookeeper-3.7.0-bin zookeeper #命名文件夹
mv /mydataharbor/zookeeper/conf/zoo_sample.cfg /mydataharbor/zookeeper/conf/zoo.cfg #

2.修改配置
zk3.5以后自带控制台会占用8080,改成8081

echo "admin.serverPort=8081">>/mydataharbor/zookeeper/conf/zoo.cfg

附带解决方法:

(1)删除jetty。
(2)修改端口。
修改方法的方法有两种,一种是在启动脚本中增加 -Dzookeeper.admin.serverPort=你的端口号.一种是在zoo.cfg中增加admin.serverPort=没有被占用的端口号
(3)停用这个服务,在启动脚本中增加"-Dzookeeper.admin.enableServer=false"
(4)进入data目录下修改zoo.cfg文件。在文件最后一行添加admin.serverPort=8123

3.删除多余文件

rm -rf /mydataharbor/zookeeper/*.txt
rm -rf /mydataharbor/zookeeper/*.md

4.zookeeper常用命令

cat /mydataharbor/zookeeper/conf/zoo.cfg    #查看zk配置文件
vim /mydataharbor/zookeeper/conf/zoo.cfg    #编辑zk配置文件

cat /mydataharbor/zookeeper/logs/*.out      #查看zk日志
rm -rf /mydataharbor/zookeeper/logs/*       #删除ZK日志

sh /mydataharbor/zookeeper/bin/startup.sh   #启动
sh /mydataharbor/zookeeper/bin/stop.sh      #关闭
sh /mydataharbor/zookeeper/bin/status.sh    #运行状态

三、安装mydataharbor

1.基础安装

cd /mydataharbor    #进入指定目录
wget http://down.starli.top/database-tools/mydataharbor/mydataharbor-console-1.0.4-bin.tar.gz   #下载
tar -zxf mydataharbor-console-1.0.4-bin.tar.gz #解压
mv mydataharbor-console-1.0.4 console #命名console
wget http://down.starli.top/database-tools/mydataharbor/mydataharbor-server-1.0.4-bin.tar.gz    #下载
tar -zxf mydataharbor-server-1.0.4-bin.tar.gz #解压
mv mydataharbor-server-1.0.4 server #命名server
rm -rf *.tar.gz #清理掉安装包

2.启动顺序:先控制台console,再服务server
启动命令:

sh /mydataharbor/console/bin/start.sh
sh /mydataharbor/server/bin/start.sh

停止命令:

sh /mydataharbor/console/bin/stop.sh
sh /mydataharbor/server/bin/stop.sh

查看修改配置:

#console:
cat /mydataharbor/console/config/app*
vim /mydataharbor/console/config/app*
#server:
cat /mydataharbor/server/server/app*
vim /mydataharbor/console/config/app*

查看日志:

cat /mydataharbor/console/logs/catalina.log
cat /mydataharbor/server/logs/catalina.log

清理日志:

rm -rf /mydataharbor/console/logs/*
rm -rf /mydataharbor/server/logs/*

四、访问

http://ip:8080

如果怕麻烦,直接复制代码安装就行了,基本没啥问题

五、附上Mydatahorbor各种插件

http://down.starli.top/?dir=/database-tools/mydataharbor/mydataharbor-Plus

标签

发表评论