AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

Install or Uninstall mongot on Linux

MongoDB Community Edition에서 MongoDB Search 및 MongoDB 벡터 검색 프로세스인 mongot을(를) 설치할 수 있습니다. mongot 프로세스는 Red Hat, Ubuntu, Debian, SUSE, Amazon Linux와 같은 모든 Linux 배포판에 대해 .tgz 확장자를 가진 tarball 형태로 배포서버를 사용할 수 있습니다.

참고

실험용 배포서버로 더 빠르게 온보딩하려면 자체 관리형 배포서버에 대한 다음 튜토리얼을 참조하세요.

자체 관리형 배포서버에 mongot 을(를) 설치하려면 다음과 같은 전제 조건이 있어야 합니다.

  • MongoDB Community Edition v8.3 이상.

    See Install MongoDB Community Edition for installation tutorials.

    참고

    You must have MongoDB 8.3 or later to run MongoDB Search and MongoDB Vector Search process, whether you use a standalone self-managed deployment or deploy with the MongoDB Controllers for Kubernetes Operator. For more information, see Compatibility and Requirements for mongot.

  • 키 파일 액세스 제어가 포함된 시작된 복제본 세트 .

1

Download the latest Search in Community tarball for your system architecture from the MongoDB Search in Community Download Center.

To download a specific version from the command line, replace {VERSION_NUMBER} with the version of mongot that you want and run the command for your system architecture:

wget https://downloads.mongodb.org/mongodb-search-community/{VERSION_NUMBER}/mongot_community_{VERSION_NUMBER}_linux_aarch64.tgz
wget https://downloads.mongodb.org/mongodb-search-community/{VERSION_NUMBER}/mongot_community_{VERSION_NUMBER}_linux_x86_64.tgz
2

자세한 내용은 mongot 패키지의 무결성 확인 을 참조하세요.

3

Replace {VERSION_NUMBER} with the version of mongot that you downloaded and run the command for your system architecture to extract the tarball:

tar -zxvf mongot_community_{VERSION_NUMBER}_linux_aarch64.tgz
tar -zxvf mongot_community_{VERSION_NUMBER}_linux_x86_64.tgz

참고

웹 브라우저가 다운로드 의 일부로 파일 의 압축을 자동으로 해제하는 경우 파일 확장자는 .tar입니다.

tarball에는 샘플 설정 파일, mongot 런처 스크립트 및 MongoDB Search 및 벡터 검색 라이선스 정보가 포함되어 있습니다.

4

사용하려는 기존 복제본 세트 있는 경우 다음 mongod 매개변수를 구성하여 검색 및 MongoDB Vector Search 쿼리를 라우팅하고 인덱스를 관리 .

Parameter
설명

searchIndexManagementHostAndPort

mongot의 호스팅하다 주소 입니다.

mongotHost

mongot의 호스팅하다 주소 입니다.

searchIndexManagementHostAndPortmongotHost에 동일한 주소 지정해야 합니다.

skipAuthenticationToSearchIndexManagementServer

검색 인덱스 관리 서버에 대해 인증 사용할지 여부를 지정합니다.

useGrpcForSearch

MongoDB Search에 GRPC를 사용할지 여부를 지정합니다.

예시 를 들어 mongod 구성 파일 에 다음 줄을 추가한 다음 mongod를 다시 시작할 수 있습니다.

setParameter:
searchIndexManagementHostAndPort: localhost:27028
mongotHost: localhost:27028
skipAuthenticationToSearchIndexManagementServer: false
useGrpcForSearch: true

See MongoDB Server Parameters for a Self-Managed Deployment for more information on setting mongod parameters. For detailed information about search-specific setParameter options, see MongoDB Search Options.

참고

The mongotHost, searchIndexManagementHostAndPort, and useGrpcForSearch parameters are set only at startup. You can't change them at runtime with setParameter. To point mongod at a different mongot instance, update these parameters in the mongod configuration file and restart mongod.

If you want to deploy a new replica set with keyfile authentication, follow the steps in Deploy Self-Managed Replica Set With Keyfile Authentication.

5

mongot must be able to connect to your MongoDB deployment through a user with the searchCoordinator role.

  1. 관리자로 mongosh 에 연결합니다.

    mongosh --port 27017 -u <your_admin_username> -p <your_admin_password>
  2. admin 데이터베이스에 연결합니다.

    다음 명령을 실행하여 admin 데이터베이스 에 연결합니다.

    use admin
  3. mongot 사용자를 만듭니다.

    searchCoordinator 역할 가진 사용자를 만들려면 다음을 수행합니다.

    • <mongot-username>mongot 사용자의 사용자 이름 으로 바꿉니다.

    • <mongot-password> 를 다음 단계의 passwordFile 에 지정한 비밀번호로 바꾸십시오.

    • 다음 명령을 실행합니다:

    db.createUser(
    {
    user: <mongot-username>,
    pwd: <mongot-password>,
    roles: [ "searchCoordinator"]
    }
    )
6

mongod에 연결할 mongot 의 비밀번호 파일 만듭니다.

예시 들어 운영 체제를 선택하고 <mongot-password> 을(를) 비밀번호로 바꿉니다. 그런 다음, 다음 명령을 실행 passwordFile이라는 파일 만듭니다.

echo -n "<mongot-password>" > passwordFile
chmod 400 passwordFile

참고

-n 플래그는 후행 개행을 방지합니다.

echo|set /p="mongotPassword" > passwordFile
[System.IO.File]::WriteAllText("passwordFile", "mongotPassword")
7

