如何编译开源的数据同步工具dbsync
1)下载代码git clone git@github.com:aliyun/rds_dbsync.git2)下载安装mysql的开发包下载repo的rpm:wget http://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm安装repo:rpm -Uvh mysql57-community-release-el6-9.noarch.rpm编辑 vi /etc/yum.repos.d/mysql-community.repo,把除mysql 57外的其他repo的enable设为0查看可安装的mysql报:yum list mysql-community-*安装mysql的开发包: yum install mysql-community-devel.x86_643)下载安装pg的安装包下载repo的rpm:wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm 安装repo(注意在rhel平台加上--nodeps否则报错):rpm -ivh pgdg-centos96-9.6-3.noarch.rpm --nodpes 编辑 vi /etc/yum.repos.d/pgdg-96-centos.repo,可能需要把https改成http 安装pg的server和开发包:yum install postgresql96-devel.x86_64 postgresql96-server.x86_644) 执行make5) 打包二进制 make package 将生成一个install目录,里面有二进制和lib6)执行dbsync:cd install; bin/mysql2pgsql
赞0
踩0