随笔分类 -  MongoDB

日常工作中使用的一些Mongodb语句
摘要:1、通过_userID字段查询重复录入内容 > db.template.aggregate({"$group": {_id: "$_userId",count:{"$sum":1}}},{$sort:{count:-1}}) 2、查询 db.template.find({"group_7ee1247ab7194482b86f82db556d8580.sex":"\b男"}).pretty() ... 阅读全文

posted @ 2016-10-27 15:42 K‘e0llm 阅读(329) 评论(0) 推荐(1)

MongoDB主从配置
摘要:master的配置# cat mongod.confdbpath = /app/sinova/mongodata/db #指定数据库目录logpath = /app/sinova/mongodata/log/mongod.log #指定mongodb日志port = 50000 ... 阅读全文

posted @ 2015-07-07 08:35 K‘e0llm 阅读(276) 评论(0) 推荐(0)

安装配置MongoDB
摘要:1.下载mongodb https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.8.tgz 2.解压 tar zxf mongodb-linux-x86_64-2.6.8.tgz 3.指定安装目录 mv mongodb-linux-x86_ 阅读全文

posted @ 2015-07-07 08:33 K‘e0llm 阅读(226) 评论(0) 推荐(0)

导航