Skip to content

sei-relativity/Install-Mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Install Mongo

Install with Homebrew

  • Check if homebrew is installed: brew

    • If not, install Homebrew by following the instructions on the web page
    • If brew is already installed brew upgrade.
  • Install Mongodb on Mac OS X: brew install mongodb

Set data location

In terminal type brew services start mongodb to run the mongo server.

You will probably get an error saying

"Data directory /data/db not found., terminating" - if so, you will need to make the directories in your root directory as follows (do these commands anywhere):

  • Create data directories (at the root level)

    • sudo mkdir /data
    • sudo mkdir /data/db
  • Next, set root permissions

    • sudo chmod -R 777 /data

Run the mongo server again: mongod.

Should see: "waiting for connections on port 27017"

Open and close mongo

  • Open another terminal tab cmd + T and type mongo

  • To quit mongo, type exit or quit().

  • To quit mongod hit control+c

Finished!

Errors

If at some point you get an error with mongod:

  1. ps -A | grep mongod
  2. find the line that just mentions mongod, but not grep
  3. take note of the number on the left
  4. type kill 1774 or whatever that number is. Try mongod again.
  5. If that doesn't work, go to /data/db and rm mongod.lock. Try mongod again.

Down the Rabbit Hole: Hungry for More

Understanding Permissions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published