2022. 1. 17. 01:24ㆍ서버 프로그래밍
새로 생성한 Ubuntu 18.04 EC2에서 기존 MongoDB 4.0 설치가 안되는 문제가 발생했다.
"E: Unable to locate package mongodb-org"
https://www.mongodb.com/community/forums/t/e-unable-to-locate-package-mongodb-org/13458
E: Unable to locate package mongodb-org
I am new to MongoDB and I am trying to install it in Ubuntu 18.04. I am following the instructions for installation and the command ‘sudo apt-get install -y mongodb-org’ is giving the following result. Reading package lists… Done Building dependency
www.mongodb.com
그래서 최신 버전인 MongoDB 4.4 설치 문서를 참조해서 설치하니 문제 없이 설치 완료.
Install MongoDB Community Edition on Ubuntu — MongoDB Manual
Docs Home → MongoDB ManualMongoDB AtlasMongoDB Atlas is a hosted MongoDB service option in the cloud which requires no installation overhead and offers a free tier to get started.Use this tutorial to install MongoDB 4.4 Community Edition on LTS (long-ter
docs.mongodb.com
다른 EC2에서 mongodb shell client로 접속하기 위해서는 동일하게 진행하다가 설치만 이것으로 해주면 된다.
sudo apt-get install -y mongodb-org-shell
* 계정 생성
# 계정생성
> use [데이터베이스명]
> db.createUser(
{
user: "[계정 지정]",
pwd: "[패스워드 지정]",
roles: [ "readWrite", "dbAdmin" ]
}
)
Ubuntu 에서 Mongo DB 설치 및 설정
mongo DB 설치https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/포트, bindIp 변경mongo db 재실행mongo db 접속하여 데이터베이스 생성과 계정 생성mongo --
velog.io