MongoDB - HVboom/HowTo-DigitalOcean GitHub Wiki

Description

Mongo (from "humongous") is a high-performance, open source, schema-free, document-oriented database. A common name in the "NOSQL" community.

:speech_balloon: copied from package description

Setup MongoDB

  • Follow the instruction to setup MongoDB:

    sudo pkg install mongodb36
    sudo sysrc mongod_enable =yes
    sudo service mongod start
    
  • Adjust the configuration in /usr/local/etc/mongodb.conf to setup dedicated directories and another port (optional step)

    ...
    # Where and how to store data.
    storage:
      dbPath: /var/db/mongodb
      directoryPerDB: true
      journal:
        enabled: true
    #  engine:
    #  mmapv1:
      wiredTiger:
        engineConfig:
          directoryForIndexes: true
    ...
    # network interfaces
    net:
      port: 9000
    ...
    
  • Test the installation by executing sudo mongo or sudo mongo --port 9000, if you have adjusted the port