끄적이는 개발노트
MongoDB 설치 본문
728x90
이번 포스트에서는 Node.js에 MongoDB를 설치하는 방법을 알아본다.
Mongo버전은 4.0 이상을 기반으로 하며, 공식문서를 참조한 포스트이다.
https://docs.mongodb.com/v4.0/tutorial/install-mongodb-enterprise-on-ubuntu/
Install MongoDB Enterprise Edition on Ubuntu — MongoDB Manual
The following instruction is for Ubuntu 18.04 (Bionic). For Ubuntu 14.04 (Trusty) or Ubuntu 16.04 (Xenial), click on the appropriate tab. Create the list file for Ubuntu 18.04 (Bionic). echo "deb [ arch=amd64,arm64,s390x ] http://repo.mongodb.com/apt/ubunt
docs.mongodb.com
1. MongoDB 공개 GPG Key 가져오기
$> wget -qO - https://www.mongodb.org/static/pgp/server-4.0.asc | sudo apt-key add -
2. /etc/apt/sources.list.d/mongodb-enterprise.listMongoDB용 파일을 생성
우분투 버전에 맞게 설정(아래는 Bionic)
$> echo "deb [ arch=amd64,s390x ] http://repo.mongodb.com/apt/ubuntu bionic/mongodb-enterprise/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
3. 로컬 패키지 다시 로드
$> sudo apt-get update
4. MongoDB 설치
$> sudo apt-get install -y mongodb-enterprise
5. MongoDB 실행
$> sudo systemctl start mongod
이상으로 MongoDB가 설치되었다.
다음 포스트에서는 MongoDB를 설정하는 방법(보안, 접근)에 대해 알아본다.
728x90
'MongoDB' 카테고리의 다른 글
MongoDB 보안 및 접근권한 설정 (0) | 2021.10.07 |
---|