1.mysql安装了才能安装mydumper
2.执行install_mydumper.sh脚本,内容如下:
#!/bin/bash
# Author: zhangdc
# DESC: 部署mydumper
echo "安装依赖"
echo "如果/opt/soft/不存在创建"
if [ ! -d "/opt/soft/" ];then
mkdir -p /opt/soft/
fi
rpm -ivhU /opt/rpm/mydumper/*.rpm
echo "解压安装包"
tar -zxvf /opt/soft/mydumper-0.9.1.tar.gz -C /opt/soft/ >/dev/null 2>&1
echo "开始编译"
cd /opt/soft/mydumper-0.9.1/
cmake .
if [ $? -ne 0 ];then
echo "编译失败"
exit;
fi
echo "开始安装"
make && make install
if [ $? -ne 0 ];then
echo "安装失败"
else
echo "安装成功"
fi
3.验证
执行mydumper --help