[mongoDB] mongoDB 설치하기 (m1 Mac)
DB

[mongoDB] mongoDB 설치하기 (m1 Mac)

  • xcode-select —install
  • brew tap mongodb/brew
  • brew tap | grep mongodb -
    • mongodb/brew 가 출력돼야 함
  • brew install mongodb-community@current_version
    • m1 mac case ⇒ brew arm 관련 문제
    1. brew 재설치:  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    2. 1번 설치 완료 시 2개 command line 추가 실행하라고 써있음
      1. echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/ansanghyeon/.zprofile
      2. eval "$(/opt/homebrew/bin/brew shellenv)"
  • brew services start mongodb-community@current_version
  • 다음 명령어 작동 확인
    1. mongod
    2. mongo
    3. show dbs
반응형