轉 mongodb win7 32位系統安裝以及配置
今天安裝 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位系統安裝以及配置