brew install mongodb

Jaymee·2021년 9월 21일
0

koa 프로젝트의 디비로 저번에 사용하던 mongodb를 사용하려고 설치하고 있었다. 노트북이 window에서 macos로 바꼈기 때문에 새로 설치해야 하는데
$ brew update
$ brew install mongodb
와 같이 설치하던 와중...

Warning: No available formula or cask with the name "mongodb". Did you mean mongosh or monetdb?
와 같은 에러가 발생했다. 구글링 한 결과..
https://stackoverflow.com/questions/57856809/installing-mongodb-with-homebrew
여기서 볼 수 있듯이,

Formula mongodb has been removed from homebrew-core

To our users: if you came here because mongodb stopped working for you, we have removed it from the Homebrew core formulas since it was migrated to a non open-source license.

그렇다고 한다.

하지만 그래도 아직까지는 new tap으로 설치가 가능하다고...

해결방법

brew tap mongodb/brew
brew install mongodb-community@4.0

환경변수 설정

echo 'export PATH="/usr/local/opt/mongodb-community@4.4/bin:$PATH"' >> ~/.zshrc

실행준비

mongod --config /usr/local/etc/mongod.conf

실행

mongo

mysql은 terminal로 테이블을 확인하는 것이 편했지만, mongodb는 뭔가 불편해서 좋은 GUI인 mongodb compass 를 사용중이다.
그냥 connect을 눌러주면 자연스럽게 로컬서버에 연결할 수 있다.

profile
backend developer

0개의 댓글