windows中mongoDB安装教程
下载路径:http://downloads.mongodb.org/win32/mongodb-win32-i386-1.7.0.zip
将一个DB文件夹 我是放到D盘,路径:Ddb
解压mongodb-win32-i386-1.7.0.zip 将其重命名为mongodb 放到D盘
打开cmd输入:D:mongodbbinmongod.exe –dbpath=d:db 启动mongod服务
再打开一个cmd输入:D:mongodbbin>mongo.exe
代码如下 复制代码
MongoDB shell version: 1.7.0
url: test
connecting to: test
type “exit” to exit
type “help” for help
>
5.D:mongodbbinmongod.exe -dbpath d:DB -install 注册windows service,哈哈 免得以后麻烦,每回要启动
6.
D:mongodbbin>mongo.exe
MongoDB shell version: 1.7.0
url: test
connecting to: test
type “exit” to exit
type “help” for help
> use test
switched to db test
> db.foo.save({hello:1,word:2})
> db.foo.find()
{ “_id” : ObjectId(“4bc1854e0140000000006f05″), “www.111cn.net” : 1, “word” : 2 }
7.到http://cn.php.net/manual/en/mongo.installation.php#mongo.installation.nix.里下载 相应版本dll文件
如:http://downloads.mongodb.org/mongo-latest-php5.2vc6ts.zip
8.将php_mongo.dll复制到php安装目录下的etc下目录下
9.重启apache或nginx
10.查看phpinfo
mongo
代码如下 复制代码
MongoDB Support enabled
Version 1.0.7
更多详细内容请查看:http://www.111cn.net/wy/200/45739.htm