日期:2014-05-16 浏览次数:20607 次
2、解压并且重命名为mongodb,copy到D:/websoft/下,注:这个是我的命名及其目录结构,可以根据你自己的习惯执行 3、在mongodb文件件下,新建两个文件data和logs 4、配置mongodb服务器: 4.1 cmd进入到:D:/websoft/mongodb/bin下(操作:1.d: 2.cd :/websoft/mongodb/bin); 4.2 命令:mongod --dbpath d:/websoft/mongodb/data 打印如下后:
。。。。。。。 Thu Dec 12 11:27:14.295 [FileAllocator] done allocating datafile d:/websoft/mong odb/data\local.0, size: 64MB, took 0.261 secs Thu Dec 12 11:27:14.299 [initandlisten] command local.$cmd command: { create: "s tartup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0 reslen:37 386ms Thu Dec 12 11:27:14.346 [initandlisten] waiting for connections on port 27017 Thu Dec 12 11:27:14.347 [websvr] admin web console waiting for connections on port 28017
You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number
mongod.exe --logpath d:/websoft/mongodb/logs --logappend --dbpath d:/websoft/mongodb/data --directoryperdb --serviceName MongoDB -install