1. 下载MongoDB的windows版本:mongodb-win32-x86_64-2008plus-ssl-3.0.4.zip,Linux版本也在这里下载,下载地址: http://www.mongodb.org/downloads
2. 解压MongoDB在D:\server\mongodb, 在D:\server\mongodb下创建db目录和logs目录,用来存数据文件和日志。
3. 新建环境变量mongodb_home,值为E:\server\mongodb,在Path里添加 %mongodb_home%\bin;
4. 在%mongodb_home%目录创建mongo.conf文件,配置dbpath和logpath信息:
dbpath = E:\server\mongodb\db logpath = E:\server\mongodb\logs\mongodb.log port = 27017 logappend = true
在%mongodb_home%\bin目录执行安装mongodb服务的命令:
mongod --config E:\server\mongodb\mongo.conf
MongoDB服务安装成功的消息:
2015-07-09T22:15:33.367+0800 I CONTROL [thread1] Hotfix KB2731284 or later update is not installed, will zero-out data files 2015-07-09T22:15:33.368+0800 I CONTROL [thread1] Trying to install Windows service 'MongoDB' 2015-07-09T22:15:33.844+0800 I CONTROL [thread1] Service 'MongoDB' (MongoDB) installed with command line 'D:\server\mongodb\bin\mongod.exe --dbpath=D:\server\mongodb\db --logpath=D:\server\mongodb\logs\mongodb.log --service' 2015-07-09T22:15:33.845+0800 I CONTROL [thread1] Service can be started from the command line with 'net start MongoDB'
PS:如果此命令不能正常启动, 就改为以管理员身份启动CMD窗口。
5. mongoDB的端口为27017, 在浏览器访问 http://localhost:27017, 会输出提示:
It looks like you are trying to access MongoDB over HTTP on the native driver port.
6. 在bin目录重新打开一个终端, 输入mongo,提示:
2015-07-09T22:24:21.791+0800 I CONTROL [thread1] Hotfix KB2731284 or later upda te is not installed, will zero-out data files MongoDB shell version: 3.1.4 connecting to: test Server has startup warnings: 2015-07-09T22:18:28.395+0800 I CONTROL [initandlisten] 2015-07-09T22:18:28.395+0800 I CONTROL [initandlisten] ** NOTE: This is a devel opment version (3.1.4) of MongoDB. 2015-07-09T22:18:28.395+0800 I CONTROL [initandlisten] ** Not recommended for production. 2015-07-09T22:18:28.395+0800 I CONTROL [initandlisten]
信息显示mongodb启动状态正常。
PS:如需要帮助信息,可使用help命令。
7. 查看mongoDB日志, 在D:\server\mongodb\logs目录下, 存着mongoDB的操作日志,可对mongDB的运行情况进行查看或排错。
8. 操作命令:
启动MongoDB:net start MongoDB
停止MongoDB:net stop MongoDB
删除MongoDB:sc delete MongoDB
相关推荐
本来不想要资源分硬是要有,没办法。。。WIN7装mongodb可视化工具robomongo
本来不想要资源分硬是要有,没办法。。。WIN7装mongodb所需的插件
mongodb Windows7 64位
Win7+MongoDB分片部署方案,讲述在win7或win server环境下搭建mongodb集群的详细方法,内容来自本机实际操作,亲测可用
mongodb 可视化工具。记住是64位的,在32位操作系统可能有不兼容情况
mongodb_x64位windows安装版本,官方正版,mongodb_x64位windows安装版本,官方正版
win7 64 mongodb 的php 扩展, win7 64 mongodb 的php 扩展
只需5积分。修复hotfix更新,连接不上test问题, KB2731284 mongodb补丁, win7用,包含x86和x64两种。
在64位win7操作系统上成功安装mongodb3.0,安装非常方便,免去了安装linux系统才能安装mongodb的麻烦.
mongodb仅支持在win7操作系统64位上安装,分享给需要的同学
mongodb-win32-x86_64-2.0.6 含有详细的安装说明,此包应用于win7 64bit 操作系统!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!...
windows32位mongodb3.2.11
本文实例讲述了win7平台快速安装、启动mongodb的方法。分享给大家供大家参考,具体如下: 写在开头 最近在学习nodejs操作mongodb的知识,但是发现每一次启动mongodb都需要敲长长的指令,一路cd到mongodb的bin目录...
MongoDB windows 64位安装包最新版,msi格式.windows下直接解压安装即可 国内MongoDB官网下载不了,找了好久的安装包,亲测没问题,分享给大家
MongoDB[2] 是一个介于关系数据库和非关系数据库之间的产品,是非关系数据库当中功能最丰富,最像关系数据库的。他支持的数据结构非常松散,是类似json的bson格式,因此可以存储比较复杂的数据类型。Mongo最大的特点...
MongoDB 是一个基于分布式文件存储的数据库。由C++语言编写。旨在为WEB应用提供可扩展的高性能数据存储解决方案。 MongoDB 是一个介于关系数据库和非关系数据库之间的产品,是非关系数据库当中功能最丰富,最像关系...
MongoDB-4.0.6 win7 64位版本免安装包,解压即可直接运行,内含一键注册安装Windows服务批处理文件
win7环境下,使用vs2017编译的MongoDB-c-driver 和MongoDB-cxx-driver。 下载之后可以直接放入C++工程中使用。 版本信息: mongo-c-driver-1.13.0, mongo-cxx-driver-r3.4.0
mongodb-src-r3.0.6,win7版本