Skip to content

Instantly share code, notes, and snippets.

@Pushplaybang
Created June 28, 2018 11:30
Show Gist options
  • Select an option

  • Save Pushplaybang/acff9e46c5b153a41a1723e2023cd76f to your computer and use it in GitHub Desktop.

Select an option

Save Pushplaybang/acff9e46c5b153a41a1723e2023cd76f to your computer and use it in GitHub Desktop.

Revisions

  1. Pushplaybang created this gist Jun 28, 2018.
    28 changes: 28 additions & 0 deletions mongoinstall.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    # Installing Mongo on OSX with brew
    We'll need to update brew, install mongo, setup the location where data will be stored and know how to stop and start the DB.

    ## Get started:

    ```sh
    # update brew
    brew update

    # install mongo
    brew install mongo

    # create a directory to store data
    mkidr -p /data/db

    # if the above required sudo, use the following to make sure it has the right permissions
    sudo chown -R `whoami` /data/db

    ```

    this should have you setup and ready to go. To run mongo, we need to start the daemon with the following

    ```sh
    mongod
    ```
    this will have mongo up and running, use `crtl+c` to shut it down.