설치 버전 : MongoDB 5.0 Community Edition
1. yum repos 등록
]# vi /etc/yum.repos.d/mongodb-org-5.0.repo
[mongodb-org-5.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/5.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-5.0.asc
2. yum install 실행
]# yum install -y mongodb-org
3. 몽고DB 시작
]# systemctl start mongod
4. 상태확인
]# systemctl status mongod
● mongod.service - MongoDB Database Server
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2022-03-18 13:55:57 KST; 49s ago
Docs: https://docs.mongodb.org/manual
Process: 4099 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=0/SUCCESS)
Process: 4095 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 4092 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 4089 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)
Main PID: 4101 (mongod)
CGroup: /system.slice/mongod.service
└─4101 /usr/bin/mongod -f /etc/mongod.conf
Mar 18 13:55:56 --- systemd[1]: Starting MongoDB Database Server...
Mar 18 13:55:56 --- mongod[4099]: about to fork child process, waiting until server is ready for connections.
Mar 18 13:55:56 --- mongod[4099]: forked process: 4101
Mar 18 13:55:57 --- mongod[4099]: child process started successfully, parent exiting
Mar 18 13:55:57 --- systemd[1]: Started MongoDB Database Server.
5. 재부팅 시 자동 실행
]# systemctl enable mongod
6. 종료 및 재시작
]# systemctl stop mongod
]# systemctl restart mongod
7. 로그 위치
/var/log/mongodb/mongod.log
8. 쉘명령어
mongosh
9. 포트 리스닝 확인
]# netstat -an|grep 27017
10. 프로세스 확인
]# ps -ef|grep mongod
'Database' 카테고리의 다른 글
Mysql row data size query (0) | 2023.01.27 |
---|---|
몽고DB 사용자 생성 (0) | 2022.03.18 |
CentOS7 MariaDB 설치 (2021년10월) (0) | 2021.10.06 |
mysql trigger create (0) | 2021.10.04 |
오라클 clob컬럼에 ORA-01704 오류 (0) | 2021.04.08 |
Mysql 변수 사용법 (0) | 2021.03.05 |
Mysql 컬럼 조회 (0) | 2020.12.16 |
오라클 컬럼 조회 쿼리 (0) | 2020.12.10 |