반응형
Ubuntu 18.04 MongoDB 5 자동 시작
- MongoDB Systemd Unit File 생성:
sudo nano /etc/systemd/system/mongodb.service
- 다음 내용 입력:
[Unit] Description=High-performance, schema-free document-oriented database After=network.target [Service] User=mongodb ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf [Install] WantedBy=multi-user.target
- Systemd Unit File 적용:
sudo systemctl enable mongodb sudo systemctl start mongodb sudo systemctl status mongodb
- Reboot 후 MongoDB 자동 시작 확인:
sudo reboot sudo systemctl status mongodb
위 과정을 수행하면 MongoDB가 Ubuntu 시스템이 재시작될 때마다 자동으로 시작됩니다.
반응형
'프로그래밍 > 잡동산이' 카테고리의 다른 글
[키움 api] 키움증권 api를 이용해서 테마 그룹 가져오기 (0) | 2023.02.12 |
---|---|
[nodejs] CRUD 기본코드 (0) | 2023.02.11 |
[MongoDB] Collection Backup (0) | 2023.02.11 |
구글 드라이브 PC동기화를 해보자. (0) | 2022.10.10 |
[리눅스] Ubuntu 18.04 node.js 10.X 설치 (0) | 2019.06.13 |