Run Debezium for SQLServer in Ubuntu step by step

Prior ran in the docker Debezium, there is a virtual distributed environment, prepare in stand-alone mode, Ubuntu ran below Debezium.

First prepare the same environment

Kafka-2.12-2.2.0的包,MSSQL Connector包(debezium-connector-sqlserver-0.9.5.Final.jar),

Ubuntu 16.04 LTS, run inside the virtual machine, Ubuntu is installed OpenJDK 8, the external host apparatus is installed database SQLServer IP network IP: 192.168.0.135,

Kafka-Manager-1.3.3.7 package, with the auxiliary see Topic.

Step 1: Let opt ​​directory permissions.

opt is the system folder permissions are protected up
to open the terminal and type the following command

sudo chmod 777 /opt 

Enter then enter your password and then press Enter

 

Step 2: Set easily copy files shared folders

Set Ubuntu virtual machine and an external host machine's shared folders

First of all virtual machines to mount a Windows folder as a shared folder named Share

Then open the Linux command line, execute the following command, case sensitive,

- Mount shared partition 
sudo Mount -t vboxsf report this content share / mnt / Share /

Such success is mount the shared folder mnt / Share the following directory.

 

 

 

Step 3: Copy files

The Kafka-2.12-2.2.0 copy to opt directory,

The packet copy to MSSQL Connector Kafka-2.12-2.2.0 directory, create a folder Connector

Directory structure is as follows:

 

Step 4: export environment

Excuting an order

sudo gedit /etc/profile

In the bottom of the file adding the following code that tells the system startup directory jar package

export CLASSPATH=$CLASSPATH:/opt/kafka_2.12-2.2.0/libs/*
export CLASSPATH=$CLASSPATH:/opt/kafka_2.12-2.2.0/connect/debezium-connector-sqlserver/*
export KAFKA_HOME=/opt/kafka_2.12-2.2.0

保存退出,不想重启的情况下,执行命令保证环境配置生效。

source /etc/profile

 

第5步:启动zookeeper单机环境

这里只想测试,就不搞分布式那么麻烦了。zookeeper用默认的配置文件就行了,不需要修改。

/opt/kafka_2.12-2.2.0/bin/zookeeper-server-start.sh  /opt/kafka_2.12-2.2.0/config/zookeeper.properties

 

Guess you like

Origin www.cnblogs.com/Bruce_H21/p/10984707.html