美文网首页
2020-01-19 install mongod as win

2020-01-19 install mongod as win

作者: 五大RobertWu伍洋 | 来源:发表于2020-01-19 17:13 被阅读0次

    install windows service for mongdb server

    C:\Program Files (x86)>"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe"  -f "E:\mongod\mongod.conf" --install --serviceName MongoDBServer
    2020-01-19T16:29:26.098+0800 I CONTROL  [main] log file "E:\mongod\mongod.log" exists; moved to "E:\mongod\mongod.log.2020-01-19T08-29-26".
    

    sample mongod.conf on windows

    # mongod.conf
    
    # for documentation of all options, see:
    #   http://docs.mongodb.org/manual/reference/configuration-options/
    
    # Where and how to store data.
    storage:
      dbPath: E:\mongod\dbpath
      journal:
        enabled: true
    #  engine:
    #  mmapv1:
      wiredTiger:
        engineConfig:
          directoryForIndexes: true
        indexConfig:
          prefixCompression: true
    
    # where to write logging data.
    systemLog:
      quiet: true
      destination: file
      logAppend: false
      path: E:\mongod\mongod.log
    
    # network interfaces
    net:
      port: 27017
    #   bindIp: 172.17.0.6,127.0.0.1
      maxIncomingConnections: 65535
      wireObjectCheck: true
      ipv6: false
      #bindIp: 127.0.0.1
    
    
    #processManagement: only can be used in linux but not windows
    # processManagement:
    #   fork: true  # fork and run in background
    #   pidFilePath: E:\mongod\mongod.pid  # location of pidfile
    
    #security:
    
    #operationProfiling:
    
    #replication:
    
    #sharding:
    
    ## Enterprise-Only Options:
    
    #auditLog:
    
    #snmp:
    
    

    相关文章

      网友评论

          本文标题:2020-01-19 install mongod as win

          本文链接:https://www.haomeiwen.com/subject/ixorzctx.html