DB/MongoDB
[Ubuntu] MongoDB 설치
잔망루피
2024. 4. 22. 15:20
1. MongoDB 공개 GPG 키 가져오기
sudo apt-get install gnupg curl
gnupg, curl 설치
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
--dearmor
2. Ubuntu 20.04(Focal)용 /etc/apt/sources.list.d/mongodb-org-7.0.list 파일 생성
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
sudo apt-get update
3. MongoDB 최신 버전 설치
sudo apt-get install -y mongodb-org
4. MongoDB 시작
sudo systemctl start mongod
5. MongoDB 상태 확인
sudo systemctl status mongod
참고 👇👇👇
https://www.mongodb.com/ko-kr/docs/manual/tutorial/install-mongodb-on-ubuntu/
반응형