1. Install after unpacking the installation package
Installation Note: 1. Select Customs 2. Path Select a drive letter other than C drive
After the installation is complete:
2. Create a new data, log folder in the bin's sibling directory
3. Create a new DB folder under the Data folder and create a new Mongo.log file under the log file
4. Create a new Mongo.config file in the bin's sibling directory again
Write in Mongo.config:
Dbpath=d:\mongodb\data #数据库路径
Logpath=d:\mongodb\log\mongo.log #日志输出文件路径mongo. Log path
Logappend=true #错误日志采用追加模式, after configuring this option, the MongoDB log is appended to the existing log file instead of creating a new file
Journal=true #启用日志文件, enabled by default
Quiet=true #这个选项可以过滤掉一些无用的日志信息, set to False if you need to use Debug
port=27017 #端口号默认为27017
Auth=false #这个就是开启认证的配置
5. Service installation: Through CMD into the bin directory, enter the following command
Mongod-config "E:\mongodb\mongo.config"-install-servicename "MongoDB"
6. Start MongoDB service: net start MongoDB
MongoDB Local Build process