According to the website's prompt content, the default configuration file content is
systemlog:verbosity:0 quiet:false# traceallexceptions:<Boolean>syslogfacility:user Path: "/data/mongodb/log" Logappend:false logrotate:rename destination:file Times Tampformat:iso8601-local component:accesscontrol:verbosity:0 command:verbosity:0 # COMMENT Some component verbosity settings omitted for brevity storage:verbosity:0 Journal: verbosity:0 write:verbosity:0processmanagement:fork:false pidfilepath: "/VAR/RUN/MONGODB/MONGOD.P ID "net:port:27017 bindip:" 127.0.0.1 "maxincomingconnections:65536 wireobjectcheck:true ipv6:false UnixDo MainSocket:enabled:true pathprefix: "/tmp" filepermissions:0700 http:enabled:true Jsonpena Bled:false restinterfaceenabled:false# ssl:# sslonnormalports:<Boolean># Deprecated since 2.6# mode:disabled# pemkeyfile:<string># Pemkeypassword:<string># Clusterfile:<string># Clusterpassword:<string># Cafile:<string># CRLFile:<string># Allowconnectionswithoutcertificates:<Boolean># Allowinvalidcertificates:<Boolean># Allowinvalidhostnames:<Boolean># Fipsmode:<Boolean>#security: # keyfile: "/var/lib/mongo/mongodb-keyfile" # clusterauthmode:keyfile# authorization:disabled# Java scriptenabled:true# sasl:# hostName:<string># ServiceName:<string># Saslauthdsocketpath:<string>#setParameter: #<Parameter1>:<value1># <Parameter2>:<value2>storage:dbpath: "/data/db" indexbuildretry:true repairpath: "/data/db/tmp" Journal:enabled:true di Rectoryperdb:false syncperiodsecs:60 engine:mmapv1 mmapv1:preallocDataFiles:true nssize:16 quot A:enforced:false maxfilesperdb:8 smallfiles:false journal:debugflags:1 com mitintervalms:100# wiredtiger:# engineconfig:# cachesizegb:1# statisticslogdelaysecs:0# journalcompressor:snappy# directoryforindexes:false# collectionconfig:# blockcompressor:snappy# indexconfig:# prefixcompression:trueoperationprofiling:slowopthresholdms:100 mode:off#replication:# o plogsizemb:50# replsetname:repl_test# secondaryindexprefetch:all#sharding:# clusterrole:<string># Archivemovedchunks:<Boolean>#auditLog: # destination:file# format:json# path: "/data/mongodb/log" # Filter:<string>#snmp: # subagent:<Boolean># Master:<Boolean>#mongos only#replication:# Localpingthresholdms:<Boolean>#sharding: # autosplit:<Boolean># ConfigDB:<string># ChunkSize:<int>
Note: The Boolean value is True or FALSE, and the first letter cannot be capitalized
Systemlog.path is a file name and cannot be a folder, and if the file already exists, a new date-dated one will be created
With this foundation, you can start by looking at the boot log file to see exactly where the configuration has problems that cannot be started
Processmanagement.pidfilepath as a file address, not present or problem
Net.ssl best commented out, temporarily without SSL
It is best to comment out under security, otherwise you need to configure all the security content, and keyfile must exist.
Storage.repairpath must be a Storage.dbpath subdirectory, and the directory needs to exist.
Replication is copy, copy start, comment out
Remember to comment out an engine
So we can start the
Configuration files in MongoDB yaml format