1、Mongo数据库的安装。
首先介绍一下Mongo数据库,Mongo数据库是一个面向集合的数据库,和传统的关系性的数据库是有一定的关系的。它是有c++编写的分布式数据库。
它的安装步骤如下:
1>> 下载Mongo数据库安装文件。下载地址为:http://www.mongodb.org/downloads 要根据你的计算机系统为准下载不同的安装文件。
本人的操作系统的是Windows 7 32bit ,下载所得安装文件为:mongodb-win32-i386-2.0.2.zip。
2>> 新建 E:/MongoDB/data,解压安装文件,找到bin目录,讲里面的所有的.exe文件全部拷贝到 E:/MongoDB/目录下。
3>> 配置MongoDB数据库服务。
打开命令行窗口:
C:/Users/DELL>e:
E:/>cd MongoDB
E:/MongoDB>mongod –dbpath E:/MongoDB/data
Sat Dec 31 15:45:50
Sat Dec 31 15:45:50 warning: 32-bit servers don’t have journaling enabled by default. Please use –journal if you want durability.
Sat Dec 31 15:45:50
Sat Dec 31 15:45:50 [initandlisten] MongoDB starting : pid=11160 port=27017 dbpath=E:/MongoDB/data 32-bit host=DELL-PC
Sat Dec 31 15:45:50 [initandlisten]
Sat Dec 31 15:45:50 [initandlisten] ** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
Sat Dec 31 15:45:50 [initandlisten] ** see http://blog.mongodb.org/post/137788967/32-bit-limitations
Sat Dec 31 15:45:50 [initandlisten] ** with –journal, the limit is lower
Sat Dec 31 15:45:50 [initandlisten]
Sat Dec 31 15:45:50 [initandlisten] db version v2.0.2, pdfile version 4.5
Sat Dec 31 15:45:50 [initandlisten] git version: 514b122d308928517f5841888ceaa4246a7f18e3
Sat Dec 31 15:45:50 [initandlisten] build info: windows (5, 1, 2600, 2, ‘Service Pack 3’) BOOST_LIB_VERSION=1_42
Sat Dec 31 15:45:50 [initandlisten] options: { dbpath: “E:/MongoDB/data” }
Sat Dec 31 15:45:50 [websvr] admin web console waiting for connections on port 28017
Sat Dec 31 15:45:50 [initandlisten] waiting for connections on port 27017
Sat Dec 31 15:46:50 [clientcursormon] mem (MB) res:16 virt:64 mapped:0
Sat Dec 31 15:47:42 [initandlisten] connection accepted from 127.0.0.1:15216 #1
Sat Dec 31 15:47:42 [conn1] end connection 127.0.0.1:15216
Sat Dec 31 15:47:42 [initandlisten] connection accepted from 127.0.0.1:15217 #2
Sat Dec 31 15:47:42 [conn2] end connection 127.0.0.1:15217
Sat Dec 31 15:51:50 [clientcursormon] mem (MB) res:16 virt:61 mapped:0
Sat Dec 31 15:56:50 [clientcursormon] mem (MB) res:16 virt:61 mapped:0
Sat Dec 31 16:01:50 [clientcursormon] mem (MB) res:16 virt:61 mapped:0
Sat Dec 31 16:06:50 [clientcursormon] mem (MB) res:16 virt:61 mapped:0
Sat Dec 31 16:07:04 [initandlisten] connection accepted from 127.0.0.1:15734 #3
Sat Dec 31 16:11:50 [clientcursormon] mem (MB) res:16 virt:62 mapped:0
Sat Dec 31 16:13:33 [initandlisten] connection accepted from 126.33.8.183:15849 #4
Sat Dec 31 16:13:33 [conn4] end connection 126.33.8.183:15849
Sat Dec 31 16:16:50 [clientcursormon] mem (MB) res:16 virt:62 mapped:0
OK MongoDB 数据库安装成功并顺利启动!
在浏览器地址栏敲下:http://localhost:27017/
你将会看到:
You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/9621.html