Mongodb的安装
下载:http://www.mongodb.org/downloads
mongodb-win32-x86_64-3.2.5-signed.msi
安装:
1、dos下切换至安装目录bin下:
2、新建data、log目录
3、mongod --dbpath "D:\Program Files\MongoDB\data" --logpath "D:\Program Files\MongoDB\log" --serviceName "MongoDB" --install
4、执行mongo.exe
5、use admin
6、db.createUser(
{
user: "sa",
pwd: "zxc",
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
}
)
7、ctrl+c,退出mongo.exe
8、mongod --remove --serviceName "MongoDB"
9、mongod --auth --dbpath "D:\Program Files\MongoDB\data" --logpath "D:\Program Files\MongoDB\log" --serviceName "MongoDB" --install