티스토리 뷰

study/mongoDB

macOS - mongoDB 다운로드

aeuna 2020. 3. 11. 18:10

1.homebrew 이용해서 다운로드

먼저 homebrew를 다운로드하도록 하자!!

homebrew는 패키지 관리 시스템의 하나로서 애플의 macOS 운영 체제의 소프트웨어 설치를 단순하게 만들어 준다고 한다

 

https://brew.sh/index_ko

 

Homebrew

The Missing Package Manager for macOS (or Linux).

brew.sh

터미널을 열어준다!!  못찾겠다면 -> launchpad-기타-terminal

그 후, 아래 명령을 복사해서 터미널 창에 붙여 넣고 실행시킨다

 

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

 

실행시키고 나면, 영어가 쭈우우욱 뜨다가 아래에 

 

Press RETURN to continue or any other key to abort

라는 글을 뜨게 된다면, enter를 눌러주고 난후, password를 입력한다

(이때, password는 당신의 mac노트북의 비밀번호를 입력하면 된다)

 

그러면, homebrew설치 완료다!!

 

2.mongoDB 설치

 

처음에 필자는 brew install mongodb를 입력하니, 에러들이 나타났다

 

Error: No available formula with the name "mongodb" 

Error: No previously deleted formula found.

Error: No formulae found in taps.

 

검색해보니, stackoverflow에서 답을 얻을 수 있었다

 

https://stackoverflow.com/questions/57856809/installing-mongodb-with-homebrew

 

Installing MongoDB with Homebrew

I'm relatively new to MongoDB and am trying to install MongoDB on my Mac with Homebrew, but I'm getting the following error: Error: No available formula with the name "mongodb" ==> Searching f...

stackoverflow.com

formula mongodb가 homebrew core에서 제거가 되었다

mongodb가 오픈소스가 아니게 되었기 때문이다 다행히도 mongodb팀은 맞춤 homebrew tap을 유지하고 있다
mongodb를 new tap으로부터 설치할 수 있다.

 

아래 명령어들을 실행시키면 설치가 될 것이다

brew tap mongodb/brew

brew install mongodb-community@4.2

실행 명령어

brew services start mongodb-community@4.2

mongo shell 접속 명령어 + 새 터미널 열고, 

mongo

 

[참고]

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/

 

Install MongoDB Community Edition on macOS — MongoDB Manual

 

docs.mongodb.com

[참고]

https://github.com/mongodb/homebrew-brew

 

mongodb/homebrew-brew

The Official MongoDB Software Homebrew Tap. Contribute to mongodb/homebrew-brew development by creating an account on GitHub.

github.com