MongoDB is not open source, and installation can only play Homebrew use the Community Edition

Use six months of mongodb, recently applied in the company's new project, it was found still can not install when you install mongodb on the mac, it has been such a mistake in the newspaper the following:

brew install mongodb

Upgrade brew does not work, mongodb this mac machine never installed, but the error message is prompted to uninstall it, really drunk.

From September 2, 2019 began, HomeBrew also from the core repository ( # 43770 removed mongodb module) which


 

But, fortunately mongodb team also maintained community version of the Homebrew, finally find the answer from Stack Overflow to:

 

To understand these What do you mean, look at the  homebrew-BREW  GitHub.

  1. Must be executed before installing Community Edition: BREW TAP MongoDB / BREW   This process is a bit long, I installed may take about 30 minutes.
  2. Install the latest version of the community: BREW-REINSTALL MongoDB Community Community  
  3. Start mongodb-community services:brew services start mongodb-community ,提示 “Service `mongodb-community` already started”,说明服务启动成功

mongodb-community command difference mongodb

  1. Start Service: BREW Services Start MongoDB-Community Community
  2. Restart the service: BREW Services restart MongoDB-Community Community
  3. Stop Service: BREW Services STOP MongoDB-Community Community
  4. Install a version: BREW-install MongoDB Community Community @ xxx
  5. Manually start the service: mongod --config /usr/local/etc/mongod.conf

file path:

  1.  配置文件:/usr/local/etc/mongod.conf
  2.  日志目录路径:/usr/local/var/log/mongodb
  3.   数据目录路径:/usr/local/var/mongodb

Such installation and start-up just fine.

 

Guess you like

Origin www.cnblogs.com/baiyygynui/p/11865647.html