mongo 安装:
1.按照 https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/ 安装
2.安装成功后创建用户
db.createUser( { "user" : "work",
"pwd": "21****56",
"roles" : [ { role: "__system", db: "admin" }
] }
)
mongo localhost:27017/admin -u work -p
3.修改配置文件/etc/mongod.conf 中的IP和PORT
4.mongo 导出命令
mongoexport --host 192.168.. --port * --username "your_name" --password "passwd" --db "db_name" --collection "col_name" --out "output.json" --authenticationDatabase admin -q '{ "createTimestamp": { $gte: 1464624000.0 }}'