티스토리 뷰

728x90
반응형

1. brew를 이요한 설치 방법

http://semantics.kr/%EB%A7%A5mac%EC%97%90%EC%84%9C-%EB%AA%BD%EA%B3%A0db-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0-how-to-install-mongodb-on-mac/

 

맥(MAC)에서 몽고DB 설치하기 (HOW TO INSTALL MONGODB ON MAC) - SEMANTICS

맥(MAC)에서 몽고DB를 설치하는 방법은 홈브루(Homebrew)를 이용해 간단히 설치할 수 있다. 홈브루는 맥에서 패키지를 관리하기 위한 프로그램으로, 간단히 brew install mongodb 명령어로 몽고DB를 설치할 수 있다.

semantics.kr

 

1-1 homebrew 패키지 설치하기

https://brew.sh/index_ko

 

Homebrew

The missing package manager for macOS (or Linux).

brew.sh

 

1-2. brew install mongodb 로 실행시 에러

Error: No available formula with the name "mongodb" 
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

mongodb 패키지가 core repository에 없다고 나온다. 

 

이 경우 다음 페이지를 참조해서 brew tap을 사용해서 설치하는 방법이 있다.

 

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

 

Install MongoDB Community Edition on macOS — MongoDB Manual

 

docs.mongodb.com

1-3. 설치

$ brew tap mongodb/brew

$ brew install mongodb-community@4.2

 

1-4. mongodb 실행

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

또는 다음과 같이 brew services 명령어로 실행 시키는 방법도 있다. 

 

$ brew services start mongodb-community@4.2

 

2. 다운로드 받아 설치하는 방법

https://velog.io/@rohkorea86/MongoDB%EC%84%A4%EC%B9%98-%EB%A7%A5MAC%EC%97%90%EC%84%9C-%EB%AA%BD%EA%B3%A0%EB%94%94%EB%B9%84-%EC%84%A4%EC%B9%98

 

[MongoDB설치] 맥(Mac)에서 몽고디비(MongoDB) 설치과정

[잠깐!!] 작성자는 MongoDB를 설치 하기 전, 1. Homebrew를 설치/업데이트 한 후 해당 글 방식으로 변경했습니다. 혹시 아래 내용이 제대로 진행되지 않을 경우 Homebrew를 설치 후 읽어주길 바랍니다.(혹시나 해서 입니다..) (맥 사용자는 Homebrew를 이용한 설치가 안전?하다고 들었습니다.) Homebrew 설치링크 : ht...

velog.io

 

728x90
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
글 보관함