otter安装之Otter Manager安装

时间:2024-04-06 12:28:23

otter-manager作为otter同步的管理台,可以对zookeeper,otter-node进行管理

1.下载安装包

2.下载otter-manager库初始化sql文件

 

3.搭建MySQL数据库并创建对应的库和用户

因为otter-manage依赖MySQL数据库,所有要搭建MySQL数据库,MySQL数据库的搭建过程参考另一篇博客:

https://blog.csdn.net/u014642915/article/details/56484167 

MySQL搭建完成之后创建otter库和otter用户 (可以自己定义名称)

CREATE USER 'otter'@'localhost' IDENTIFIED BY '123456';

GRANT all ON otter.* TO 'otter'@'localhost'; 

验证是否能本机通过otter数据库用户登录MySQL数据库

mysql -uotter -p123456

然后执行第二步中下载的sql文件,依次执行里面的建表语句

执行结果:

otter安装之Otter Manager安装

4.安装otter-manager

#mkdir /opt/otter-manager

#tar -xzvf manager.deployer-4.2.17.tar.gz -C /opt/otter-manager/

#mkdir /opt/otter-manager/logs

5.配置otter-manager

注意后面标红的是需要根据自己的实际情况进行配置的

#cd /opt/otter-manager/conf

#vim otter.properties 

## otter manager domain name
otter.domainName = 192.168.147.129    ##本机地址,用于远程机器访问是可以正常跳转
## otter manager http port
otter.port = 8080   ##访问端口,默认为8080
## jetty web config xml
otter.jetty = jetty.xml

## otter manager database config
otter.database.driver.class.name = com.mysql.jdbc.Driver
otter.database.driver.url = jdbc:mysql://127.0.0.1:3306/otter     ##otter库的连接地址
otter.database.driver.username = otter    ##数据库用户
otter.database.driver.password = 123456    ##数据库用户对应的密码

## otter communication port
otter.communication.manager.port = 1099    ##manager端口在搭建otter-node时使用

## otter communication payload size (default = 8388608)
otter.communication.payload = 8388608

## otter communication pool size
otter.communication.pool.size = 10

## default zookeeper address
otter.zookeeper.cluster.default = 127.0.0.1:2181     ##cluster默认IP和端口,默认即可
## default zookeeper sesstion timeout = 60s
otter.zookeeper.sessionTimeout = 60000

## otter arbitrate connect manager config
otter.manager.address = ${otter.domainName}:${otter.communication.manager.port}

## should run in product mode , true/false
otter.manager.productionMode = true

## self-monitor enable or disable
otter.manager.monitor.self.enable = true
## self-montir interval , default 120s
otter.manager.monitor.self.interval = 120
## auto-recovery paused enable or disable
otter.manager.monitor.recovery.paused = true
# manager email user config
otter.manager.monitor.email.host = smtp.gmail.com
otter.manager.monitor.email.username = 
otter.manager.monitor.email.password = 
otter.manager.monitor.email.stmp.port = 465
 

6.启动otter-manager服务并检查是否启动成功

#cd /opt/otter-manager/bin/

#sh start.sh

检查日志是否启动成功

#cat /opt/otter-manager/logs/manager.log 

看到日志中带有the manager server is running now 字样表示启成功

 [] INFO  com.alibaba.otter.manager.deployer.OtterManagerLauncher - ## the manager server is running now ......

 

7.登录otter-manager管理页面 

http:192.168.147.129:8080   用户名账号密码:admin/admin

出现如下图片表示登录成功

otter安装之Otter Manager安装

 

至此otter-manager已经搭建好了!