zoukankan      html  css  js  c++  java
  • Mongodb-安全配置优化

    1.MongoDB配置文件样例

    # mongod.conf, Percona Server for MongoDB
    # for documentation of all options, see:
    #   http://docs.mongo.org/manual/reference/configuration-options/
    
    # Where and how to store data.
    storage:
      dbPath: /opt/mongo/mongo_data/  #数据文件位置
      journal:
        enabled: true
      engine: wiredTiger  #使用wiredTiger存储引擎
    
    # Storage engine various options
    #  More info for wiredTiger: https://docs.mongo.com/v3.4/reference/configuration-options/#storage-wiredtiger-options
    #  wiredTiger:
    #    engineConfig:
    #      cacheSizeGB: 1
    #      checkpointSizeMB: 1000
    #      statisticsLogDelaySecs: 0
    #      journalCompressor: snappy
    #      directoryForIndexes: false
    #    collectionConfig:
    #      blockCompressor: snappy
    #    indexConfig:
    #      prefixCompression: true
    
    
    # Two options below can be used for wiredTiger and inMemory storage engines
    #setParameter:
    #    wiredTigerConcurrentReadTransactions: 128
    #    wiredTigerConcurrentWriteTransactions: 128
    
    # where to write logging data.
    systemLog:
     destination: file
     logAppend: true
     path: /opt/mongo/mongo_log/mongod.log  #定义日志文件位置
    
    processManagement:
      fork: true
      pidFilePath: /opt/mongo/mongo_log/mongod.pid  #定义pid位置
    
    # network interfaces
    net:
      port: 27017
      bindIp: 10.140.0.4  #监听IP
      http:
        JSONPEnabled: false  #关闭jsonp调用
        RESTInterfaceEnabled: false  #关闭reset
    
    security:
      authorization: enabled  #开启数据库认证
      
    
    #operationProfiling:
    
    #replication:
    
    #sharding:
    
    ## Enterprise-Only Options:
    
    #auditLog:
    
    #snmp:
  • 相关阅读:
    Qt 6 正式发布
    GTK 4.0 正式发布
    编译 flink 1.12.0
    Flink 1.12.0 sql 任务指定 job name
    【翻译】Apache Flink 1.12.0 Release Announcement
    【源码】Flink 三层图结构 —— JobGraph 生成过程
    【源码】Flink 算子 chain 在一起的条件
    Web开发基础之CMDB系统开发之三
    Web开发基础之CMDB系统开发之二
    Ubuntu18.04升级至20.04
  • 原文地址:https://www.cnblogs.com/dingkailinux/p/9009439.html
Copyright © 2011-2022 走看看