mysql 本地库 远程库 同步,【MySQL】数据库远程同步:alibaba otter

[root@wallet01 ~]# tar zxvf zookeeper-3.4.14.tar.gz -C /usr/local/

[root@wallet01 ~]# cd /usr/local/zookeeper-3.4.14/conf

[root@wallet01 conf]# mv zoo_sample.cfg zoo.cfg

[root@wallet01 conf]# vi log4j.properties

log4j.rootLogger=INFO,ROLLINGFILE

[root@wallet01 ~]# cd /usr/local/zookeeper-3.4.14/bin

[root@wallet01 bin]# vi zkEnv.sh

if [ "x${ZOO_LOG_DIR}" = "x" ]

then

ZOO_LOG_DIR="/usr/local/zookeeper-3.4.14/logs"

fi

if [ "x${ZOO_LOG4J_PROP}" = "x" ]

then

ZOO_LOG4J_PROP="INFO,ROLLINGFILE"

fi

[root@wallet01 ~]# mkdir -p /usr/local/zookeeper-3.4.14/logs

[root@wallet01 ~]# vi /etc/profile

PATH=$PATH:/usr/local/zookeeper-3.4.14/bin

[root@wallet01 ~]# zkServer.sh start

ZooKeeper JMX enabled by default

Using config: /usr/local/zookeeper-3.4.14/bin/../conf/zoo.cfg

Starting zookeeper ... STARTED

[root@wallet01 ~]# zkServer.sh status

ZooKeeper JMX enabled by default

Using config: /usr/local/zookeeper-3.4.14/bin/../conf/zoo.cfg

Mode: standalone

[root@wallet01 ~]# yum install -y nc

[root@wallet01 ~]# wget https://raw.github.com/alibaba/otter/master/manager/deployer/src/main/resources/sql/otter-manager-schema.sql --no-check-certificate

[root@wallet01 ~]# mysql -uroot -pabcd.1234

mysql> source otter-manager-schema.sql

mysql> grant all privileges on *.* to 'otter'@'%' identified by 'otter';

query ok, 0 rows affected (0.04 sec)

mysql> flush privileges;

query ok, 0 rows affected (0.05 sec)

[root@wallet01 ~]# mkdir -p /usr/local/manager

[root@wallet01 ~]# tar zxvf manager.deployer-4.2.17.tar.gz -C /usr/local/manager

[root@wallet01 ~]# cd /usr/local/manager/conf/

[root@wallet01 conf]# vi otter.properties

## otter manager domain name

otter.domainName = 192.168.40.34

## otter manager http port

otter.port = 8080

## 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.database.driver.username = otter

otter.database.driver.password = otter

## otter communication port

otter.communication.manager.port = 1099

## default zookeeper address

otter.zookeeper.cluster.default = 192.168.40.34:2181

## default zookeeper sesstion timeout = 60s

otter.zookeeper.sessionTimeout = 60000

[root@wallet01 ~]# cd /usr/local/manager/bin

[root@wallet01 bin]# ./startup.sh

[root@wallet01 ~]# cd /usr/local/manager/logs

[root@wallet01 logs]# cat manager.log

2018-11-19 10:29:26.146 [] INFO  com.alibaba.otter.manager.deployer.OtterManagerLauncher - ## start the manager server.

2018-11-19 10:29:49.427 [] INFO  com.alibaba.otter.manager.deployer.JettyEmbedServer - ##Jetty Embed Server is startup!

2018-11-19 10:29:49.427 [] INFO  com.alibaba.otter.manager.deployer.OtterManagerLauncher - ## the manager server is running now ......

[root@wallet02 ~]# mkdir -p /usr/local/node

[root@wallet02 ~]# tar zxvf node.deployer-4.2.17.tar.gz -C /usr/local/node

[root@wallet02 ~]# cd /usr/local/node/conf/

[root@wallet02 conf]# echo 1 > nid

[root@wallet02 conf]# vi otter.properties

## otter arbitrate & node connect manager config

otter.manager.address = 192.168.40.34:1099

[root@wallet02 ~]# cd /usr/local/node/bin

[root@wallet02 bin]# ./startup.sh

[root@wallet02 ~]# cd /usr/local/node/logs/node

[root@wallet02 node]# cat node.log

2018-11-19 10:58:09.830 [main] INFO  com.alibaba.otter.node.deployer.OtterLauncher - INFO ## the otter server is running now ......

[root@wallet03 ~]# mkdir -p /usr/local/node

[root@wallet03 ~]# tar zxvf node.deployer-4.2.17.tar.gz -C /usr/local/node

[root@wallet03 ~]# cd /usr/local/node/conf

[root@wallet03 conf]# echo 2 > nid

[root@wallet03 conf]# vi otter.properties

## otter arbitrate & node connect manager config

otter.manager.address = 192.168.40.34:1099

[root@wallet03 ~]# cd /usr/local/node/bin

[root@wallet03 bin]# ./startup.sh

[root@wallet03 ~]# cd /usr/local/node/logs/node

[root@wallet03 node]# cat node.log

2018-11-19 10:58:09.830 [main] INFO  com.alibaba.otter.node.deployer.OtterLauncher - INFO ## the otter server is running now ......

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值