mongo-connector安装:
https://github.com/mongodb-labs/mongo-connector
1. yum -y install openssl*
2.编译安装python3
下载地址:https://www.python.org/ftp/python/
- tar zxvf Python-3.5.2.tgz
- cd Python-3.5.2
- ./configure
- make && make install
(在安装结尾出可以看到pip3已经被安装的提示,如果提示require TLS/SSL,说明没有安装openssl-devel)
yum install openssl-devel -y
3.pip3安装成功后,安装mongo-connector:
pip3 install --target=/usr/local/pythonpip/site-packages ‘mongo-connector[elastic5]‘
4.启动mongo集群
5.启动es集群
6.运行连接命令:
mongo-connector -m 192.168.1.151:27017 -t 192.168.1.151:9200 -d elastic2_doc_manager
7.验证mongoDB数据是否同步到ES:
大功告成,可喜可贺!
时间: 2024-10-08 20:21:59