Mongodb installation and configuration

Time:2021-10-22
More welcome to the blog:https://imjianjian.github.io


Mongodb version: 3.4

1、 Download mongodb

Official website download address:https://www.mongodb.com/downl…

2、 Configure mongodb

The installation version and decompression version are available. The directory structure after installation is the same, as follows:

  • /mongodb

    • /bin
    • GNU-AGPL-3.0
    • MPL-2
    • README
    • THIRD-PARTY-NOTICES


Configure the bin directory into the system variable path


Write mongodb configuration file (mongodb. Config)

Document content:

//The address where the database file is stored
dbpath=D:\devSoft\mongodb\db
//Address where log files are stored
logpath=D:\devSoft\mongodb\log\mongodb.log


Add mongodb service to the system

Start CMD as administrator, enter:

mongod –config D:devSoftmongodbmongodb.config –install –serviceName “mongodb”

Here, configure the parameter after — config as the address of the configuration file written in the previous step

Here, the mongodb service is named ‘mongodb’


Use the command to start and shut down the mongodb service

Net start mongodb / / start the server

Net stop mongodb / / shut down the server

3、 Mongodb visualization tool recommendation

  • MongoDB Cloud Manager
  • MongoClient
  • adminMongo
  • NoSQL Manager for MongoDB
  • Robo 3T