Popular blog tags

Download MongoDB 4.0 for windows

https://www.mongodb.com/download-center?jmp=nav#community ,click server

download url:http://dl.mongodb.org/dl/win32/x86_64

https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-4.0.10-signed.msi

https://www.mongodb.com/dr/fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-4.0.12-signed.msi/download

Starting MongoDB server with configuration file

step 1:Create  a configuration file

Create a file called, "\MongoDB\mongod.conf" and store the below information in the file.

see:https://docs.mongodb.com/manual/reference/configuration-options/

# Where and how to store data.
storage:
  dbPath: G:\MongoDB\data
  journal:
    enabled: true
#  engine:
#  mmapv1:
  wiredTiger:
    engineConfig:
      cacheSizeGB: 1

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path:  G:\MongoDB\log\mongod.log

# network interfaces
net:
  port: 27018
  bindIp: 127.0.0.1

 

 

step 2: Start the mongod server process and specify the above created configuration file 

e:\mongodb\bin\mongod --config /etc/mongod.conf

or

title mongodb27018
g:
cd \mongodb\bin
mongod --dbpath \mongodb\data -port 27018