MongoDB Download
Address: https://www.mongodb.com/download-center#community
- MongoDB for Windows 64-bit for 64-bit Windows Server 2008 R2, Windows 7, and the latest version of the Window System.
- MongoDB for Windows 32-bit for 32-bit Window System and the latest Windows Vista. MongoDB the database system up to 32 2GB.
- MongoDB for Windows 64-bit Legacy for 64-bit Windows Vista, Windows Server 2003, and Windows Server 2008.
The first installation: complete
The default installation point has been determined complete
After the mounting operation:
1. configuration environment variable (can open cmd mongodb run directly from the desktop)
This address will be copied: C: \ Program Files \ MongoDB \ Server \ 3.2 \ bin
This opens the desktop computer ---- "Right Properties -----" Advanced System Configuration --- "environment variable configuration -------" find the path system variable configuration variables ------ "New Tag copy the address into it.
Operating mongodb
1. Start Mongodb server --------------------------
If you do not configure the environment variables on the implementation of the following command:
You must perform mongod.exe files from the bin directory in the directory MongoDB MongoDB server running from the command prompt.
C:\mongodb\bin\mongod --dbpath c:\data\db
配置了黑窗口直接执行一下操作:(设置全局变量的好处)
mongod --dbpath c:\data\db
2.操作mongodb库
必须启动服务,否则无法操作。
以下操作数据库的操作:
cmd
mongo(进入交互模式)