하모니카 6.0(태백) 사용중.
sudo apt-get install 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
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
sudo apt-get install -y mongodb-org
본인은 systemctl이 있는 환경이라서 systemctl사용해서 실행
sudo systemctl start mongod
잘 돌고있나 확인하려면
sudo systemctl status mongod
다시 시작하려면
sudo systemctl restart mongod
종료하려면
sudo systemctl restart mongod