Synopsis
mongod 는 MongoDB 시스템의 기본 데몬 프로세스로, 데이터 요청을 처리하고, 데이터 액세스를 관리하고, 백그라운드 관리 작업을 수행합니다.
mongod 명령줄 옵션은 주로 테스트용으로 사용해야 합니다. 프로덕션 환경에서는 설정 파일 옵션을 사용하여 데이터베이스 동작을 제어하는 것이 좋습니다.
참고
MongoDB TLS 1.2+를 사용할 수 있는 시스템에서 TLS 1.0 및 TLS 1.1 암호화 에 대한 지원 비활성화합니다.
호환성
다음 환경에서 호스팅되는 배포는 mongod를 사용합니다.
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
참고
MongoDB Atlas는 모든 MongoDB Atlas 배포에 대한 mongod을(를) 관리합니다.
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전
고려 사항
mongodincludes a Full Time Diagnostic Data Capture mechanism to assist MongoDB engineers with troubleshooting deployments. If this thread fails, it terminates the originating process. To avoid the most common failures, confirm that the user running the process has permissions to create the FTDCdiagnostic.datadirectory. Formongodthe directory is withinstorage.dbPath. Formongosit is parallel tosystemLog.path.
옵션
6.1 버전에서 변경됨:
- MongoDB는 항상 저널링을 지원합니다. 결과적으로 MongoDB는
storage.journal.enabled옵션과 해당--journal및--nojournal명령줄 옵션을 제거합니다.
5.2 버전에서 변경됨:
- MongoDB에서
--cpu명령줄 옵션을 제거합니다.
5.0 버전에서 변경됨:
- MongoDB는
--serviceExecutor명령줄 옵션과 해당net.serviceExecutor구성 옵션을 제거합니다.
주요 옵션
--auth데이터베이스 리소스 및 작업에 대한 사용자 액세스를 제어할 수 있는 권한을 활성화합니다. 권한 부여가 활성화되면 MongoDB는 모든 클라이언트에게 액세스를 결정하기 전에 인증하도록 요구합니다.
To configure users, use the
mongoshclient. If no users exist, the localhost interface has access to the database until you create the first user.자세한 내용은 보안을 참조하세요.
--bind_ip <hostnames|ipaddresses|Unix domain socket paths>기본값: localhost
mongod에서 클라이언트 연결을 수신하는 호스트 이름, IP 주소 및 전체 Unix 도메인 소켓 경로. 모든 인터페이스에mongod을(를) 연결할 수 있습니다. 여러 주소에 바인딩하려면 심표로 구분된 값 목록을 입력합니다.예시:
localhost,/tmp/mongod.sockIPv4와 IPv6 주소를 모두 지정하거나, IPv4 또는 IPv6 주소로 해결되는 호스트 이름을 지정할 수 있습니다.
예시:
localhost, 2001:0DB8:e132:ba26:0d5c:2774:e7f9:d513참고
If specifying an IPv6 address or a hostname that resolves to an IPv6 address to
--bind_ip, you must startmongodwith--ipv6to enable IPv6 support. Specifying an IPv6 address to--bind_ipdoes not enable IPv6 support.링크-로컬 IPv6 주소 (
fe80::/10)를 지정하는 경우 해당 주소에 구역 인덱스 를 추가해야 합니다(예:fe80::<address>%<adapter-name>).예시:
localhost,fe80::a00:27ff:fee0:1fcf%enp0s3중요
변경된 IP 주소로 인해 구성이 업데이트되는 것을 방지하려면 IP 주소 대신 DNS 호스트 이름을 사용하세요. 특히 복제본 세트 구성원 또는 샤딩된 클러스터 구성원을 구성할 때 IP 주소 대신 DNS 호스트 이름을 사용하는 것이 중요합니다.
IP 주소 대신 호스트 이름을 사용하여 스플릿 네트워크 호라이즌 전반에 걸쳐 클러스터를 구성하세요. MongoDB 5.0부터 IP 주소로만 구성된 노드는 스타트업 유효성 검사에 실패하며 시작되지 않습니다.
경고
인스턴스를 공개적으로 접근 가능한 IP 주소에 바인딩하기 전에 무단 접근으로부터 클러스터를 보호해야 합니다. 보안 권장 사항의 전체 목록은 자체 관리 배포서버에 대한 보안 검사 목록을 참조하세요. 최소한 인증을 활성화하고 네트워크 인프라를 강화하는 것을 고려합니다.
IP 바인딩에 대한 자세한 내용은 자체 관리 배포의 IP 바인딩 문서를 참조하세요.
모든 IPv4 주소에 바인딩하려면
0.0.0.0~을 입력하세요.모든 IPv4 및 IPv6 주소에 바인딩하려면
::,0.0.0.0또는 별표"*"(파일 이름 패턴 확장을 방지하기 위해 별표를 따옴표로 묶음)를 입력합니다. 또는net.bindIpAll설정을 사용합니다.참고
--bind_ip와--bind_ip_all은 상호 배타적입니다. 두 옵션을 모두 지정하면mongod이(가) 오류를 발생시키고 종료됩니다.명령줄 옵션
--bind는 구성 파일 설정net.bindIp을(를) 재정의합니다.
--bind_ip_allIf specified, the
mongodinstance binds to all IPv4 addresses (i.e.0.0.0.0). Ifmongodstarts with--ipv6,--bind_ip_allalso binds to all IPv6 addresses (i.e.::).mongodonly supports IPv6 if started with--ipv6. Specifying--bind_ip_allalone does not enable IPv6 support.경고
인스턴스를 공개적으로 접근 가능한 IP 주소에 바인딩하기 전에 무단 접근으로부터 클러스터를 보호해야 합니다. 보안 권장 사항의 전체 목록은 자체 관리 배포서버에 대한 보안 검사 목록을 참조하세요. 최소한 인증을 활성화하고 네트워크 인프라를 강화하는 것을 고려합니다.
IP 바인딩에 대한 자세한 내용은 자체 관리 배포의 IP 바인딩 문서를 참조하세요.
또는
--bind_ip옵션을::,0.0.0.0또는 별표"*"로 설정할 수 있습니다(파일 이름 패턴 확장을 방지하기 위해 별표를 따옴표로 묶음).참고
--bind_ip와--bind_ip_all은 상호 배타적입니다. 즉, 둘 중 하나를 지정할 수는 있지만 둘 다 지정할 수는 없습니다.
--clusterIpSourceAllowlist <string>버전 5.0의 신규 항목입니다.
가
mongos복제본 세트 의 다른 멤버 및 샤딩된 클러스터 의 일부인 경우 인스턴스의 인증 요청을 검증하는 IP 주소/CIDR(Classless Inter-Domain Routing ) 범위의 목록입니다.mongodmongod는 원래 IP 목록에 명시적으로 있거나 목록의 CIDR 범위 에 속하는지 확인합니다. IP 주소 없으면 서버mongod또는mongos를 인증하지 않습니다.--clusterIpSourceAllowlisthas no effect on amongodstarted without authentication.--clusterIpSourceAllowlist은(는) 쉼표로 구분된 여러 개의 IPv4/6 주소 또는 클래스 없는 도메인 간 라우팅(Classless Inter-Domain Routing,CIDR) 범위를 허용합니다.mongod --clusterIpSourceAllowlist 192.0.2.0/24,127.0.0.1,::1 중요
Ensure
--clusterIpSourceAllowlistincludes the IP address or CIDR ranges that include the IP address of each replica set member ormongosin the deployment to ensure healthy communication between cluster components.
--config <filename>, -f <filename>런타임 구성 옵션에 대한 구성 파일 을 지정합니다. 구성 파일 은
mongod의 런타임 구성에 선호되는 메서드입니다. 옵션은 명령줄 구성 옵션과 동일합니다. 자세한 내용은 자체 관리형 구성 파일 옵션 을 참조하세요.구성 파일이 ASCII 인코딩을 사용하는지 확인합니다.
mongod인스턴스는 UTF-8을 포함하여 ASCII가 아닌 인코딩을 사용하는 구성 파일을 지원하지 않습니다.
--configExpand <none|rest|exec>기본값: 없음
구성 파일에서 확장 지시문을 사용할 수 있도록 합니다. 확장 지시문을 사용하면 구성 파일 옵션에 대해 외부 소스 값을 설정할 수 있습니다.
--configExpand다음과 같은 확장 명령어를 지원합니다.값설명none기본값.
mongod는 확장 지시문을 확장하지 않습니다. 구성 파일 설정에 확장 지시문을 사용하는 경우mongod를 시작하지 못했습니다.restmongod구성 파일을 구문 분석할 때__rest확장 지시문을 확장합니다.execmongod구성 파일을 구문 분석할 때__exec확장 지시문을 확장합니다.You can specify multiple expansion directives as a comma-separated list, for example:
rest, exec. If the configuration file contains expansion directives not specified to--configExpand, themongodreturns an error and terminates.
--filePermissions <path>기본값:
0700UNIX 도메인 소켓 파일의 권한을 설정합니다.
--filePermissionsUnix 기반 시스템에만 적용됩니다.
--forkEnables a daemon mode that runs the
mongodprocess in the background. The--forkoption is not supported on Windows.By default
mongoddoes not run as a daemon. You runmongodas a daemon by using either--forkor a controlling process that handles daemonization, such asupstartorsystemd.To use
--fork, configure log output for themongodwith one of the following:
--ipv6IPv6 지원을 활성화합니다.
mongod은 기본적으로 IPv6 지원을 사용하지 않도록 설정합니다.Setting
--ipv6does not direct themongodto listen on any local IPv6 addresses or interfaces. To configure themongodto listen on an IPv6 interface, you must either:Configure
--bind_ipwith one or more IPv6 addresses or hostnames that resolve to IPv6 addresses, orSet
--bind_ip_alltotrue.
--keyFile <file>Specifies the path to a key file that stores the shared secret that MongoDB instances use to authenticate to each other in a sharded cluster or replica set.
--keyFileimplies--auth. See Self-Managed Internal/Membership Authentication for more information.내부 멤버십 인증을 위한 키파일은 YAML 형식을 사용해 키파일에 여러 키를 허용합니다. YAML 형식은 다음 중 하나를 허용합니다.
단일 키 문자열(이전 버전과 동일)
키 문자열의 순서
YAML 형식은 텍스트 파일 형식을 사용하는 기존의 단일 키 키파일과 호환됩니다.
--listenBacklog <number>기본값: 대상 시스템
SOMAXCONN상수수신 대기열에 존재할 수 있는 최대 연결 수입니다.
경고
이 매개 변수를 사용하기 전에 로컬 시스템 설명서를 통해 제한 사항과 구성 요구 사항을 살펴보세요.
중요
정의되지 않은 동작을 방지하려면 이 매개변수의 값을
1과 로컬 시스템SOMAXCONN상수 사이에 지정하세요.listenBacklog매개변수의 기본값은 대상 시스템에 따라 달라집니다. Linux에서 MongoDB는/proc/sys/net/core/somaxconn을 사용하며, 다른 모든 대상 시스템에서는 컴파일 타임 상수SOMAXCONN를 사용합니다.SOMAXCONN을 기호로 해석하는 시스템도, 수치로 해석하는 시스템도 있을 수 있습니다. 실제로 적용되는 수신 백로그는SOMAXCONN상수 또는--listenBacklog인수의 숫자 해석과 다를 수 있습니다.로컬 시스템의
SOMAXCONN상수를 초과하는listenBacklog매개 변수 값을 전달하는 것은 표준상 정의되지 않은 동작입니다. 값이 높으면 자동으로 정수가 잘리거나, 무시되거나, 예기치 않은 리소스 소모가 발생하거나, 기타 부정적인 결과가 발생할 수 있습니다.
--logappendmongod인스턴스가 다시 시작되면 기존 로그 파일 끝에 새 항목을 추가합니다. 이 옵션을 사용하지 않으면mongod가 기존 로그를 백업하고 새 파일을 만듭니다.
--logpath <path>모든 진단 로깅 정보를 표준 출력이나 호스트의 시스템 시스템 로그 시스템이 아닌 로그 파일로 보냅니다. MongoDB는 사용자가 지정한 경로에 로그 파일을 생성합니다.
By default, MongoDB moves any existing log file rather than overwriting it. To instead append to the log file, set the
--logappendoption.
--logRotate <string>기본값: 이름 바꾸기
서버 로그 및/또는 감사 로그를 회전할 때
logRotate명령의 동작을 결정합니다. 3} 또는renamereopen를 지정합니다:rename로그 파일의 이름을 변경합니다.reopen일반적인 Linux/Unix 로그 회전 동작에 따라 로그 파일을 닫았다가 다시 엽니다. Linux/유닉스 로그 로테이트 유틸리티를 사용할 때는reopen을 사용하여 로그 손실을 방지하세요.If you specify
reopen, you must also use--logappend.
--maxConns <number>mongod수락하는 최대 동시 연결 수입니다. 이 설정은 운영 체제에 구성된 최대 연결 추적 임계값보다 높은 경우 아무런 효과가 없습니다.이 옵션에 너무 낮은 값을 할당하지 마세요. 값이 너무 낮으면 정상적인 애플리케이션 작동 중에 오류가 발생합니다.
--networkMessageCompressors <string>Default: snappy,zstd,zlib
이
mongod인스턴스와 다음 간의 통신에 사용할 기본 압축기를 지정합니다.인스턴스가 복제본 세트나 샤딩된 클러스터의 일부인 경우 배포서버의 다른 구성원
OP_COMPRESSED메시지 형식을 지원하는 드라이버입니다.
MongoDB는 다음과 같은 압축 옵션을 지원합니다.
참고
mongod및mongos인스턴스 모두 기본적으로 순서대로snappy,zstd,zlib압축기로 설정됩니다.네트워크 압축을 사용하지 않으려면 값을
disabled로 설정합니다.중요
양쪽 당사자가 네트워크 압축을 활성화하면 메시지가 압축됩니다. 그렇지 않으면 양 당사자 간의 메시지는 압축되지 않습니다.
If you specify multiple compressors, then the order in which you list the compressors matter as well as the communication initiator. For example, if
mongoshspecifies the following network compressorszlib,snappyand themongodspecifiessnappy,zlib, messages betweenmongoshandmongoduseszlib.양 당사자가 최소 하나의 공통 압축기를 공유하지 않은 경우, 양 당사자 간의 메시지는 압축되지 않습니다. 예를 들어
mongosh이 네트워크 압축기zlib을 지정하고mongod이snappy을 지정하는 경우,mongosh와mongod사이의 메시지는 압축되지 않습니다.
--notablescancollection 스캔이 필요한 작업을 금지합니다. 추가 정보는
notablescan을(를) 참조하세요.
--nounixsocketDisables listening on the UNIX domain socket.
--nounixsocketapplies only to Unix-based systems.다음 중 하나가 참이 아닌 한
mongod프로세스는 항상 UNIX 소켓을 수신합니다.--nounixsocketis setnet.bindIpis not setnet.bindIp은(는)localhost또는 관련 IP 주소를 지정하지 않습니다.
mongod공식 Debian 및 Red Hat 또는 CentOS 패키지에서 설치된 경우 기본적으로bind_ip구성이127.0.0.1로 설정됩니다.
--outputConfigOutputs the
mongodinstance's configuration options, formatted in YAML, tostdoutand exits themongodinstance. For configuration options that uses External Configuration Values for Self-Managed MongoDB,--outputConfigreturns the resolved value for those options.경고
여기에는 이전에 외부 소스를 통해 난독화된 모든 구성 비밀번호와 암호가 포함될 수 있습니다.
활용 예시는 다음 문서를 참조하세요.
--pidfilepath <path>Specifies a file location to store the process ID (PID) of the
mongodprocess. The user running themongodormongosprocess must be able to write to this path. If the--pidfilepathoption is not specified, the process does not create a PID file. Use this option mainly with the--forkoption.참고
Linux
On Linux, PID file management is generally the responsibility of your distro's init system: usually a service file in the
/etc/init.ddirectory, or a systemd unit file registered withsystemctl. Only use the--pidfilepathoption if you are not using one of these init systems. For more information, please see the respective Installation Guide for your operating system.참고
macOS
On macOS, PID file management is generally handled by
brew. Only use the--pidfilepathoption if you are not usingbrewon your macOS system. For more information, please see the respective Installation Guide for your operating system.
--port <port>기본값:
27017
mongod가 샤드 멤버 또는 config 서버 멤버가 아닌 경우27018 if
mongodis ashard member27019 if
mongodis aconfig server member
MongoDB 인스턴스가 클라이언트 연결 수신을 대기하는 TCP 포트입니다.
--port옵션은0~65535의 값 범위를 허용합니다. 포트를0으로 설정하면 운영 체제에서 할당한 임의의 포트를 사용하도록mongod이(가) 구성됩니다.
--quiet출력을 제한하는 자동 모드에서
mongod를 실행합니다.이 옵션은 다음과 같은 활동을 억제합니다.
데이터베이스 명령의 출력
복제 활동
연결 수락 이벤트
연결 종료 이벤트
client metadata
--redactClientLogDataMongoDB Enterprise에서만 사용할 수 있습니다.
A
mongodrunning with--redactClientLogDataredacts any message accompanying a given log event before logging. This prevents themongodfrom writing potentially sensitive data stored on the database to the diagnostic log. Metadata such as error or operation codes, line numbers, and source file names are still visible in the logs.Use
--redactClientLogDatain conjunction with Encryption at Rest and TLS/SSL (Transport Encryption) to assist compliance with regulatory requirements.For example, a MongoDB deployment might store Personally Identifiable Information (PII) in one or more collections. The
mongodinstance logs events such as CRUD operations and sharding metadata, and might expose PII as part of these logging operations. Amongodrunning with--redactClientLogDataremoves any message accompanying these events before writing them to the log, which removes the PII.Diagnostics on a
mongodrunning with--redactClientLogDatamay be more difficult due to the lack of data related to a log event. See the process logging manual page for an example of the effect of--redactClientLogDataon log output.실행 중인
mongod에서setParameter을(를)redactClientLogData매개 변수와 함께 사용하여 이 설정을 구성합니다.
--setParameter <options>자체 관리형 배포서버를 위한 MongoDB Server 매개 변수 에 설명된 MongoDB 매개변수 중 하나를 지정합니다. 여러 개의
setParameter필드를 지정할 수 있습니다.
--shutdownThe
--shutdownoption cleanly and safely terminates themongodprocess. When invokingmongodwith this option you must set the--dbpathoption either directly or by way of the configuration file and the--configoption.The
--shutdownoption is available only on Linux systems.종료하는 다른 방법은
mongod프로세스 중지를 참조하십시오.
--syslogSends all logging output to the host's syslog system rather than to standard output or to a log file (
--logpath).The
--syslogoption is not supported on Windows.경고
The
syslogdaemon generates timestamps when it logs a message, not when MongoDB issues the message. This can lead to misleading timestamps for log entries, especially when the system is under heavy load. We recommend using the--logpathoption for production systems to ensure accurate timestamps.MongoDB는
syslog로 보내는 로그 메시지에 구성 요소를 포함합니다.... ACCESS [repl writer worker 5] Unsupported modification to roles collection ...
--syslogFacility <string>기본값: 사용자
Specifies the facility level used when logging messages to syslog. The value you specify must be supported by your operating system's implementation of syslog. To use this option, you must enable the
--syslogoption.
--timeStampFormat <string>Default: iso8601-local
로그 메시지의 타임스탬프에 사용되는 시간 형식입니다. 다음 값 중 하나를 지정하세요.
값설명iso8601-utcISO-8601 형식의 협정 세계시(UTC)로 타임스탬프를 표시합니다. 예를 들어, 에포크가 시작되는 시점의 뉴욕의 경우입니다.
1970-01-01T00:00:00.000Ziso8601-localISO-8601 형식의 현지 시간으로 타임스탬프를 표시합니다. 예를 들어, 에포크가 시작될 때 뉴욕의 경우는 다음과 같습니다.
1969-12-31T19:00:00.000-05:00참고
타임스탬프 형식은 더 이상
ctime을 지원하지 않습니다.ctime형식의 날짜 예시는Wed Dec 31 18:17:54.811입니다.
--timeZoneInfo <path>시간대 데이터베이스를 로드할 전체 경로입니다. 이 옵션을 제공하지 않을 경우 MongoDB는 내장된 시간대 데이터베이스를 사용합니다.
Linux 및 macOS 패키지에 포함된 구성 파일은 기본적으로 구역 데이터베이스 경로를
/usr/share/zoneinfo로 설정합니다.내장된 시간대 데이터베이스는 Olson/IANA 시간대 데이터베이스의 복사본입니다. MongoDB 출시와 함께 업데이트되지만 시간대 데이터베이스 출시 주기는 MongoDB 출시 주기와 다릅니다. 시간대 데이터베이스의 최신 출시는 다운로드 사이트에서 사용할 수 있습니다.
wget https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip unzip timezonedb-latest.zip mongod --timeZoneInfo timezonedb-2017b/ 경고
MongoDB 타사
timelib라이브러리를 사용하여 시간대 간의 정확한 변환을 제공합니다. 최근 업데이트 로 인해timelib이전 버전의 MongoDB 에서 구역 변환이 정확하지 않을 수 있습니다.MongoDB 5.0 이전 버전에서 표준 시간대 데이터베이스에 명시적으로 연결하려면 표준 시간대 데이터베이스를 다운로드하고 또한
timeZoneInfo매개변수를 사용합니다.
--transitionToAuthAllows the
mongodto accept and create authenticated and non-authenticated connections to and from othermongodandmongosinstances in the deployment. Used for performing rolling transition of replica sets or sharded clusters from a no-auth configuration to internal authentication. Requires specifying a internal authentication mechanism such as--keyFile.예를 들어 내부 인증 에 키파일 을 사용하는 경우 은
mongodmongod일치하는 키파일을 사용하여 배포의mongos모든 또는 와 인증된 연결을 생성합니다. 보안 메커니즘이 일치하지 않으면mongod는 대신 인증되지 않은 연결을 활용합니다.A
mongodrunning with--transitionToAuthdoes not enforce user access controls. Users may connect to your deployment without any access control checks and perform read, write, and administrative operations.참고
A
mongodrunning with internal authentication and without--transitionToAuthrequires clients to connect using user access controls. Update clients to connect to themongodusing the appropriate user prior to restartingmongodwithout--transitionToAuth.
--unixSocketPrefix <path>기본값/tmp
The path for the UNIX socket.
--unixSocketPrefixapplies only to Unix-based systems.이 옵션에 값이 없으면
mongod프로세스가/tmp을(를) 접두사로 사용하여 소켓을 만듭니다. 다음 중 하나에 해당하지 않는 한 MongoDB는 UNIX 소켓에서 생성하고 수신 대기합니다.net.unixDomainSocket.enabled입니다false--nounixsocketis setnet.bindIpis not setnet.bindIp은(는)localhost또는 관련 IP 주소를 지정하지 않습니다.
--verbose, -v표준 출력 또는 로그 파일에 반환되는 내부 보고의 양을 늘립니다. 옵션을 여러 번 포함하여
-v형식으로 자세한 정도를 늘립니다(예시:-vvvvv.참고
버전 4.2부터 MongoDB는 로그 메시지에 디버그 상세도 수준(1~5)을 포함합니다. 예를 들어, 상세도 수준이 2인 경우 MongoDB는
D2을(를) 기록합니다. 이전 버전에서는 MongoDB 로그 메시지에 디버그 수준에D만 지정되었습니다.
LDAP 인증 또는 권한 부여 옵션
참고
MongoDB 8.0부터 시작하여 9.0에서 계속되는, LDAP 인증 및 권한 부여는 더 이상 지원되지 않습니다. LDAP는 향후 릴리스에서 제거될 예정입니다.
대체 인증 방법에 대해 알아보려면 LDAP 인증 대안을 참조하세요.
--ldapServers <host1>:<port>,<host2>:<port>,...,<hostN>:<port>MongoDB Enterprise에서만 사용할 수 있습니다.
mongod사용자를 인증하거나 사용자가 특정 데이터베이스에서 수행할 수 있는 작업을 결정하는 LDAP 서버입니다. 지정된 LDAP 서버에 복제된 인스턴스가 있는 경우 각 복제된 서버의 호스트와 포트를 쉼표로 구분된 목록으로 지정할 수 있습니다.LDAP 인프라가 여러 LDAP 서버에 걸쳐 LDAP 디렉토리 분할하는 경우,하나의 LDAP 서버 또는 해당 서버의 복제된 인스턴스를
--ldapServers로 지정합니다. MongoDB RFC 4511 4.1.10에 정의된 대로 다음과 같은 LDAP 참조를 지원합니다. 인프라의 모든 LDAP 서버 나열하는 데--ldapServers를 사용하지 마세요.이 설정은
setParameter을(를) 사용하여 실행 중인mongod에서 구성할 수 있습니다.설정하지 않으면
mongod은(는) LDAP 인증 또는 권한 부여사용할 수 없습니다.
--ldapValidateLDAPServerConfig <boolean>MongoDB Enterprise에서만 사용할 수 있습니다.
A flag that determines if the
mongodinstance checks the availability of theLDAP server(s)as part of its startup:true인 경우mongod인스턴스는 가용성 확인을 수행하고 LDAP 서버를 사용할 수 있는 경우에만 계속 시작됩니다.false인 경우mongod인스턴스는 가용성 검사를 생략합니다. 즉, LDAP 서버를 사용할 수 없는 경우에도 인스턴스가 시작됩니다.
--ldapQueryUser <string>MongoDB Enterprise에서만 사용할 수 있습니다.
LDAP 서버에 연결하거나 쿼리를 수행할 때
mongod이 바인딩되는 ID입니다.다음 중 하나라도 해당하는 경우에만 필요합니다.
Using an LDAP query for
username transformation.LDAP 서버가 익명 바인딩을 허용하지 않음
You must use
--ldapQueryUserwith--ldapQueryPassword.설정하지 않으면
mongod은 LDAP 서버에 바인딩을 시도하지 않습니다.이 설정은
setParameter을(를) 사용하여 실행 중인mongod에서 구성할 수 있습니다.참고
Windows MongoDB deployments can use
--ldapBindWithOSDefaultsinstead of--ldapQueryUserand--ldapQueryPassword. You cannot specify both--ldapQueryUserand--ldapBindWithOSDefaultsat the same time.
MongoDB Enterprise에서만 사용할 수 있습니다.
The password used to bind to an LDAP server when using --ldapQueryUser. You must use --ldapQueryPassword with --ldapQueryUser.
If not set, mongod does not attempt to bind to the LDAP server.
You can configure this setting on a running mongod using setParameter.
ldapQueryPassword setParameter 명령은 string 또는 string 배열을 모두 허용합니다. ldapQueryPassword 를 배열로 설정하면 MongoDB는 성공할 때까지 각 비밀번호를 순서대로 시도합니다. 비밀번호 배열을 사용하여 다운타임 없이 LDAP 계정 비밀번호를 롤오버할 수 있습니다.
참고
Windows MongoDB deployments can use --ldapBindWithOSDefaults instead of --ldapQueryUser and --ldapQueryPassword. You cannot specify both --ldapQueryPassword and --ldapBindWithOSDefaults at the same time.
--ldapBindWithOSDefaults <bool>기본값: false
Windows 플랫폼용 MongoDB Enterprise에서만 사용할 수 있습니다.
LDAP 서버에 연결할 때
mongod이(가) Windows 로그인 자격 증명을 사용하여 인증하거나 바인딩할 수 있도록 허용합니다.다음과 같은 경우에만 필요합니다.
Using an LDAP query for
username transformation.LDAP 서버가 익명 바인딩을 허용하지 않음
Use
--ldapBindWithOSDefaultsto replace--ldapQueryUserand--ldapQueryPassword.
--ldapBindMethod <string>기본값: 단순
MongoDB Enterprise에서만 사용할 수 있습니다.
The method
mongoduses to authenticate to an LDAP server. Use with--ldapQueryUserand--ldapQueryPasswordto connect to the LDAP server.--ldapBindMethod다음 값을 지원합니다.simple-mongod는 간단한 인증을 사용합니다.sasl-mongod는 인증에 SASL 프로토콜을 사용합니다.
If you specify
sasl, you can configure the available SASL mechanisms using--ldapBindSaslMechanisms.mongoddefaults to usingDIGEST-MD5mechanism.
--ldapBindSaslMechanisms <string>기본값입니다: DIGEST-MD5
MongoDB Enterprise에서만 사용할 수 있습니다.
쉼표로 구분된
mongod이(가) LDAP 서버에 인증할 때 사용할 수 있는 SASL 메커니즘의 목록입니다.mongod및 LDAP 서버는 하나 이상의 메커니즘에 동의해야 합니다.mongod은(는) 런타임 시 호스트 컴퓨터에 설치된 모든 SASL 메커니즘 라이브러리를 동적으로 로드합니다.mongod호스트와 원격 LDAP 서버 호스트 둘 다에서 선택한 SASL 메커니즘에 적합한 라이브러리를 설치하고 구성합니다. 운영 체제에는 기본적으로 특정 SASL 라이브러리가 포함되어 있을 수 있습니다. 설치 및 구성에 대한 지침은 각 SASL 메커니즘과 관련된 설명서를 참조하세요.중요
Cyrus SASL 2.1.28 이상을 호스팅하는 호스트에서 MongoDB는
DIGEST-MD5메커니즘을 사용한 LDAP SASL 바인딩을 지원하지 않습니다.security.ldap.bind.method을(를)sasl(으)로 설정하고security.ldap.bind.saslMechanisms에서DIGEST-MD5을(를) 지정하면mongod및mongos이(가) 시작되지 않습니다.자세한 내용과 대안은 Cyrus SASL 2.1.28 이상에서 DIGEST-MD5가 지원되지 않음을 참조하세요.
자체 관리 배포서버에서 Kerberos 인증 과 함께
GSSAPISASL 메커니즘을 사용하는 경우mongod호스팅하다 시스템에 대해 다음을 확인합니다.LinuxKRB5_CLIENT_KTNAME환경 변수는 호스팅하다 시스템의 클라이언트 Linux 키탭 파일 이름으로 확인됩니다. Kerberos 환경 변수에 대한 자세한 내용은 Kerberos 설명서를 참조하세요.클라이언트 키 탭에는 LDAP 서버에 연결하고 LDAP 쿼리를 실행할 때 사용할
mongod의 사용자 주체가 포함되어 있습니다.
Windows- Active Directory 서버 에 연결하는 경우 Windows Kerberos 구성은 사용자가 시스템에 로그온할 때 자동으로 티켓 부여 티켓을 생성합니다.
--ldapBindWithOSDefaults를true로 설정하여mongod가 Active Directory 서버 에 연결할 때 생성된 자격 자격 증명 사용하고 쿼리를 실행할 수 있도록 허용합니다.
Set
--ldapBindMethodtosaslto use this option.참고
SASL 메커니즘의 전체 목록은 IANA 목록을 참조하세요. 해당 서비스와 호환되는 SASL 메커니즘을 확인하려면 해당 LDAP 또는 Active Directory 서비스의 문서를 참조하세요.
MongoDB는 SASL 메커니즘 라이브러리의 출처가 아닙니다. 또한, MongoDB 설명서는 특정 SASL 메커니즘 설치나 구성을 위한 절대적인 출처가 아닙니다. 설명서와 지원은 SASL 메커니즘 라이브러리 공급업체나 소유자에게 요청하시기 바랍니다.
SASL에 관한 자세한 내용은 다음 리소스를 참조하세요.
Linux의 경우 Cyrus SASL 문서를 참조하세요.
Windows 의 경우 Windows SASL 설명서를 참조하세요.
--ldapTransportSecurity <string>기본값: tls
MongoDB Enterprise에서만 사용할 수 있습니다.
기본적으로
mongod은 LDAP 서버에 대한 TLS/SSL 보안 연결을 만듭니다.Linux 배포의 경우
/etc/openldap/ldap.conf파일에서 적절한 TLS 옵션을 구성해야 합니다. 운영 체제의 패키지 관리자가libldap종속성을 통해 MongoDB Enterprise 설치의 일부로 이 파일을 생성합니다. 더 자세한 내용은 ldap.conf OpenLDAP 설명서에서TLS Options에 관한 설명을 참조하세요.Windows 배포서버의 경우, 반드시 LDAP 서버 CA 인증서를 Windows 인증서 관리 도구에 추가해야 합니다.도구의 정확한 이름과 기능은 운영 체제의 버전에 따라 다를 수 있습니다.인증서 관리에 관한 자세한 정보는 Windows 버전별 설명서를 참조하세요.
Set
--ldapTransportSecuritytononeto disable TLS/SSL betweenmongodand the LDAP server.경고
Setting
--ldapTransportSecuritytononetransmits plaintext information and possibly credentials betweenmongodand the LDAP server.
--ldapTimeoutMS <int>기본값: 10000
MongoDB Enterprise에서만 사용할 수 있습니다.
LDAP 서버가 요청에 응답할 때까지
mongod이(가) 기다려야 하는 시간(밀리초) 입니다.Increasing the value of
--ldapTimeoutMSmay prevent connection failure between the MongoDB server and the LDAP server, if the source of the failure is a connection timeout. Decreasing the value of--ldapTimeoutMSreduces the time MongoDB waits for a response from the LDAP server.이 설정은
setParameter을(를) 사용하여 실행 중인mongod에서 구성할 수 있습니다.
--ldapRetryCount <int>버전 6.1에 추가 되었습니다.
기본값: 0
MongoDB Enterprise에서만 사용할 수 있습니다.
네트워크 오류 후 서버 LDAP 관리자가 작업을 다시 시도한 횟수입니다.
--ldapUserToDNMapping <string>MongoDB Enterprise에서만 사용할 수 있습니다.
인증을 위해
mongod에 제공된 사용자 이름을 LDAP DN(고유 이름)에 매핑합니다. 다음 시나리오에서--ldapUserToDNMapping을 사용하여 사용자 이름을 LDAP DN으로 변환해야 할 수 있습니다.사용자가 완전한 LDAP DN이 아닌 사용자 이름으로 MongoDB에서 인증하는 간단한 LDAP 바인딩을 사용해 LDAP 인증을 실행하는 경우
Using an
LDAP authorization query templatethat requires a DN.x.509 또는 Kerberos 등의 다양한 인증 메커니즘을 사용해 MongoDB에서 인증하는 클라이언트의 사용자 이름을 권한 승인을 위해 완전한 LDAP DN으로 전환하는 경우
--ldapUserToDNMappingexpects a quote-enclosed JSON-string representing an ordered array of documents. Each document contains a regular expressionmatchand either asubstitutionorldapQuerytemplate used for transforming the incoming username.배열의 각 문서는 다음과 같은 형식을 갖습니다.
{ match: "<regex>" substitution: "<LDAP DN>" | ldapQuery: "<LDAP Query>" } 필드설명예시match제공된 사용자 이름과 일치하는 ECMAScript 형식의 정규 표현식(regex)입니다. 괄호로 묶인 각 섹션은
substitution또는ldapQuery에서 사용하는 regex 캡처 그룹을 나타냅니다."(.+)ENGINEERING""(.+)DBA"substitution"cn={0},ou=engineering, dc=example,dc=com"ldapQuerymatch정규식과 일치하는 인증 이름을 RFC4515 및 RFC4516 관련하여 인코딩된 LDAP 쿼리 URI에 삽입하는 LDAP 쿼리 형식 지정 템플릿입니다. 중괄호로 묶인 각 숫자 값은match표현식을 통해 인증 사용자 이름에서 추출한 해당 정규식 캡처 그룹으로 대체됩니다.mongod는 LDAP 서버에 대해 쿼리를 실행하여 인증된 사용자의 LDAP DN을 검색합니다.mongod변환이 성공하려면 정확히 하나의 반환된 결과가 필요합니다. 그렇지 않으면mongod는 이 변환을 건너뜁니다."ou=engineering,dc=example, dc=com??one?(user={0})"참고
RFC4514, RFC4515, RFC4516 또는 LDAP 쿼리에 대한 설명은 MongoDB 문서의 범위를 벗어납니다. RFC를 직접 검토 선호하는 LDAP 리소스 사용하세요.
배열의 각 문서에 대해
substitution또는ldapQuery사용해야 합니다. 동일한 문서에서 둘 다 지정할 수는 없습니다 .인증 또는 권한 부여를 수행할 때
mongod는 배열의 각 문서를 지정된 순서대로 진행하면서match필터와 비교하여 인증 사용자 이름을 확인합니다. 일치하는 항목이 발견되면mongod변환을 적용하고 사용자 인증을 위해 출력을 사용합니다.mongod는 배열의 나머지 문서를 확인하지 않습니다.지정한 문서가 제공된 인증 이름과 일치하지 않는 경우
mongod는 계속해서 문서 목록에서 일치하는 항목을 추가로 찾습니다. 문서에서 일치하는 항목을 찾을 수 없거나 문서에서 설명하는 변환이 실패하면mongod오류를 반환합니다.mongod는 LDAP 서버에 대한 네트워킹 또는 인증 장애로 인해 변환 중 하나를 평가할 수 없는 경우에도 오류를 반환합니다.mongod는 연결 요청을 거부하고 배열의 나머지 문서를 확인하지 않습니다.Starting in MongoDB 5.0,
--ldapUserToDNMappingaccepts an empty string""or empty array[ ]in place of a mapping documnent. If providing an empty string or empty array to--ldapUserToDNMapping, MongoDB maps the authenticated username as the LDAP DN. In earlier versions, providing an empty mapping document causes mapping to fail.예시
다음은 두 개의 변환 문서를 보여줍니다. 첫 번째 문서는
@ENGINEERING로 끝나는 모든 문자열과 일치하여 접미사 앞에 오는 모든 항목을 정규식 캡처 그룹에 배치합니다. 두 번째 문서는@DBA로 끝나는 모든 문자열과 일치하여 접미사 앞에 오는 모든 항목을 정규식 캡처 그룹에 배치합니다.IMPORTANT You must pass the array to
--ldapUserToDNMappingas a string."[ { match: "(.+)@ENGINEERING.EXAMPLE.COM", substitution: "cn={0},ou=engineering,dc=example,dc=com" }, { match: "(.+)@DBA.EXAMPLE.COM", ldapQuery: "ou=dba,dc=example,dc=com??one?(user={0})" } ]" 사용자 이름이
alice@ENGINEERING.EXAMPLE.COM인 사용자가 첫 번째 문서와 일치합니다. Regex 캡처 그룹{0}은 문자열alice에 해당합니다. 결과 출력은 DN"cn=alice,ou=engineering,dc=example,dc=com"입니다.사용자 이름이
bob@DBA.EXAMPLE.COM인 사용자가 두 번째 문서와 일치합니다. Regex 캡처 그룹{0}은 문자열bob에 해당합니다. 결과 출력은 LDAP 쿼리"ou=dba,dc=example,dc=com??one?(user=bob)"입니다.mongod는 LDAP 서버에 대해 이 쿼리를 실행하여 결과"cn=bob,ou=dba,dc=example,dc=com"를 반환합니다.If
--ldapUserToDNMappingis unset,mongodapplies no transformations to the username when attempting to authenticate or authorize a user against the LDAP server.이 설정은 실행 중인
mongod에서setParameter데이터베이스 명령을 사용하여 구성할 수 있습니다.
--ldapAuthzQueryTemplate <string>MongoDB Enterprise에서만 사용할 수 있습니다.
인증된 사용자가 속한 LDAP 그룹을 가져오기 위해
mongod이 실행하는 RFC4515 및 RFC4516를 준수하는 형식의 상대 LDAP 쿼리 URL . 쿼리--ldapServers에 지정된 하나 이상의 호스팅하다 를 기준으로 합니다.URL에서 다음과 같은 대체 토큰을 사용할 수 있습니다.
대체 토큰설명{USER}Substitutes the authenticated username, or the
transformedusername if ausername mappingis specified.{PROVIDED_USER}인증 또는
LDAP transformation전에 제공된 사용자 이름 등을 대체합니다.쿼리 URL을 구성할 때 LDAP 매개 변수의 순서가 RFC4516을 준수하는지 확인하세요.
[ dn [ ? [attributes] [ ? [scope] [ ? [filter] [ ? [Extensions] ] ] ] ] ] 쿼리에 속성이 포함된 경우
mongod는 쿼리가 이 엔터티가 속한 DN을 검색한다고 가정합니다.쿼리에 속성이 없는 경우
mongod에서는 쿼리가 사용자가 멤버인 모든 엔티티를 검색한다고 가정합니다.쿼리에서 반환된 각 LDAP DN에 대해
mongod는 권한이 부여된 사용자에게admin데이터베이스에 해당하는 역할을 할당합니다.admin데이터베이스의 역할이 DN과 정확히 일치하는 경우mongod사용자에게 해당 역할에 할당된 역할과 권한을 부여합니다. 역할 생성에 대한 자세한 내용은db.createRole()방법을 참조하세요.예시
이 LDAP 쿼리는 LDAP 사용자 개체의
memberOf속성에 나열된 모든 그룹을 반환합니다."{USER}?memberOf?base" LDAP 구성에
memberOf속성이 사용자 스키마의 일부로 포함되어 있지 않거나, 그룹 멤버십을 보고하는 데 다른 속성이 있거나, 속성을 통해 그룹 멤버십을 추적하지 못할 수 있습니다. 고유한 LDAP 구성과 관련하여 쿼리를 구성합니다.설정하지 않으면
mongod에서 LDAP를 사용하여 사용자를 승인할 수 없습니다.이 설정은 실행 중인
mongod에서setParameter데이터베이스 명령을 사용하여 구성할 수 있습니다.
스토리지 옵션
--storageEngine string기본값:
wiredTigermongod데이터베이스의 스토리지 엔진을 지정합니다. 사용 가능한 값은 다음과 같습니다:값설명wiredTigerWiredTiger 스토리지 엔진을 지정합니다.
inMemory자체 관리 배포서버를 위한 인메모리 스토리지 엔진을 지정합니다.
MongoDB Enterprise에서만 사용할 수 있습니다.
If you attempt to start a
mongodwith a--dbpaththat contains data files produced by a storage engine other than the one specified by--storageEngine,mongoddoesn't start.
--dbpath <path>기본값: Linux 및 macOS에서는
/data/db, Windows에서는\data\dbmongod인스턴스가 데이터를 저장하는 디렉토리입니다.패키지 관리자 설치에 포함된 기본 구성 파일을 사용하는 경우, 해당
storage.dbPath설정은 다른 기본값을 사용합니다.The files in
--dbpathmust correspond to the storage engine specified in--storageEngine. If the data files do not correspond to--storageEngine,mongoddoesn't start.
--directoryperdbUses a separate directory to store data for each database. The directories are under the
--dbpathdirectory, and each subdirectory name corresponds to the database name.Not available for
mongodinstances that use the in-memory storage engine.Starting in MongoDB 5.0, dropping the final collection in a database (or dropping the database itself) when
--directoryperdbis enabled deletes the newly empty subdirectory for that database.To change the
--directoryperdboption for existing deployments:독립형 인스턴스의 경우:
Use
mongodumpon the existingmongodinstance to generate a backup.mongod인스턴스를 중지합니다.Add the
--directoryperdbvalue and configure a new data directorymongod인스턴스를 다시 시작합니다.Use
mongorestoreto populate the new data directory.
복제본 세트의 경우:
보조 구성원을 중지합니다.
Add the
--directoryperdbvalue and configure a new data directory to that secondary member.보조 구성원을 다시 시작합니다.
초기 동기화를 사용하여 새 데이터 디렉토리를 채웁니다.
다른 보 조구성원도 동일한 방식으로 업데이트합니다.
프라이머리를 물러나게 하고, 물러난 구성원을 같은 방식으로 업데이트합니다.
--syncdelay <value>기본값: 60
MongoDB가 데이터를 데이터 파일로 플러시하기 전에 경과할 수 있는 시간을 제어합니다.
프로덕션 시스템에서는 이 값을 설정하지 마십시오. 거의 모든 상황에서 기본 설정을 사용해야 합니다.
The
mongodprocess writes data very quickly to the journal and lazily to the data files.--syncdelayhas no effect on journaling, but if--syncdelayis set to0the journal eventually consumes all available disk space.Not available for
mongodinstances that use the in-memory storage engine.WiredTiger는 내구성 있는 데이터를 제공하기 위해 체크포인트를 사용합니다. 자세한 내용은 저널링 및 WiredTiger 스토리지 엔진을 참조하세요.
--upgradeUpgrades the on-disk data format of the files specified by the
--dbpathto the latest version, if needed.이 옵션은 데이터 파일이 이전 형식인 경우에만
mongod작업에 영향을 미칩니다.대부분의 경우 이 값을 설정하지 않는 것이 좋습니다. 그래야 업그레이드 프로세스를 최대한으로 제어할 수 있습니다. 업그레이드 프로세스에 관한 자세한 내용은 MongoDB 릴리스 노트를 참조하세요.
--repairmongod인스턴스의 모든 데이터베이스에서 복구 루틴을 실행합니다.MongoDB 5.0부터 도입됨:
복구 작업은 컬렉션의 유효성을 검사해 모든 불일치를 찾아내고 가능한 경우 이를 수정합니다. 그래서 인덱스를 다시 작성해야 하는 상황을 방지할 수 있습니다.
컬렉션의 데이터 파일이 복구되거나 컬렉션에 유효성 검사 단계에서 해결할 수 없는 불일치가 포함되어 있는 경우, 모든 인덱스가 다시 작성됩니다.
팁
저널링을 활성화하여 실행하는 경우, 서버가 저널 파일을 사용하여 데이터 파일을 자동으로 깨끗한 상태로 복원할 수 있으므로 복구를 실행할 필요가 거의 없습니다. 그러나 디스크 수준 데이터 손상을 복구해야 하는 경우 복구를 실행해야 할 수도 있습니다.
경고
Only use
mongod --repairif you have no other options. The operation removes and does not save any corrupt data during the repair process.Avoid running
--repairagainst a replica set member:복제본 세트 멤버를 복구하려면 데이터의 손상되지 않은 복사본을 사용할 수 있는 경우(예: 최근 백업 또는 복제본 세트 의 손상되지 않은 멤버) 대신 해당 손상되지 않은 사본에서 복원 합니다. 학습 내용 은 자체 관리형 복제본 세트의 구성원 재동기화를 참조하세요.
If you choose to run
mongod --repairagainst a replica set member and the operation modifies the data or the metadata, you must still perform a full resync in order for the member to rejoin the replica set.
If repair fails to complete for any reason, you must restart the instance using the
--repairoption.
--journalCommitInterval <value>기본값: 100
mongod프로세스가 저널 작업 간에 허용하는 최대 시간(밀리초)입니다. 값의 범위는 1~500밀리초입니다. 값이 낮을수록 디스크 성능이 저하되는 대신 저널의 내구성이 높아집니다.WiredTiger에서 기본 저널 커밋 간격은 100밀리초입니다.
j:true를 포함하거나 암시하는 쓰기는 즉시 저널 동기화를 유발합니다. 동기화 빈도에 영향을 미치는 추가 조건과 자세한 내용은 저널링 프로세스를 참조하세요.Not available for
mongodinstances that use the in-memory storage engine.
WiredTiger 옵션
--wiredTigerCacheSizeGB <float>WiredTiger가 모든 데이터에 사용하는 내부 캐시의 최대 크기를 정의합니다. 인덱스 빌드에 사용되는 메모리(
maxIndexBuildMemoryUsageMegabytes참조)는 WiredTiger 캐시 메모리와 분리되어 있습니다.Avoid increasing the WiredTiger internal cache size above its default value. If your use case requires to do so, you can use
--wiredTigerCacheSizePctto specify a percentage of up to 80% of available memory. Values can range from 0.256GB to 10000GB.자세히 알아보려면 메모리 사용을 참조하세요.
참고
호스팅하다 에 프로비저닝된 메모리 양보다 적은 RAM 사용하도록 구성된 컨테이너 에서 실행 경우와 같은 일부 인스턴스에서는 제한을 고려해야 합니다. 경우에 따라 WiredTiger 특정 컨테이너 의 메모리 제한을 고려하지 않을 수 있으므로 WiredTiger 캐시 적절한 값으로 구성해야 할 수도 있습니다.
WiredTiger 사용 가능한 최대 RAM 으로 활용하는
memory limit값을 보려면hostInfo명령을 사용합니다.
--wiredTigerCacheSizePct <float>캐시 에 할당할 최대 메모리 양을 물리적 RAM 에 대한 백분율로 정의합니다. 인덱스 빌드 소비하는 메모리(
maxIndexBuildMemoryUsageMegabytes참조)는 WiredTiger 캐시 메모리와 분리되어 있습니다.사용 가능한 메모리의 최대 80%를 백분율로 지정할 수 있습니다. 계산된 값의 범위 0.256GB 에서 10000GB 입니다. 예시 를 들어 RAM 2GB 인 시스템에서는 2GB 의 10%가 0이므로
--wiredTigerCacheSizePct를 10 로 설정하다 수 없습니다.2GB 0.256GB.메모리 제한에 대해 자세히 학습하려면 메모리 사용을 참조하세요.
참고
호스팅하다 에 프로비저닝된 메모리 양보다 적은 RAM 사용하도록 구성된 컨테이너 에서 실행 경우와 같은 일부 인스턴스에서는 제한을 고려해야 합니다. 경우에 따라 WiredTiger 특정 컨테이너 의 메모리 제한을 고려하지 않을 수 있으므로 WiredTiger 캐시 적절한 값으로 구성해야 할 수도 있습니다.
WiredTiger 사용 가능한 최대 RAM 으로 활용하는
memory limit값을 보려면hostInfo명령을 사용합니다.MongoDB는 파일 시스템 캐시를 통해 자동으로 WiredTiger 캐시나 다른 프로세스에서 사용되지 않는 모든 여유 메모리를 사용합니다.
참고
The
--wiredTigerCacheSizePctlimits the size of the WiredTiger internal cache. The operating system uses the available free memory for filesystem cache, which allows the compressed MongoDB data files to stay in memory. In addition, the operating system uses any free RAM to buffer file system blocks and file system cache.추가적인 RAM 소비를 수용하려면 WiredTiger 내부 캐시 크기를 줄여야 할 수 있습니다.
The default WiredTiger internal cache size value assumes that there is a single
mongodinstance per machine. If a single machine contains multiple MongoDB instances, decrease the setting to accommodate the othermongodinstances.If you run
mongodin a container (for example,lxc,cgroups, Docker, etc.) that does not have access to all of the RAM available in a system, you must set--wiredTigerCacheSizePctor--wiredTigerCacheSizeGBto a value less than the amount of RAM available in the container. The exact amount depends on the other processes running in the container. SeememLimitMB.You can only provide one of either
--wiredTigerCacheSizePctor--wiredTigerCacheSizeGB.
--wiredTigerJournalCompressor <compressor>기본값: snappy
WiredTiger 저널 데이터를 압축하는 데 사용할 압축 유형을 지정합니다.
사용할 수 있는 압축 옵션은 다음과 같습니다.
none
--wiredTigerDirectoryForIndexesWhen you start
mongodwith--wiredTigerDirectoryForIndexes,mongodstores indexes and collections in separate subdirectories under the data (i.e.--dbpath) directory. Specifically,mongodstores the indexes in a subdirectory namedindexand the collection data in a subdirectory namedcollection.기호 링크를 사용하면 인덱스에 대해 다른 위치를 지정할 수 있습니다. 구체적으로는
mongod인스턴스가 실행 중이 아닌 경우,index하위 디렉토리를 대상으로 이동하고 데이터 디렉토리 하에 새 대상에 대한index라는 기호 링크를 생성합니다.
--wiredTigerCollectionBlockCompressor <compressor>기본값: snappy
컬렉션 데이터의 기본 압축을 지정합니다. 컬렉션을 만들 때 컬렉션별로 재정의할 수 있습니다.
사용할 수 있는 압축 옵션은 다음과 같습니다.
none
--wiredTigerCollectionBlockCompressoraffects all collections created. If you change the value of--wiredTigerCollectionBlockCompressoron an existing MongoDB deployment, all new collections use the specified compressor. Existing collections continue to use the compressor specified when they were created, or the default compressor at that time.
--wiredTigerIndexPrefixCompression <boolean>기본값: true
인덱스 데이터에 대한 접두사 압축 활성화하거나 비활성화합니다.
Specify
truefor--wiredTigerIndexPrefixCompressionto enable prefix compression for index data, orfalseto disable prefix compression for index data.The
--wiredTigerIndexPrefixCompressionsetting affects all indexes created. If you change the value of--wiredTigerIndexPrefixCompressionon an existing MongoDB deployment, all new indexes use prefix compression. Existing indexes are not affected.
복제 옵션
--replSet <setname>복제를 구성합니다. 복제본 세트의 이름을 이 세트의 인수로 지정합니다. 복제본 세트의 모든 호스트는 세트 이름이 같아야 합니다.
애플리케이션이 2개 이상의 복제본 세트에 연결된 경우 각 세트의 이름이 달라야 합니다. 일부 드라이버는 복제본 세트 이름으로 복제본 세트 연결을 그룹화합니다.
--oplogSize <value>oplog의 최대 크기(메가바이트)입니다.
oplogSize설정은 디스크상의 크기가 아니라 oplog의 압축되지 않은 크기를 구성합니다.참고
2}가 삭제되는 것을 방지하기 위해 oplog가 구성된 크기 제한을 초과하여 커질 수
majority commit point있습니다.기본적으로
mongod프로세스는 사용 가능한 최대 공간을 기준으로 oplog를 생성합니다. 64비트 시스템의 경우, 일반적으로 oplog는 사용 가능한 디스크 공간의 5%입니다.Once the
mongodhas created the oplog for the first time, changing the--oplogSizeoption doesn't affect the size of the oplog. To change the minimum oplog retention period after starting themongod, usereplSetResizeOplog.replSetResizeOplogenables you to resize the oplog dynamically without restarting themongodprocess. To persist the changes made usingreplSetResizeOplogthrough a restart, update the value of--oplogSize.자세한 내용은 oplog 크기에서 확인하세요.
--oplogMinRetentionHours <value>oplog 항목을 보존할 최소 시간을 지정합니다. 여기서 소수 값은 분 단위를 나타냅니다. 예를 들어 값
1.5는 1시간 30분을 나타냅니다.이 값은
0이상이어야 합니다. 이 값이0이면mongod가 구성된 최대 oplog 크기를 유지하기 위해 가장 오래된 항목부터 oplog를 잘라내야 함을 의미합니다.기본값은
0입니다.--oplogMinRetentionHours로 시작하는mongod는 다음과 같은 경우에만 oplog 항목을 제거합니다.oplog가 구성된 최대 크기에 도달하고
oplog 항목이 호스트 시스템 시계를 기준으로 구성된 시간보다 오래된 경우
최소 oplog 보존 기간으로 구성된 경우
mongod는 다음과 같이 동작합니다.oplog는 구성된 시간 동안 oplog 항목을 유지하기 위해 제한 없이 늘릴 수 있습니다. 하지만 이로 인해 쓰기의 양이 많아지고 보유 기간이 늘어나며 시스템 디스크 공간이 줄어들거나 고갈될 수 있습니다.
oplog가 최대 크기를 초과하여 커지면, oplog가 최대 크기로 돌아오거나 또는 더 작은 최대 크기로 구성되더라도
mongod가 해당 디스크 공간을 계속 보유할 수도 있습니다. oplog 크기 감소로 디스크 공간이 즉시 반환되지 않음을 참조하세요.
To change the minimum oplog retention period after starting the
mongod, usereplSetResizeOplog.replSetResizeOplogenables you to resize the oplog dynamically without restarting themongodprocess. To persist the changes made usingreplSetResizeOplogthrough a restart, update the value of--oplogMinRetentionHours.
--enableMajorityReadConcern기본값: true
"majority"읽기 고려를 위한 지원을 구성합니다.Starting in MongoDB 5.0,
--enableMajorityReadConcerncannot be changed and is always set totrue. In earlier versions of MongoDB,--enableMajorityReadConcernwas configurable.경고
프라이머리-세컨더리-중재자(PSA) 아키텍처를 사용 중이라면 다음을 고려하세요.
쓰기 고려 (write concern)
"majority"는 세컨더리를 사용할 수 없거나 지연되었을 때 성능 문제를 일으키습니다. 이러한 문제를 완화하는 방법에 대핕 조언은 자체 관리형 PSA 복제본 세트를 통한 성능 문제 완화를 참조하세요.글로벌 기본값
"majority"를 사용하고 있고, 쓰기 고려가 과반수 크기보다 작으면 쿼리가 오래된 (완전히 복제되지 않은) 부실 데이터를 반환할 수 있습니다.
샤딩된 클러스터 옵션
--configsvrconfig 서버를 시작하는 경우에는 필수입니다.
Declares that this
mongodinstance serves as the config server of a sharded cluster. When running with this option, clients (i.e. other cluster components) cannot write data to any database other thanconfigandadmin. The default port for amongodwith this option is27019and the default--dbpathdirectory is/data/configdb, unless specified.중요
When starting a MongoDB server with
--configsvr, you must also specify a--replSet.사용이 중단된 미러링된
mongod인스턴스를 config 서버(SCCC)로 사용하는 작업은 더 이상 지원되지 않습니다.복제본 세트 구성 서버(CSRS)는 WiredTiger 스토리지 엔진을 실행해야 합니다.
The
--configsvroption creates a local oplog.Do not use the
--configsvroption with--shardsvr. Config servers cannot be a shard server.Do not use the
--configsvrwith theskipShardingConfigurationChecksparameter. That is, if you are temporarily starting themongodas a standalone for maintenance operations, include the parameterskipShardingConfigurationChecksand exclude--configsvr. Once maintenance has completed, remove theskipShardingConfigurationChecksparameter and restart with--configsvr.
--shardsvr샤드 서버를 시작하는 경우 필수입니다.
이
mongod인스턴스를 샤딩된 클러스터의 샤드로 구성하세요. 이러한 인스턴스의 기본 포트는27018입니다.중요
When starting a MongoDB server with
--shardsvr, you must also specify a--replSet.Do not use the
--shardsvrwith theskipShardingConfigurationChecksparameter. That is, if you are temporarily starting themongodas a standalone for maintenance operations, include the parameterskipShardingConfigurationChecksand exclude--shardsvr. Once maintenance has completed, remove theskipShardingConfigurationChecksparameter and restart with--shardsvr.
TLS 옵션
팁
MongoDB의 지원에 대한 전체 문서는 TLS/SSL 암호화를 위한 MongoDB 인스턴스 구성 을 참조하세요.
--tlsMode <mode>Enables TLS used for all network connections. The argument to the
--tlsModeoption can be one of the following:값설명disabled서버가 TLS를 사용하지 않습니다.
allowTLS서버 간 연결이 TLS를 사용하지 않습니다. 수신 연결의 경우, 서버는 TLS와 비TLS를 모두 허용합니다.
preferTLS서버 간 연결이 TLS를 사용합니다. 수신 연결의 경우, 서버는 TLS와 비TLS를 모두 허용합니다.
requireTLS서버가 TLS로 암호화된 연결만 사용하고 허용합니다.
--tlsCAFile또는tls.CAFile이 지정되지 않았고 X.509 인증을 사용하지 않는 경우tlsUseSystemCA매개변수를true로 설정해야 합니다. 이를 통해 MongoDB는 TLS 지원 서버에 연결할 때 시스템 전체 CA 인증서 저장소를 사용합니다.If using X.509 authentication,
--tlsCAFileortls.CAFilemust be specified unless using--tlsCertificateSelector.TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
--tlsCertificateKeyFile <filename>TLS 인증서와 키가 모두 포함되어 있는
.pem파일을 지정합니다.On macOS or Windows, you can use the
--tlsCertificateSelectoroption to specify a certificate from the operating system's secure certificate store instead of a PEM key file.--tlsCertificateKeyFileand--tlsCertificateSelectoroptions are mutually exclusive. You can only specify one.On Linux/BSD, you must specify
--tlsCertificateKeyFilewhen TLS/SSL is enabled.On Windows or macOS, you must specify either
--tlsCertificateKeyFileor--tlsCertificateSelectorwhen TLS/SSL is enabled.중요
For Windows only, MongoDB does not support encrypted PEM files. The
mongodfails to start if it encounters an encrypted PEM file. To securely store and access a certificate for use with TLS on Windows, use--tlsCertificateSelector.
TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
--tlsCertificateKeyFilePassword <value>Specifies the password to decrypt the certificate-key file (i.e.
--tlsCertificateKeyFile). Use the--tlsCertificateKeyFilePasswordoption only if the certificate-key file is encrypted. In all cases, themongodredacts the password from all logging and reporting output.On Linux/BSD, if the private key in the PEM file is encrypted and you do not specify the
--tlsCertificateKeyFilePasswordoption, MongoDB prompts for a passphrase. See TLS/SSL Certificate Passphrase.On macOS, if the private key in the PEM file is encrypted, you must explicitly specify the
--tlsCertificateKeyFilePasswordoption. Alternatively, you can use a certificate from the secure system store (see--tlsCertificateSelector) instead of a PEM file or use an unencrypted PEM file.On Windows, MongoDB does not support encrypted certificates. The
mongodfails if it encounters an encrypted PEM file. Use--tlsCertificateSelectorinstead.
TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
--clusterAuthMode <option>기본값: keyFile
클러스터 인증에 사용되는 인증 모드입니다. 내부 X.509 인증을 사용하는 경우 여기에 지정하세요. 이 옵션은 다음 값 중 하나를 가질 수 있습니다.
값설명keyFile인증에 키파일을 사용합니다. 키파일만 허용합니다.
sendKeyFile롤링 업그레이드 목적으로 사용됩니다. 인증 시 키 파일을 전송하지만 키 파일과 X.509 인증서를 모두 수락할 수 있습니다.
sendX509롤링 업그레이드 목적으로 사용됩니다. 인증을 위해 X.509 인증서를 전송하지만 키 파일과 X.509 인증서를 모두 수락할 수 있습니다.
x509권장하는 옵션입니다. 인증을 위해 X.509 인증서를 전송하고 X.509 인증서만 수락합니다.
--tlsCAFile또는tls.CAFile이 지정되지 않았고 X.509 인증을 사용하지 않는 경우tlsUseSystemCA매개변수를true로 설정해야 합니다. 이를 통해 MongoDB는 TLS 지원 서버에 연결할 때 시스템 전체 CA 인증서 저장소를 사용합니다.If using X.509 authentication,
--tlsCAFileortls.CAFilemust be specified unless using--tlsCertificateSelector.TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
--tlsClusterFile <filename>클러스터 또는 복제본 세트의 구성원 인증을 위한 X.509 인증서 키 파일이 들어 있는
.pem파일을 지정합니다.On macOS or Windows, you can use the
--tlsClusterCertificateSelectoroption to specify a certificate from the operating system's secure certificate store instead of a PEM key file.--tlsClusterFileand--tlsClusterCertificateSelectoroptions are mutually exclusive. You can only specify one.If
--tlsClusterFiledoes not specify the.pemfile for internal cluster authentication or the alternative--tlsClusterCertificateSelector, the cluster uses the.pemfile specified in the--tlsCertificateKeyFileoption or the certificate returned by the--tlsCertificateSelector.If using X.509 authentication,
--tlsCAFileortls.CAFilemust be specified unless using--tlsCertificateSelector.mongod/mongoslogs a warning on connection if the presented X.509 certificate expires within30days of themongod/mongoshost system time.TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
중요
For Windows only, MongoDB does not support encrypted PEM files. The
mongodfails to start if it encounters an encrypted PEM file. To securely store and access a certificate for use with membership authentication on Windows, use--tlsClusterCertificateSelector.
--tlsCertificateSelector <parameter>=<value>참고
Available on Windows and macOS as an alternative to
--tlsCertificateKeyFile.TLS에 사용하기 위해 운영 체제의 인증서 저장소에서 일치하는 인증서를 선택할 때 사용할 인증서 속성을 지정합니다.
The
--tlsCertificateKeyFileand--tlsCertificateSelectoroptions are mutually exclusive. You can only specify one.--tlsCertificateSelectoraccepts an argument of the format<property>=<value>where the property can be one of the following:속성값 유형설명subjectASCII 문자열
인증서의 주체 이름 또는 일반 이름
thumbprint16진수 문자열
16진수로 표현되는 일련의 바이트로, SHA-1 다이제스트로 공개 키를 식별하는 데 사용됩니다.
thumbprint을(를)fingerprint(이)라고 부르기도 합니다.시스템 SSL 인증서 저장소를 사용할 때 온라인 인증서 상태 프로토콜(OCSP)을 사용해 인증서의 해지 상태를 확인할 수 있습니다.
The
mongodsearches the operating system's secure certificate store for the CA certificates required to validate the full certificate chain of the specified TLS certificate. Specifically, the secure certificate store must contain the root CA and any intermediate CA certificates required to build the full certificate chain to the TLS certificate. Do not use--tlsCAFileor--tlsClusterCAFileto specify the root and intermediate CA certificate예를 들어, TLS/SSL 인증서가 단일 루트 CA 인증서로 서명된 경우, 보안 인증서 저장소에 해당 루트 CA 인증서가 포함되어 있어야 합니다. TLS/SSL 인증서가 중간 CA 인증서로 서명된 경우, 보안 인증서 저장소에는 중간 CA 인증서 및 루트 CA 인증서가 포함되어 있어야 합니다.
참고
You cannot use the
rotateCertificatescommand or thedb.rotateCertificates()shell method when usingnet.tls.certificateSelectoror--tlsCertificateSelectorset tothumbprint
--tlsClusterCertificateSelector <parameter>=<value>참고
Available on Windows and macOS as an alternative to
--tlsClusterFile.운영 체제의 인증서 저장소에서 내부 x.509 구성원 자격 인증을 위한 매칭되는 인증서를 선택할 때 인증서 속성을 지정합니다.
--tlsClusterFileand--tlsClusterCertificateSelectoroptions are mutually exclusive. You can only specify one.--tlsClusterCertificateSelectoraccepts an argument of the format<property>=<value>where the property can be one of the following:속성값 유형설명subjectASCII 문자열
인증서의 주체 이름 또는 일반 이름
thumbprint16진수 문자열
16진수로 표현되는 일련의 바이트로, SHA-1 다이제스트로 공개 키를 식별하는 데 사용됩니다.
thumbprint을(를)fingerprint(이)라고 부르기도 합니다.The
mongodsearches the operating system's secure certificate store for the CA certificates required to validate the full certificate chain of the specified cluster certificate. Specifically, the secure certificate store must contain the root CA and any intermediate CA certificates required to build the full certificate chain to the cluster certificate. Do not use--tlsCAFileor--tlsClusterCAFileto specify the root and intermediate CA certificate.예를 들어, 클러스터 인증서가 단일 루트 CA 인증서로 서명된 경우, 보안 인증서 저장소에 해당 루트 CA 인증서가 포함되어 있어야 합니다. 클러스터 인증서가 중간 CA 인증서로 서명된 경우, 보안 인증서 저장소에는 중간 CA 인증서 및 루트 CA 인증서가 포함되어 있어야 합니다.
mongod/mongoslogs a warning on connection if the presented X.509 certificate expires within30days of themongod/mongoshost system time.
--tlsClusterPassword <value>Specifies the password to decrypt the X.509 certificate-key file specified with
--tlsClusterFile. Use the--tlsClusterPasswordoption only if the certificate-key file is encrypted. In all cases, themongodredacts the password from all logging and reporting output.On Linux/BSD, if the private key in the X.509 file is encrypted and you do not specify the
--tlsClusterPasswordoption, MongoDB prompts for a passphrase. See TLS/SSL Certificate Passphrase.On macOS, if the private key in the X.509 file is encrypted, you must explicitly specify the
--tlsClusterPasswordoption. Alternatively, you can either use a certificate from the secure system store (see--tlsClusterCertificateSelector) instead of a cluster PEM file or use an unencrypted PEM file.On Windows, MongoDB does not support encrypted certificates. The
mongodfails if it encounters an encrypted PEM file. Use--tlsClusterCertificateSelectorinstead.
TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
--tlsCAFile <filename>인증 기관의 루트 인증서 체인이 포함된
.pem파일을 지정합니다. 상대 경로 또는 절대 경로를 사용하여.pem파일의 이름을 지정합니다.중요
When starting a
mongodinstance with TLS/SSL enabled, you must specify a value for the--tlsCAFileflag, thenet.tls.CAFileconfiguration option, or thetlsUseSystemCAparameter.--tlsCAFile,tls.CAFile,tlsUseSystemCA는 모두 상호 배타적입니다.- Windows/macOS 전용
- If using
--tlsCertificateSelectorand/or--tlsClusterCertificateSelector, do not use--tlsCAFileto specify the root and intermediate CA certificates. Store all CA certificates required to validate the full trust chain of the--tlsCertificateSelectorand/or--tlsClusterCertificateSelectorcertificates in the secure certificate store.
TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
--tlsClusterCAFile <filename>Specifies the
.pemfile that contains the root certificate chain from the Certificate Authority used to validate the certificate presented by a client establishing a connection. Specify the file name of the.pemfile using relative or absolute paths.--tlsClusterCAFilerequires that--tlsCAFileis set.If
--tlsClusterCAFiledoes not specify the.pemfile for validating the certificate from a client establishing a connection, the cluster uses the.pemfile specified in the--tlsCAFileoption.--tlsClusterCAFile은 TLS 핸드셰이크의 클라이언트와 서버 간, 서버와 클라이언트 간 인증에 별도의 인증 기관을 사용할 수 있도록 허용합니다.- Windows/macOS 전용
- If using
--tlsCertificateSelectorand/or--tlsClusterCertificateSelector, do not use--tlsClusterCAFileto specify the root and intermediate CA certificates. Store all CA certificates required to validate the full trust chain of the--tlsCertificateSelectorand/or--tlsClusterCertificateSelectorcertificates in the secure certificate store.
TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
--tlsCRLFile <filename>인증서 해지 목록이 포함된
.pem파일을 지정합니다. 상대 경로 또는 절대 경로를.pem파일의 이름을 지정합니다.참고
You cannot specify a CRL file on macOS. Instead, you can use the system SSL certificate store, which uses OCSP (Online Certificate Status Protocol) to validate the revocation status of certificates. See
--tlsCertificateSelectorto use the system SSL certificate store.인증서 취소를 확인하기 위해 MongoDB는 CRL 파일을 지정하거나 시스템 SSL 인증서 저장소를 사용
enables대신 기본적으로 OCSP(온라인 인증서 상태 프로토콜)를 사용합니다.
TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
--tlsAllowInvalidCertificates클러스터 내 다른 서버에서 TLS 인증서에 대한 유효성 검사를 우회하고 유효하지 않은 인증서를 연결에 사용할 수 있도록 허용합니다.
참고
X.509 인증을 사용할 때
--tlsAllowInvalidCertificates또는tls.allowInvalidCertificates: true를 지정하는 경우 유효하지 않은 인증서는 TLS 연결을 설정하기에는 충분하지만 인증에는 불충분합니다.When using the
--tlsAllowInvalidCertificatessetting, MongoDB logs a warning regarding the use of the invalid certificate.TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
--tlsAllowInvalidHostnames프로세스 간 인증을 위해 복제본 세트 또는 샤딩된 클러스터의 다른 구성원에 연결할 때 TLS 인증서의 호스트 이름 유효성 검사를 비활성화합니다. 이렇게 하면 인증서의 호스트 이름이 구성된 호스트 이름과 일치하지 않을 때
mongod가 다른 구성원을 연결할 수 있습니다.TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
--tlsAllowConnectionsWithoutCertificates서버가 CA 파일을 사용하도록 구성되어 있는 경우를 제외하고 서버는 클라이언트 인증서 검증을 우회하도록 기본 설정되어 있습니다. CA 파일이 제공된 경우 다음 규칙이 적용됩니다.
For clients that present a certificate,
mongodperforms certificate validation using the root certificate chain specified by--tlsCAFileand reject clients with invalid certificates.
Use the
--tlsAllowConnectionsWithoutCertificatesoption if you have a mixed deployment that includes clients that do not or cannot present certificates to themongod.TLS 및 MongoDB에 대한 자세한 내용은 TLS/SSL 암호화를 위해 MongoDB 인스턴스 구성 및 TLS 활성화 복제본 세트에 연결을 참조하세요.
--tlsDisabledProtocols <protocol(s)>TLS로 실행 중인 MongoDB 서버가 1개 또는 그 이상의 특정 프로토콜을 사용하는 수신 연결을 허용하지 않도록 방지합니다. 여러 프로토콜을 지정하려면 쉼표로 구분된 프로토콜 목록을 사용합니다.
--tlsDisabledProtocolsrecognizes the following protocols:TLS1_0,TLS1_1,TLS1_2, andTLS1_3.macOS에서는
TLS1_1을(를) 비활성화하고TLS1_0및TLS1_2을(를) 전부 활성화된 상태로 둘 수 없습니다.TLS1_0,TLS1_1와(과) 같이 다른 2개의 프로토콜 중 적어도 하나를 비활성화해야 합니다.여러 프로토콜을 나열하려면 쉼표로 구분된 프로토콜 목록으로 지정합니다( 예시:
TLS1_0,TLS1_1).인식할 수 없는 프로토콜을 지정하면 서버가 시작되지 않습니다.
지정된 비활성화 프로토콜은 기본으로 설정된 비활성화 프로토콜을 덮어씁니다.
MongoDB disables the use of TLS 1.0 if TLS 1.1+ is available on the system. To enable the disabled TLS 1.0, specify
noneto--tlsDisabledProtocols.복제본 세트와 샤딩된 클러스터의 구성원은 적어 하나의 공통된 프로토콜을 사용해야 합니다.
--tlsFIPSModeDirects the
mongodto use the FIPS mode of the TLS library. Your system must have a FIPS compliant library to use the--tlsFIPSModeoption.Starting in MongoDB 8.3, you cannot specify
SCRAM-SHA-1forauthenticationMechanismswhile also specifyingmongod --tlsFIPSModeormongos --tlsFIPSMode.authenticationMechanisms에SCRAM-SHA-1를 지정하면서--tlsFIPSMode도 지정하려고 하면 서버 오류가 발생하고 다음과 유사한 메시지가 기록됩니다.SCRAM-SHA-1 is not allowed in FIPS mode. 참고
FIPS와 호환되는 TLS/SSL은 MongoDB Enterprise에서만 사용할 수 있습니다. 자세한 내용은 FIPS용 MongoDB 구성을 참조하세요.
프로파일러 옵션
--profile <level>기본값: 0
데이터베이스 프로파일러 수준을 구성합니다. 사용할 수 있는 프로파일러 수준은 다음과 같습니다.
0- 프로파일러가 꺼져 있고 데이터를 수집하지 않습니다. 이것이 기본 설정된 프로파일러 수준입니다.
1프로파일러는
slowms임계값을 초과하거나 지정된 필터하다 와 일치하는 작업에 대한 데이터를 수집합니다.필터가 설정된 경우:
slowms,sampleRate옵션은 프로파일링에 사용되지 않습니다.프로파일러는 필터일치하는 작업만 캡처합니다.
2프로파일러가 모든 작업의 데이터를 수집합니다.
2수준으로 설정하다 하면 프로파일러가slowms및filter에 대해 사용자가 제공한 값을 무시합니다.
경고
프로파일링은 성능을 저하시키고 시스템 로그에서 암호화되지 않은 쿼리 데이터를 노출시킬 수 있습니다. 프로덕션 배포서버에서 프로파일러를 구성하고 활성화하기 전에 이것이 성능과 보안에 미치는 영향을 신중하게 고려하세요.
잠재적인 성능 저하에 대한 자세한 내용은 프로파일러 오버헤드를 참조하십시오.
--slowms <integer>기본값: 100
느린 작동 시간 임계값(밀리초 단위)입니다. 이 임계값보다 오래 실행되는 작업은 느린 것으로 간주됩니다.
느린 작업은 MongoDB가 해당 작업에 소요하는 시간인
workingMillis를 기준으로 기록됩니다. 즉 잠금 대기 및 흐름 제어와 같은 요소는 작업이 느린 작업 임계값을 초과하는지 여부에 영향을 미치지 않습니다.logLevel을0으로 설정하면, MongoDB는slowOpSampleRate에 의해 결정되는 속도로 느린 작업을 진단 로그에 기록합니다.logLevel설정이 높을수록 노드의 지연 시간에 관계없이 모든 작업이 진단 로그에 표시됩니다. 단, 세컨더리의 느린 oplog 항목 메시지 로그 기록은 예외입니다. 세컨더리는 느린 oplog 항목만 로그하며logLevel을 늘린다고 해서 모든 oplog 항목이 로그되지는 않습니다.For
mongodinstances,--slowmsaffects the diagnostic log and, if enabled, the profiler.
--defaultSlowInProgMS <integer>기본값: 5000
진행 중인 쿼리 의 느린 operation time 임계값(단위: 밀리초)입니다. MongoDB 이 임계값보다 오래 실행 작업을 느린 진행 중인 쿼리로 기록합니다. MongoDB 쿼리 작업이 시간 임계값을 초과하는 즉시 쿼리 느린 진행 중인 쿼리 로 기록합니다.
--slowOpSampleRate <double>기본값: 1.0
The fraction of slow operations that should be profiled or logged.
--slowOpSampleRateaccepts values between 0 and 1, inclusive.--slowOpSampleRatedoes not affect the slow oplog entry logging by the secondary members of a replica set. Secondary members log all oplog entries that take longer than the slow operation threshold regardless of the--slowOpSampleRate.For
mongodinstances,--slowOpSampleRateaffects the diagnostic log and, if enabled, the profiler.
감사 옵션
--auditCompressionMode버전 5.3에 추가 되었습니다.
Specifies the compression mode for audit log encryption. You must also enable audit log encryption using either
--auditEncryptionKeyUIDor--auditLocalKeyFile.이 옵션을 다음 값 중 하나로 설정할 수 있습니다.
값설명zstdzstd 알고리즘을 사용하여 감사 로그를 압축합니다.
none(기본값)감사 로그를 압축하지 마세요.
참고
MongoDB Enterprise에서만 사용할 수 있습니다. MongoDB Enterprise와 Atlas의 구성 요구 사항은 서로 다릅니다.
--auditDestination감사를 활성화하고
mongod이(가) 감사 이벤트를 보내는 위치를 지정합니다.--auditDestination다음 값 중 하나를 가질 수 있습니다.값설명syslog시스템 로그에 감사 이벤트를 JSON 형식으로 출력합니다. Windows에서는 사용할 수 없습니다. 감사 메시지의 시스템 로그 심각도 수준은
info이고, 시설 수준은user입니다.시스템 로그 메시지 제한으로 인해 감사 메시지가 잘릴 수 있습니다. 감사 시스템은 잘림을 감지하지 못하며, 잘림이 발생함으로 인한 오류도 감지하지 못합니다.
consolestdout에 감사 이벤트를 JSON 형식으로 출력합니다.fileOutput the audit events to the file specified in
--auditPathin the format specified in--auditFormat.참고
MongoDB Enterprise 및 MongoDB Atlas에서만 사용할 수 있습니다.
--auditEncryptionKeyUID버전 6.0에 추가 되었습니다.
감사 로그 암호화를 위한 Key Management Interoperability Protocol(KMIP) 키의 고유 식별자를 지정합니다.
You cannot use this option and
--auditLocalKeyFiletogether.참고
MongoDB Enterprise에서만 사용할 수 있습니다. MongoDB Enterprise와 Atlas의 구성 요구 사항은 서로 다릅니다.
--auditFormatSpecifies the format of the output file for auditing if
--auditDestinationisfile. The--auditFormatoption can have one of the following values:값설명JSONOutput the audit events in JSON format to the file specified in
--auditPath.BSONOutput the audit events in BSON binary format to the file specified in
--auditPath.감사 이벤트를 JSON 형식으로 파일에 출력하면 BSON 형식으로 파일에 출력하는 것보다 서버 성능이 더 저하됩니다.
참고
MongoDB Enterprise 및 MongoDB Atlas에서만 사용할 수 있습니다.
--auditLocalKeyFile버전 5.3에 추가 되었습니다.
감사 로그 암호화를 위한 로컬 감사 키 파일의 경로와 파일 이름을 지정합니다.
참고
Only use this option for testing because the key is not secured. To secure the key, use
--auditEncryptionKeyUIDand an external Key Management Interoperability Protocol (KMIP) server.두 옵션을 함께 사용할 수 없습니다.
참고
MongoDB Enterprise에서만 사용할 수 있습니다. MongoDB Enterprise와 Atlas의 구성 요구 사항은 서로 다릅니다.
--auditPathSpecifies the output file for auditing if
--auditDestinationhas value offile. The--auditPathoption can take either a full path name or a relative path name.참고
MongoDB Enterprise 및 MongoDB Atlas에서만 사용할 수 있습니다.
--auditFilter감사 시스템에서 기록하는 작업 유형을 제한하는 필터를 지정합니다. 이 옵션은 다음과 같은 형식으로 쿼리 문서에 대한 문자열을 표현합니다.
{ <field1>: <expression1>, ... } <field>은(는) param 문서에서 반환된 필드를 포함해 감사 메시지에 있는 그 어떤 필드도 될 수 있습니다.<expression>은(는) 쿼리 조건 표현식입니다.감사 필터를 지정하려면 필터 문서를 작은따옴표 안에 입력하고 문서를 문자열로 전달합니다.
구성 파일에서 감사 필터를 지정하려면 구성 파일의 YAML 형식을 사용해야 합니다.
참고
MongoDB Enterprise 및 MongoDB Atlas에서만 사용할 수 있습니다.
--auditSchema기본값:
mongo버전 8.0에 추가 되었습니다.
감사 로그에 사용되는 형식을 지정합니다.
--auditSchema에 대해 다음 값 중 하나를 지정할 수 있습니다.값설명mongo로그는 MongoDB에서 설계한 형식으로 작성됩니다.
예시 로그 메시지에 대해서는 mongo 스키마 감사 메시지를 참조하세요.
OCSF로그는 OCSF 형식으로 작성됩니다. 이 옵션은 로그 프로세서와 호환되는 표준화된 형식의 로그를 제공합니다.
예시 로그 메시지는 OCSF 스키마 감사 메시지를 참조하세요.
인메모리 옵션
--inMemorySizeGB <float>기본값: 물리적 RAM에서 1GB를 뺀 값의 50%
인덱스, oplog(
mongod가 복제본 세트의 일부인 경우), 샤딩된 클러스터 데이터를 비롯해 인메모리 스토리지 엔진 데이터에 할당할 메모리의 최대량입니다.값의 범위는 256MB에서 10TB까지이며, 부동 소수점도 가능합니다.
인메모리 스토리지 엔진은 물리적 RAM에서 1GB를 뺀 값의 50%를 사용하도록 기본 설정되어 있습니다.
참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
암호화 키 관리 옵션
--enableEncryption기본값: false
WiredTiger 스토리지 엔진의 암호화를 활성화합니다. 암호화 키와 구성을 전달하려면 반드시 이 옵션을 활성화해야 합니다.
참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--encryptionCipherMode <string>기본값: AES256-CBC
미사용 데이터 암호화에 사용할 수 있는 암호화 모드는 다음과 같습니다.
모드설명AES256-CBCCipher Block Chaining 모드에서 256비트 고급 암호화 표준
AES256-GCMGalois/Counter 모드에서 256비트 고급 암호화 표준
Linux에서만 사용할 수 있습니다.
Windows의 MongoDB Enterprise는 더 이상 저장된 암호화를 위한 블록 암호로
AES256-GCM을(를) 지원하지 않습니다. 이 사용 방식은 Linux에서만 지원됩니다.참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--encryptionKeyFile <string>KMIP 이외의 프로세스를 통해 키를 관리하는 경우 로컬 키 파일의 경로입니다. KMIP 이외의 프로세스를 통해 키를 관리하는 경우에만 설정합니다. 이미 KMIP를 사용해 데이터가 암호화된 경우, MongoDB에서 오류가 발생합니다.
키파일에는 하나의 키만 포함할 수 있습니다. 키는 16자 또는 32자 문자열입니다.
Requires
--enableEncryption.참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--kmipKeyIdentifier <string>Unique KMIP identifier for an existing key within the KMIP server. Include to use the key associated with the identifier as the system key. You can only use the setting the first time you enable encryption for the
mongodinstance. Requires--enableEncryption.지정되지 않았을 경우 MongoDB는 KMIP 서버에 시스템 키로 사용할 새로운 키를 생성하도록 요청합니다.
KMIP 서버가 지정된 식별자의 키를 찾을 수 없거나, 데이터가 이미 키로 암호화되어 있을 경우 MongoDB는 오류를 반환합니다.
참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--kmipRotateMasterKey <boolean>기본값: false
참인 경우, 마스터키를 순환시키고 내부 키 저장소를 다시 암호화합니다.
참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--kmipServerName <string>Hostname or IP address of the KMIP server to connect to. Requires
--enableEncryption.여러 KMIP 서버를 쉼표로 구분된 목록으로 지정할 수 있습니다(예:
server1.example.com,server2.example.com). 스타트업 시mongod는 나열된 순서대로 각 서버에 연결 설정을 시도하고, 연결을 성공적으로 설정할 수 있는 첫 번째 서버를 선택합니다. KMIP 서버 선택은 스타트업 시에만 발생합니다.When connecting to a KMIP server, the
mongodverifies that the specified--kmipServerNamematches the Subject Alternative NameSAN(or, ifSANis not present, the Common NameCN) in the certificate presented by the KMIP server. IfSANis present,mongoddoes not match against theCN. If the hostname does not match theSAN(orCN), themongodfails to connect.MongoDB 4.2부터는 SAN 비교를 수행할 때 MongoDB에서 DNS 이름 또는 IP 주소 비교가 지원됩니다. 이전 버전에서는 MongoDB에서 DNS 이름 비교만 지원됐습니다.
참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--kmipPort <number>기본값: 5696
Port number to use to communicate with the KMIP server. Requires
--kmipServerName. Requires--enableEncryption.If specifying multiple KMIP servers with
--kmipServerName, themongoduses the port specified with--kmipPortfor all provided KMIP servers.참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--kmipConnectRetries <number>기본값: 0
How many times to retry the initial connection to the KMIP server. Use together with
--kmipConnectTimeoutMSto control how long themongodwaits for a response between each retry.참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--kmipConnectTimeoutMS <number>기본값: 5000
Timeout in milliseconds to wait for a response from the KMIP server. If the
--kmipConnectRetriessetting is specified, themongodwaits for the specified interval between retries.값은
1000이상이어야 합니다.참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--kmipClientCertificateSelector <string>버전 5.0의 새로운 기능:
Available on Windows and macOS as an alternative to
--kmipClientCertificateFile.--kmipClientCertificateFileand--kmipClientCertificateSelectoroptions are mutually exclusive. You can only specify one.운영 체제의 인증서 저장소에서 일치하는 인증서를 선택해 MongoDB를 KMIP 서버에 인증할 때 사용할 인증서 속성을 지정합니다.
--kmipClientCertificateSelectoraccepts an argument of the format<property>=<value>where the property can be one of the following:속성값 유형설명subjectASCII 문자열
인증서의 주체 이름 또는 일반 이름
thumbprint16진수 문자열
16진수로 표현되는 일련의 바이트로, SHA-1 다이제스트로 공개 키를 식별하는 데 사용됩니다.
thumbprint을(를)fingerprint(이)라고 부르기도 합니다.참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--kmipClientCertificateFile <string>KMIP 서버에 MongoDB를 인증하는 데 사용되는
.pem파일의 경로입니다. 표시된.pem파일에는 TLS/SSL 인증서와 키가 모두 포함되어 있어야 합니다.To use this option, you must also specify the
--kmipServerNameoption.중요
--kmipClientCertificateFile를 사용하고 KMIP 서버가 TLS 1.2 을(를) 시행하는 경우 Windows에서 KMIP 서버를 사용한 암호화 활성화가 실패합니다.Windows에서 KMIP를 사용한 미사용 데이터 암호화를 활성화하려면 다음을 수행해야 합니다.
클라이언트 인증서를 Windows 인증서 저장소로 가져옵니다.
Use the
--kmipClientCertificateSelectorconfiguration option.
참고
On macOS or Windows, you can use a certificate from the operating system's secure store instead of a PEM key file. See
--kmipClientCertificateSelector.참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--kmipClientCertificatePassword <string>The password to decrypt the Private Key of the Client Certificate that connects to the KMIP server. This option authenticates MongoDB to the KMIP server and requires that you provide a
--kmipClientCertificateFile.참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.
--kmipServerCAFile <string>CA 파일의 경로입니다. KMIP 서버에 대한 보안 클라이언트의 연결 유효성을 검사하는 데 사용됩니다.
참고
On macOS or Windows, you can use a certificate from the operating system's secure store instead of a PEM key file. See
--kmipClientCertificateSelector. When using the secure store, you do not need to, but can, also specify the--kmipServerCAFile.
--kmipActivateKeys <boolean>기본값: true
버전 5.3에 추가 되었습니다.
키가 생성될 때마다 새로 생성된 모든 KMIP 키를 활성화하고, 이러한 키가 활성 상태에 있는지 주기적으로 확인합니다.
When
--kmipActivateKeysistrueand you have existing keys on a KMIP server, the key must be activated first or themongodnode fails to start.If the key being used by the mongod transitions into a non-active state, the
mongodnode shuts down unlesskmipActivateKeysis false. To ensure you have an active key, rotate the KMIP master key by using--kmipRotateMasterKey.
--kmipKeyStatePollingSeconds <integer>기본값: 900초
버전 5.3에 추가 되었습니다.
mongod이(가) 활성 키를 위해 KMIP 서버를 폴링하는 빈도(초)입니다.폴링 비활성화를 비활성화하려면 값을
-1~로 설정합니다.
--kmipUseLegacyProtocol <boolean>기본값: false
버전 7.0의 새로운 기능: (및 6.0.6)
true일 때mongod은(는) 기본 버전 대신 KMIP 프로토콜 버전인 1.0 또는 1.1을 사용합니다. 기본 KMIP 프로토콜은 버전 1.2입니다.KMIP 버전 1.0 또는 1.1에서 감사 로그 암호화를 사용하려면 스타트업 시
auditEncryptKeyWithKMIPGet을(를) 지정해야 합니다.
--eseDatabaseKeyRolloverAES256-GCM암호로 구성된 암호화된 스토리지 엔진 데이터베이스 키를 롤오버합니다.이 옵션으로
mongod인스턴스가 시작되면 인스턴스가 키를 순환한 후 종료됩니다.참고
엔터프라이즈 기능
MongoDB Enterprise에서만 사용할 수 있습니다.