You can configure mongot with a YAML configuration file. Use the included sample configuration file named config.default.yml or a new configuration file to define the configuration. For more information on mongot configuration options, see mongot Options.

tarball에는 기본값 mongot 설정을 가진 다음 샘플 구성 파일 config.default.yml이(가) 포함되어 있습니다. 배포서버 에 대한 설정을 수정할 수 있습니다.

경고

시스템 토폴로지에 따라 mongot 쿼리 서버를 MongoDB 클러스터에서 액세스할 수 있는 인터페이스에 바인딩해야 할 수 있습니다. 0.0.0.0 IP 주소에 바인딩하는 것이 허용되지만 서버가 모든 공용 네트워크에 노출되고 무단 액세스의 위험이 있습니다.

보안을 강화하려면 localhost 또는 기타 신뢰할 수 있는 내부 주소와 같이 네트워크 계층에서 제어되고 보호되는 특정 인터페이스로 server.grpc.address 를 제한하는 것이 좋습니다.

syncSource:
replicaSet:
hostAndPort: "localhost:27017" # Replace with the mongod host and port.
scramAuth:
username: mongotUser # Replace with mongod username enabled with "searchCoordinator" role.
authSource: admin # Replace with the database to authenticate the user against.
passwordFile: "/etc/mongot/secrets/passwordFile" # Replace with path to password file for the above user.
tls:
enabled: false
storage:
dataPath: "/var/lib/mongot" # Replace with the path where you want mongot to store search data.
server:
grpc:
address: "localhost:27028" # Replace with the address and port for mongot listen server
tls:
mode: "disabled"
metrics:
enabled: true
address: "localhost:9946"
healthCheck:
address: "localhost:8080"
logging:
verbosity: INFO

참고

설정 파일의 dataPath 디렉토리는 mongot을 실행하는 사용자가 쓰기 가능해야 합니다.

The sample configuration uses SCRAM authentication with the scramAuth block. You must configure exactly one authentication mechanism for the sync source: either SCRAM or X.509. To authenticate with a TLS client certificate instead of a username and password, use the x509 block. For both mechanisms, including the sharded-cluster syncSource.router configuration, see Configure Authentication and Authorization for mongot.

This sample runs mongot and mongod on the same host, so it binds server.grpc.address to localhost and disables TLS. If you run mongot and mongod on separate hosts, complete the following steps instead:

  • Bind server.grpc.address to a network interface that mongod can reach, rather than localhost.

  • Set the mongod mongotHost and searchIndexManagementHostAndPort parameters to that address.

  • Enable TLS for the sync source and gRPC connections. Running without TLS is only appropriate when mongot and mongod run on the same host. To configure TLS, see Configure TLS Encryption for mongot.

logging.logPath 를 사용하여 mongot 이 쓰는 로그 파일의 경로를 지정합니다. 로그 파일 경로를 지정하지 않으면 mongot 은 표준 출력에 로그를 쓰는다.

8

tarball과 함께 다운로드한 mongot 런처 스크립트 실행합니다. 스크립트 는 mongot-community 폴더에 있습니다.

mongot-community 폴더로 변경합니다.

cd <path-to-mongot>

샘플 구성 파일 로 mongot 를 시작하려면 다음 명령을 실행합니다.

./mongot --config config.default.yml
9

To verify, send a request by using a HTTP client or curl to the /health endpoint. For example, send a curl request similar to the following sample request:

curl localhost:8080/health

엔드포인트는 응답에서 다음 중 하나를 반환합니다.

  • SERVINGmongot 프로세스가 실행 중인 경우

    mongot 인덱스의 상태를 확인하지 않으므로 쿼리를 제공하지 않을 수 있으며, 쿼리를 제공하려면 인덱스는 Ready 상태여야 합니다.

  • NOT_SERVINGmongot 프로세스가 실행 중이 아닌 경우

추가 세부 정보는 mongot 연결 확인을 참조하세요.

시스템에서 MongoDB Search 및 MongoDB 벡터 검색를 제거하려면 mongot, 설정 파일, 데이터 및 로그가 포함된 모든 디렉토리를 제거해야 합니다. 다음 섹션에서는 필요한 단계를 안내합니다.

1

mongotUser 사용자를 삭제하려면 다음 명령을 실행 .

use admin
db.dropUser("mongotUser")

For details, see db.dropUser().

2

mongot 바이너리를 중지하려면 실행 중인 터미널 세션에서 Ctrl + C 를 사용합니다.

3

mongotmongod 설정 파일을 제거하려면 설정 파일의 전체 경로를 사용하여 root 또는 sudo 으로 다음 명령을 실행합니다.

sudo rm /path/to/config.default.yml
sudo rm /path/to/mongod.conf
4

키 파일 및 비밀번호 파일 제거 하려면 키 파일 및 비밀번호 파일 의 전체 경로를 사용하여 다음 명령을 실행 .

rm /path/to/keyfile
rm /path/to/passwordFile
5

mongot에 대한 로그 및 로그 디렉토리를 제거하려면 logging.logPath에 지정한 로그 디렉토리의 전체 경로를 사용하여 다음 명령을 실행합니다.

rm -rf /path/to/mongot-logs
6

mongot 데이터를 저장하는 데이터 디렉토리 제거 하려면 mongot 데이터 디렉토리 의 전체 경로를 사용하여 다음 명령을 실행 .

rm /path/to/mongot/data
이 페이지 평가하기