티스토리 뷰
728x90
출처
- Add MongoDB 4.2 ARM64 builds for Raspberry Pi OS 64 bit (Debian Buster) - Other MongoDB Topics / MongoDB Server Development - MongoDB Developer Community Forums
- Install Rocket.Chat on Ubuntu 20.04 LTS with Let's Encrypt SSL | ComputingForGeeks
- Install MongoDB Community Edition on Ubuntu — MongoDB Manual
- How To Install MongoDB 5 on Ubuntu 20.04 | 18.04 | ComputingForGeeks
- MongoDB | 설치하기, 삭제하기
Raspberry PI 시스템 업그레이드
pi@raspberrypi:~$ sudo apt update
pi@raspberrypi:~$ sudo apt upgrade
MongoDB 설치
빌드 도구 맟 관련 패키지 설치
pi@raspberrypi:~$ sudo apt-get install gcc-8 g++-8
pi@raspberrypi:~$ sudo apt-get install libssl-dev libcurl4-openssl-dev
Mongo DB 소스 다운로드
pi@raspberrypi:~$ git clone -b r4.4.0 https://github.com/mongodb/mongo.git
pi@raspberrypi:~$ cd mongo/
MongoDB GPG 서명 키 추가
pi@raspberrypi:~$ wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
MongoDB에 대한 스토리지 엔진 및 복제를 구성한 다음 MongoDB 서비스를 시작
$ sudo sed -i "s/^# engine:/ engine: wiredTiger/" /etc/mongod.conf
$ sudo sed -i "s/^#replication:/replication:\n replSetName: rs01/" /etc/mongod.conf
MongoDB 서비스 시작 및 활성화
bluesanta@Kubuntu:~$ sudo systemctl daemon-reload
bluesanta@Kubuntu:~$ sudo systemctl enable mongod
Created symlink /etc/systemd/system/multi-user.target.wants/mongod.service → /lib/systemd/system/mongod.service.
bluesanta@Kubuntu:~$ sudo systemctl restart mongod
MongoDB 서비스 확인
bluesanta@Kubuntu:~$ systemctl status mongod
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-05-24 01:28:11 KST; 5s ago
Docs: https://docs.mongodb.org/manual
Main PID: 287216 (mongod)
Memory: 65.2M
CGroup: /system.slice/mongod.service
└─287216 /usr/bin/mongod --config /etc/mongod.conf
5월 24 01:28:11 Kubuntu systemd[1]: Started MongoDB Database Server.
5월 24 01:28:11 Kubuntu mongod[287216]: /usr/bin/mongod: /usr/local/lib/libcurl.so.4: no version information available (required by >
MongoDB 테스트
bluesanta@Kubuntu:~$ mongo --eval "printjson(rs.initiate())"
MongoDB shell version v5.0.8
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("63537e3c-d3f1-42df-8158-043e7a759f3c") }
MongoDB server version: 5.0.8
{
"info2" : "no configuration specified. Using a default configuration for the set",
"me" : "127.0.0.1:27017",
"ok" : 1
}
MongoDB 로그 확인
bluesanta@Kubuntu:~$ sudo tail -f /var/log/mongodb/mongod.log
빌드오류
Creating 'build/opt/mongo/resmoke/resmoke.py' Creating 'build/opt/mongo/config.h' /usr/bin/python3 src/mongo/base/generate_error_codes.py src/mongo/base/error_codes.yml src/mongo/base/error_codes.tpl.h build/opt/mongo/base/error_codes.h Install file: "build/opt/mongo/resmoke/resmoke.py" as "build/install/bin/resmoke.py" Chmod("build/install/bin/resmoke.py", "u+x") Compiling build/opt/third_party/mozjs-60/extract/mozglue/misc/ConditionVariable_posix.o cc1plus: fatal error: js-confdefs.h: No such file or directory compilation terminated. scons: *** [build/opt/third_party/mozjs-60/extract/mozglue/misc/ConditionVariable_posix.o] Error 1 Generating build/opt/mongo/db/logical_session_id_gen.cpp /usr/bin/python3 src/mongo/base/generate_error_codes.py src/mongo/base/error_codes.yml src/mongo/base/error_codes.tpl.cpp build/opt/mongo/base/error_codes.cpp scons: building terminated because of errors. build/opt/third_party/mozjs-60/extract/mozglue/misc/ConditionVariable_posix.o failed: Error 1
몽고 DB 삭제 방법
bluesanta@Kubuntu:~$ sudo apt-get remove mongodb-org
bluesanta@Kubuntu:~$ sudo apt-get purge mongodb-org*
bluesanta@Kubuntu:~$ sudo rm -rf /var/log/mongodb
bluesanta@Kubuntu:~$ sudo rm -rf /var/lib/mongodb
댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- Linux
- Xcode
- koba2010
- ffmpeg
- Delphi
- SAS
- MySQL
- Mac
- oracle
- sas2009
- Spring
- flex
- KOBA
- android
- 서울오토살롱
- Delphi Tip
- 튜닝쇼 2008
- 동경
- 일본여행
- BPI-M4
- 레이싱모델 익스트림 포토 페스티벌
- 전예희
- Spring MVC
- ubuntu
- 송주경
- NDK
- JavaScript
- ble
- 지스타2007
- Java
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함