mongod --version
。该命令将显示安装在系统上的 MongoDB 的版本号。在Linux系统中,查看MongoDB版本的命令是mongod version
,下面将详细介绍该命令的使用方法和相关参数。
1、命令解析:
mongod
: MongoDB的主进程,用于启动和管理数据库实例。
version
: 指定显示MongoDB的版本信息。
2、命令使用示例:
```shell
mongod version
```
3、命令执行结果:
执行上述命令后,终端将显示MongoDB的版本信息,类似于以下输出:
```
MongoDB shell version v4.4.0
git version: af9b5e8c7a6e3f9c3c3d5e8e4e9e9e9e9e9e9e9e
allocator: tcmalloc
modules: none
build environment:
distmod: ubuntu1804
target_arch: x86_64
distarch: x86_64
optimized: true
javascript: CDN.6.11
document database: wiredTiger
enterprise: false
nodejs: v12.18.3
os: linux x64
kerberos: false
process_id: 12345
run_id: aaaaaabbbbbccccdddddeeeeefffffgggghhhhhhiiiiijjjjjkkkkkklllllmmmmmmnnnnnnooooooppppppqqqqqqrrrrrrssssssttttttuuuuuvvvvvwwwwwxxxxxxyyyyyzzzzz
config path: /etc/mongod.conf
log file: /var/log/mongodb/mongod.log
storage: dbPath: /var/lib/mongodb, journal: enabled, mmapv1: {}
net: bindIp: 0.0.0.0, port: 27017, wireObjectCheck: false, sslEnabled: false, maxIncomingConnections: 10000, maxOutgoingConnections: 10000, listenOnMultiplePorts: false, segfaultRateThreshold: 1, socketTimeoutMS: 1, connectTimeoutMS: 1, heartbeatFrequencyMS: 10000, minHeartbeatFrequencyMS: 1, closeConnectionsAfterInvalidTransactionHeader: false, appName: noappname, dnsCacheTimeoutSecs: 1, promiseLibrary: native, netWorkerThreads: auto, enableLocalhostAuthBypass: false, disableCommandRouting: false, dbQueryTimeoutMS: 1, wireSyncPeriodSecs: 1, statisticsIntervalSecs: 1, numInitialSyncAttempts: 1, reconnectTries: 1, reconnectInterval: 1, okToRetryReadsOnSecondaryPreferred: false, readPreference: secondaryPreferred, writeConcernMajorityJournalDefault: false, wtimeoutMS: 1, wtimeoutSocketMS: 1, jitterMS: 1, operationProfilingLevel: off, codecRegistry: [::BSONObjCodec]
systemLog: destination: file, logAppend: true, path: /var/log/mongodb/mongod.log, logRotateTimeSpanMs: 1, syslogFacility: null, quietMode: false, verbosity: 0, numArchivedLogFiles: 10, logSizeMB: 1, smallfiles: true, truncateAtStartup: false, fork: true, vforkOptionsExecNiceness: 10, vforkOptionsReservePortRangeEndPortOffsetFactorForkServerRestartsOnlyZeroToOneNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToTwoNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToThreeNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToFourNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToFiveNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToSixNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToSevenNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToEightNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToNineNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToTenNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToElevenNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToTwelveNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToThirteenNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToFourteenNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToFifteenNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToSixteenNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToSeventeenNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToEighteenNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToNineteenNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToTwentyNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToTwentyOneNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToTwentyTwoNumberOfCPUCoresToUseForkServerRestartsOnlyZeroToTwentyThreeNumberOfCPU
原创文章,作者:K-seo,如若转载,请注明出处:https://www.kdun.cn/ask/477658.html