码迷,mamicode.com
首页 > 数据库 > 详细

转 mongodb win7 32位系统安装以及配置

时间:2018-11-15 17:18:42      阅读:288      评论:0      收藏:0      [点我收藏+]

标签:git   arc   list   oca   mini   ase   相同   warning   initial   

今天安装 win7 32位系统 mongodb 费了好大劲。。记录一下,希望相同的同学可以少踩点坑。

1.安装

我安装的是3.2.4  地址:http://downloads.mongodb.org/win32/mongodb-win32-i386-3.2.4-signed.msi

 

打开后安装。

 

2.创建db目录

在C盘根目录创建data文件夹,在data文件夹里再创建db文件夹用来存放数据。一定要记住在根目录!!

 

3.配置环境变量

我的目录是C:\Program Files\MongoDB\Server\3.2\bin

按照自己的目录来。

 

4.命令行下运行 MongoDB 服务器

打开命令行,输入

mongod.exe --dbpath c:\data\db

执行,会输出如下信息:

C:\Users\Administrator>mongod.exe --dbpath c:\data\db
2016-12-13T21:27:48.800+0800 I CONTROL [main]
2016-12-13T21:27:48.802+0800 W CONTROL [main] 32-bit servers don‘t have journal
ing enabled by default. Please use --journal if you want durability.
2016-12-13T21:27:48.802+0800 I CONTROL [main]
2016-12-13T21:27:48.812+0800 I CONTROL [main] Hotfix KB2731284 or later update
is not installed, will zero-out data files
2016-12-13T21:27:48.815+0800 I CONTROL [initandlisten] MongoDB starting : pid=8
056 port=27017 dbpath=c:\data\db 32-bit host=XTM-01612051619
2016-12-13T21:27:48.815+0800 I CONTROL [initandlisten] targetMinOS: Windows Vis
ta/Windows Server 2008
2016-12-13T21:27:48.816+0800 I CONTROL [initandlisten] db version v3.2.4
2016-12-13T21:27:48.816+0800 I CONTROL [initandlisten] git version: e2ee9ffcf9f
5a94fad76802e28cc978718bb7a30
2016-12-13T21:27:48.816+0800 I CONTROL [initandlisten] allocator: tcmalloc
2016-12-13T21:27:48.816+0800 I CONTROL [initandlisten] modules: none
2016-12-13T21:27:48.816+0800 I CONTROL [initandlisten] build environment:
2016-12-13T21:27:48.816+0800 I CONTROL [initandlisten] distarch: i386
2016-12-13T21:27:48.816+0800 I CONTROL [initandlisten] target_arch: i386
2016-12-13T21:27:48.816+0800 I CONTROL [initandlisten] options: { storage: { db
Path: "c:\data\db" } }
2016-12-13T21:27:48.819+0800 I - [initandlisten] Detected data files in c
:\data\db created by the ‘mmapv1‘ storage engine, so setting the active storage
engine to ‘mmapv1‘.
2016-12-13T21:27:48.837+0800 I CONTROL [initandlisten]
2016-12-13T21:27:48.837+0800 I CONTROL [initandlisten] ** WARNING: This 32-bit
MongoDB binary is deprecated
2016-12-13T21:27:48.838+0800 I CONTROL [initandlisten]
2016-12-13T21:27:48.838+0800 I CONTROL [initandlisten]
2016-12-13T21:27:48.839+0800 I CONTROL [initandlisten] ** NOTE: This is a 32 bi
t MongoDB binary.
2016-12-13T21:27:48.840+0800 I CONTROL [initandlisten] ** 32 bit builds a
re limited to less than 2GB of data (or less with --journal).
2016-12-13T21:27:48.841+0800 I CONTROL [initandlisten] ** Note that journ
aling defaults to off for 32 bit and is currently off.
2016-12-13T21:27:48.842+0800 I CONTROL [initandlisten] ** See http://doch
ub.mongodb.org/core/32bit
2016-12-13T21:27:48.843+0800 I CONTROL [initandlisten]
2016-12-13T21:27:48.855+0800 I NETWORK [HostnameCanonicalizationWorker] Startin
g hostname canonicalization worker
2016-12-13T21:27:48.855+0800 I FTDC [initandlisten] Initializing full-time d
iagnostic data capture with directory ‘c:/data/db/diagnostic.data‘
2016-12-13T21:27:48.859+0800 I NETWORK [initandlisten] waiting for connections
on port 27017

 

5.如果有storageEngine报错  在后面加上--storageEngine=mmvpa1 参数

转 mongodb win7 32位系统安装以及配置

标签:git   arc   list   oca   mini   ase   相同   warning   initial   

原文地址:https://www.cnblogs.com/saryli/p/9964163.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
分享档案
周排行
mamicode.com排行更多图片
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!