lazydev
lazydev

Reputation: 1

Mongo Setting Path

I am currently running macOS Sierra (latest version) and I have zshell installed. I have tried to follow the steps to install MongoDB Community Edition Manually by using the following commands after downloading the binaries from the MongoDB Download Center.

  1. tar -zxvf mongodb-osx-ssl-x86_64-3.6.2.tgz
  2. mkdir -p mongodb
  3. cp -R -n mongodb-osx-ssl-x86_64-3.6.2/ mongodb
  4. export PATH=mongodb-install-directory/bin:$PATH

On step 4, my mongodb install directory path is in /Users/(my username)/mongodb. Therefore, I have run the following command:

From the (my username) directory, I tried to run mongod and got the message zsh: command not found: mongod. However, when I go into /Users/(my username)/mongodb/bin and run ./mongod, everything works except for my data path not being set.

From here, I have tried to set the db path by running the following command:

Then I ran ./mongod and the data path was not found. What am I doing wrong? I even tried to install MongoDB Community Edition with Homebrew and the same errors popped up.

I am not sure if this would make a difference, but I have installed vagrant in the past and I was able to use MongoDB.

Upvotes: 0

Views: 1430

Answers (1)

user11661744
user11661744

Reputation:

I suggest re-install MongoDB once again, use brew

brew update

brew install mongodb

Upvotes: 0

Related Questions