抱歉,评论被关闭
mongoDB windows安装
下载路径:http://downloads.mongodb.org/win32/mongodb-win32-i386-1.7.0.zip
将一个DB文件夹 我是放到D盘,路径:D\db
解压mongodb-win32-i386-1.7.0.zip 将其重命名为mongodb 放到D盘
打开cmd输入:D:\mongodb\bin\mongod.exe –dbpath=d:\db 启动mongod服务
再打开一个cmd输入:D:\mongodb\bin>mongo.exe
MongoDB shell version: 1.7.0
url: test
connecting to: test
type “exit” to exit
type “help” for help
>
5.D:\mongodb\bin\mongod.exe -dbpath d:\DB -install 注册windows service,哈哈 免得以后麻烦,每回要启动
6.
D:\mongodb\bin>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”), “hello” : 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://jar-c.blog.163.com/blog/static/11640125020109275371189/