Windows installation:
Install the default version directly on the official website (then install it one click).
- After installation, go to the installation directory to create a new data folder (the folder where MongoDB data is saved).
- Go to the Data folder and create a new DB folder (the folder where the MongoDB data configuration is stored).
- From the new entry Bin directory, press and hold shift+ right mouse button, Windows7 Click here to open the Command window, WINDOWS10 Click here to open the PowerShell window.
- Input:. \mongod--dbpath MongoDB installation path under new \data\db (WINDOWS10) mongod--dbpath MongoDB installation path new \data\db (WINDOWS7)
WINDOWS10: . \mongod--dbpath D:\MongoDB\Server\3.4\data\db
Windows7: mongod--dbpath D:\MongoDB\Server\3.4\data\db
Some log files are shown later.
To verify that MongoDB started successfully:
In the browser type: localhost:27017
To configure the MongoDB startup service:
- To run the command line as an administrator
- Go to the Bin directory under the MongoDB installation directory: cd/d D:\MongoDB\Server\3.4\bin
- Create a new logs directory under the data directory
- Create a new Mongo.log under the logs
- In the command line, enter:
" MongoDB " " MongoDB " --install
If there is no error, it will be successful.
Install visual viewing of MongoDB software (Robomongo)
Linux Installation:
Directly in the input:
sudo apt-get install MongoDB
MongoDB Environment Installation