1. Download Mongondb.
2. After the installation is complete
3. Create data directory: (e.g. C: \ or D:\. such as
Create a new data directory under the directory. For storing the DB directory. C:\MongoDB\data\db
4. command to run the MongoDB server:
A. In the cmd command box, first specify the bin directory to MongoDB: CD C:\MongoDB\Server\3.2\bin (this is my directory)
B. Execute mongod.exe--dbpath c:\MongoDB\data\db command (--dbpath specify Data directory address)
5. Start the MongoDB service (execute command with Administrator privileges) to view the log file after the service is successfully started
Once you've configured your information.
Mongod.exe
--bind_ip youripadress
--logpath "C:\data\dbConf\mongodb.log"
--logappend
--dbpath "C:\data\db"
--port Yourportnumber
--servicename "Yourservicename"
--servicedisplayname "Yourservicename"
--install
Parameter description
--BIND_IP bind service IP, if bind 127.0.0.1, then only native access, do not specify default local all IP
--logpath the MongoDB log file, note that the specified file is not a directory
--logappend writing the log using the Append method
--dbpath Specifying the database path
--port specifying the service port number, default port 27017
--servicename Specifying the service name
--SERVICEDISPLAYNAME Specifies the service name, which is executed when there are multiple MongoDB services.
--install is specified as a Windows service installation.
Execute startup command: Net start MongoDB
Execution stop fame and wealth: net stop Moongodb
MongoDB installation Configuration