- Install MongoDB, the default is installed to the "C:\Program files\mongodb\" here, I did not find the information in the registration table MongoDB, so guess it just unzip it to that location, it just unzip it to that location, it just unzipped it to that location (3 important things to say.) When I install MongoDB, the specified directory has not been installed, directly cut his installed files to the directory I need to install, that is to say we can modify it casually. I moved this directory to "D:\AppData\MongoDB" and made some adjustments to it, after which the directory structure was "D:\AppData\MongoDB\Server\bin".
- Create a new Data folder in the directory "D:\AppData\MongoDB", where you can create a new DB folder and a log folder to hold the database and logs files separately.
- Configure the PATH environment variable to add "D:\AppData\MongoDB\Server\bin;" in the PATH environment variable, so that it is convenient for us to execute the mongod command on any path.
- Install the MongoDB service and create a new configuration file under the "D:\AppData\MongoDB" folder
mongod.cfg
with the following contents:systemLog:destination: filepath: D:\AppData\MongoDB\data\log\mongod.logstorage:dbPath: D:\AppData\MongoDB\data\db
Start cmd as an administrator
Installation Services:mongod --config "D:\AppData\MongoDB\Server\3.2\mongod.cfg" --install
Start the service:net start MongoDB
Then enter the MONGO command and it will automatically connect to test.
- Configure visual management, I use Robomongo this is a decompression version, unzip (or install) directly after the open, new connection can be
MongoDB Installation Errors and principles