2023年2月26日
Maxwell 部署
大数据 · Maxwell
在三台服务器上部署 Maxwell,用于数据同步。
上传并解压
scp xxx /opt/softs/ cd /opt/softs tar -xvf tar -xvf maxwell-1.29.0.tar.gz mv maxwell-1.29.0 ../module/ cd /opt/module/maxwell-1.29.0
scp xxx /opt/softs/ cd /opt/softs tar -xvf tar -xvf maxwell-1.29.0.tar.gz mv maxwell-1.29.0 ../module/ cd /opt/module/maxwell-1.29.0
scp xxx /opt/softs/ cd /opt/softs tar -xvf tar -xvf maxwell-1.29.0.tar.gz mv maxwell-1.29.0 ../module/ cd /opt/module/maxwell-1.29.0
创建环境变量
vim /etc/profile # maxwell export MAXWELL_HOME=/opt/module/maxwell-1.29.0 export PATH=$PATH:$MAXWELL_HOME/bin source /etc/profile
vim /etc/profile # maxwell export MAXWELL_HOME=/opt/module/maxwell-1.29.0 export PATH=$PATH:$MAXWELL_HOME/bin source /etc/profile
vim /etc/profile # maxwell export MAXWELL_HOME=/opt/module/maxwell-1.29.0 export PATH=$PATH:$MAXWELL_HOME/bin source /etc/profile
配置 maxwell
cp config.properties.example config.properties vim config.properties kafka.bootstrap.servers=master:9092 host=<mysql-ip> user=<mysql-user> password=<mysql-password>
cp config.properties.example config.properties vim config.properties kafka.bootstrap.servers=master:9092 host=<mysql-ip> user=<mysql-user> password=<mysql-password>
cp config.properties.example config.properties vim config.properties kafka.bootstrap.servers=master:9092 host=<mysql-ip> user=<mysql-user> password=<mysql-password>
修改MySQL 配置
vim /etc/my.cnf server_id=1 log-bin=mysql-bin binlog_format=row # log-bin-to-db=<DB_NAME>
vim /etc/my.cnf server_id=1 log-bin=mysql-bin binlog_format=row # log-bin-to-db=<DB_NAME>
vim /etc/my.cnf server_id=1 log-bin=mysql-bin binlog_format=row # log-bin-to-db=<DB_NAME>
启动
cd /opt/module/maxwell-1.29.0 bin/maxwell --config ./config.properties # 或者 $MAXWELL_HOME/bin/maxwell -config $MAXWELL_HOME/config.properties 需要环境变量 # 启动kafka自带的消费者检查是否成功 kafka-console-consumer.sh --bootstrap-server bigdata1:9092 --topic maxwell
cd /opt/module/maxwell-1.29.0 bin/maxwell --config ./config.properties # 或者 $MAXWELL_HOME/bin/maxwell -config $MAXWELL_HOME/config.properties 需要环境变量 # 启动kafka自带的消费者检查是否成功 kafka-console-consumer.sh --bootstrap-server bigdata1:9092 --topic maxwell
cd /opt/module/maxwell-1.29.0 bin/maxwell --config ./config.properties # 或者 $MAXWELL_HOME/bin/maxwell -config $MAXWELL_HOME/config.properties 需要环境变量 # 启动kafka自带的消费者检查是否成功 kafka-console-consumer.sh --bootstrap-server bigdata1:9092 --topic maxwell