linux下安装canal
一、准备
1、下载jdk:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2、创建文件夹:mkdir /usr/local/java
3、解压文件:tar -zxvf jdk-8u181-linux-x64.tar.gz -C /usr/local/java/
4、修改环境变量:vim /etc/profile
添加如下内容:
JAVA_HOME=/usr/local/java/jdk1.8.0_181
CLASSPATH=$JAVA_HOME/lib/
PATH=$PATH:$JAVA_HOME/bin
export PATH JAVA_HOME CLASSPATH
5、重启机器或执行命令 :source /etc/profile
二、下载并解压
1、下载文件:wget https://github.com/alibaba/canal/releases/download/canal-1.1.0/canal.deployer-1.1.0.tar.gz
2、创建文件夹:mkdir /usr/local/canal
3、解压文件:tar -zxvf canal.deployer-1.1.0.tar.gz -C /usr/local/canal/
三、配置修改
1、打开配置文件:vim conf/example/instance.properties
2、mysql serverId,改成唯一的:
canal.instance.mysql.slaveId = 129
四、启动canal:
/usr/local/canal/bin/startup.sh