Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Common configuration and maintenance methods of MongoDB

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "common configuration and maintenance methods of MongoDB". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Configuration:

Common configurations are as follows:

Configuration example

Net: port: 27017 # # listening port systemLog: destination: file path: "mongod.log" # # Log file storage location logAppend: true # # additional mode write log storage: engine: wiredTiger # # data engine type, highly recommended wiredTiger dbPath: / data/soft/mongodb-3.2.1/data # # data storage location journal: enabled: true # # production environment is highly recommended to open wiredTiger: engineConfig: cacheSizeGB: 2 # engine cache size, version 3.4 starting The default value is: (half of memory-1G) or 256m, take the maximum statisticsLogDelaySecs: 3600 # # log refresh interval journalCompressor: snappy # # journal compression, allowed values: none,snappy,zlib directoryForIndexes: false # # subdirectory storage index and data collectionConfig: blockCompressor: snappy # # data file compression, allowed values: none,snappy,zlibprocessManagement: fork: true # # database process replication: oplogSizeMB: 2048 # # replica set operation log size The higher the value, the more downtime is allowed, otherwise the downtime of a machine is too large It will cause the data that exceeds the size of the operation log to fail to synchronize replSetName: candao_release # # replica set name sharding: clusterRole: shardsvr # # identity in the shard cluster security: keyFile: / data/soft/mongodb-3.2.1/mongo-key # # Security key file used for communication between clusters clusterAuthMode: "keyFile" # # Cluster authentication mode authorization: "enabled" # # whether to enable user authentication "MongoDB often" This is the end of the content of "using configuration and maintenance methods" Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report