设为首页 收藏本站
查看: 3340|回复: 0

[经验分享] windows 下 cannal & otter 配置

[复制链接]

尚未签到

发表于 2017-3-2 09:57:14 | 显示全部楼层 |阅读模式
技术准备:下载相关组件和文档,下载地址:http://pan.baidu.com/s/1mgVIL5Y
电脑:最好准备两台以上机器进行测试;


mysql数据库配置:



[client]
port=3306
[mysql]
#如果不是修改成UTF8
default-character-set=UTF8
[mysqld]
port=3306
#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files/MySQL/MySQL Server 5.5/"
#Path to the database root
datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/"
# The default character set that will be used when a new schema or table is
#如果不是修改成UTF8
character-set-server=UTF8
# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
# connection limit has been reached.
max_connections=100
query_cache_size=0
table_cache=256
tmp_table_size=35M
thread_cache_size=8
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=69M
key_buffer_size=55M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K




#*** INNODB Specific options ***
innodb_additional_mem_pool_size=3M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=2M
innodb_buffer_pool_size=107M
innodb_log_file_size=54M
innodb_thread_concurrency=10
#开启binlog
log-bin=mysql-bin
#选择row模式
binlog-format=ROW
#配置mysql replaction需要定义,不能和canal的slaveId重复
server_id=1


canal 部署与测试:


项目地址:https://github.com/alibaba/canal


配置:vi conf/example/instance.properties#################################################
## mysql serverId
canal.instance.mysql.slaveId = 1234
# position info,需要改成自己的数据库信息
canal.instance.master.address = 127.0.0.1:3306
canal.instance.master.journal.name =
canal.instance.master.position =
canal.instance.master.timestamp =
#canal.instance.standby.address =
#canal.instance.standby.journal.name =
#canal.instance.standby.position =
#canal.instance.standby.timestamp =
# username/password,需要改成自己的数据库信息
canal.instance.dbUsername = canal  
canal.instance.dbPassword = canal
canal.instance.defaultDatabaseName =
canal.instance.connectionCharset = UTF-8
# table regex
canal.instance.filter.regex = .*\\..*
#################################################
  说明:

  • canal.instance.connectionCharset 代表数据库的编码方式对应到java中的编码类型,比如UTF-8,GBK , ISO-8859-1
  • 启动:sh bin/startup.sh
  • 日志:vi logs/canal/canal.log
  • 关闭:sh bin/stop.sh



日志显示:the canal server is running now ...... 启动成功


otter部署与测试:

项目地址:https://github.com/alibaba/otter


配置:
DSC0000.png



1、配置 aria2
配置环境变量即可 $ARIA2_HOME:D:\Program Files\aria2-1.20.0-win-64bit-build1
然后将变量$ARIA2_HOME 加入Path
2、配置zookeeper
切换到目录:zookeeper-3.4.8\conf  将文件zoo_sample.cfg重新命名成zoo.cfg
打开zoo.cfg配置:

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=E:\\zookeeper\\data
dataLogDir=E:\\zookeeper\\log
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1


3、manager配置:


创建数据库:使用附件中文件managersql.txt ,也可以使用 开源项目地址下提供的,是一样的;




## otter manager domain name
otter.domainName = 127.0.0.1
## otter manager http port
otter.port = 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.database.driver.username = root
otter.database.driver.password = Aa12345


## otter communication port
otter.communication.manager.port = 1099


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


## default zookeeper address   配置zookeeper的ip及端口
otter.zookeeper.cluster.default = 127.0.0.1:2181
## 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


4、node配置
切换到 node的配置地址:D:\otter\node.deployer-4.2.12\conf(我的)
切换文件目录命令:cd /d D:\otter\node.deployer-4.2.12\conf
cmd 命令:echo 1空格>空格nid   #执行的时候将文字换成真空格
配置文件:

# otter node root dir
otter.nodeHome = ${user.dir}/../


## otter node dir
otter.htdocs.dir = ${otter.nodeHome}/htdocs
otter.download.dir = ${otter.nodeHome}/download
otter.extend.dir= ${otter.nodeHome}/extend


## default zookeeper sesstion timeout = 60s
otter.zookeeper.sessionTimeout = 60000


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


## otter arbitrate & node connect manager config
otter.manager.address = 172.16.8.164:1099




注意:同颜色表示同一个值


界面配置:
数据源:
DSC0001.png

数据表:
DSC0002.png

canal:
DSC0003.png



zookeeper:
DSC0004.png

note:
DSC0005.png

channel:
DSC0006.png

pipeline:
DSC0007.png

映射配置:
DSC0008.png

监控配置:
DSC0009.png










来自为知笔记(Wiz)

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-349134-1-1.html 上篇帖子: WebSocket协议的接口性能之Jmeter 下篇帖子: eclipse maven新建springMVC项目(原创)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表