[Google Dataproc] MongoDB 설치하기
구글 Dataproc 인스턴스 로컬에 mongodb를 설치해본다.
먼저 인스턴스의 버전을 체크함.
아래 명령어 중 하나를 선택하여 체크할 수 있다.
lsb_release -a |
cat /etc/*release |
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.11 (jessie) Release: 8.11 Codename: jessie |
위와 같은 식으로 버전이 나온다.
나의 경우는 8.11 Debian jessie. (우분투인 줄 알았는데 Debian 이네)
Debian jessie 인 경우
아래 명령어를 순서대로 넣는다.
|
Debian Stretch 인 경우
아래 명령어를 순서대로 넣는다.
|
mongodb 시작하려면 아래 명령어를 실행
sudo service mongod start |
mongo |
그럼 mongodb가 시작된다.
삭제하는 방법, mongodb를 멈추는 방법, 그 외의 방법들은 아래 문서(영어)를 참고.
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/
참고한 곳
https://askubuntu.com/questions/686239/how-do-i-check-the-version-of-ubuntu-i-am-running