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

Install or Uninstall mongot on Linux

You can install the MongoDB Search and MongoDB Vector Search process, mongot, in MongoDB Community Edition. The mongot process is available for deployment for all Linux distributions such as Red Hat, Ubuntu, Debian, SUSE, and Amazon Linux as a tarball with the .tgz extension.

참고

To onboard quickly with a deployment for experimentation, see the following tutorials for Self-Managed deployments:

To install mongot in a self-managed deployment, you must have the following prerequisites:

  • MongoDB Community Edition v8.2 or later.

    설치 튜토리얼은 MongoDB Community Edition 설치 를 참조하세요.

    참고

    You must have a minimum of MongoDB 8.2.0 to run MongoDB Search and MongoDB Vector Search process with a self-managed deployment. For more information, see Compatibility and Requirements for mongot.

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

1

다음 링크를 클릭하여 커뮤니티 tarball에서 검색을 다운로드 .

ARM 아키텍처의 경우 ARM 호환 tarball을 사용합니다.

AMD x86_64 아키텍처의 경우 AMD x86-64-호환 tarball을 사용합니다.

2

See Verify Integrity of mongot Packages for more information.

3

다음 명령을 실행하여 tarball을 추출합니다.

tar -zxvf mongot_community_0.53.0_linux_aarch64.tgz
tar -zxvf mongot_community_0.53.0_linux_x86_64.tgz

참고

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

The tarball contains a sample configuration file, the mongot launcher script, and MongoDB Search and Vector Search license information.

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.

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 역할 가진 사용자를 만들려면 다음을 수행합니다.

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

    • <your-mongot-password> 을(를) passwordFile에 지정한 비밀번호로 바꿉니다.

    • 명령 실행

    db.createUser(
    {
    user: <mongot_username>,
    pwd: <mongot_password>,
    roles: [ "searchCoordinator"]
    }
    )
6

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

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

echo -n "mongotPassword" > 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.

The tarball contains the following sample configuration file, config.default.yml, with the default mongot settings. You can modify the settings for your deployment:

경고

Depending on your system topology, it may be necessary to bind the mongot query server to an interface reachable from your MongoDB Cluster. While binding to the 0.0.0.0 IP address is permitted, it exposes the server to all public networks and carries the risk of unauthorized access.

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

syncSource:
replicaSet:
hostAndPort: "localhost:27017" # Replace with the mongod host and port.
username: mongotUser # Replace with mongod username enabled with "searchCoordinator" role.
passwordFile: "/etc/mongot/secrets/passwordFile" # Replace with path to password file for the above user.
tls: 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

참고

The dataPath directory in your configuration file must be writable by the user that runs 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

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

  • SERVING, if the mongot process is running

    mongot might not serve queries as it doesn't check the status of the indexes, which must be in Ready state to serve queries.

  • NOT_SERVING, if the mongot process isn't running

To remove MongoDB Search and MongoDB Vector Search from a system, you must remove mongot, the configuration files, and any directories containing data and logs. The following section guides you through the necessary steps.

1

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

use admin
db.dropUser("mongotUser")

For details, see db.dropUser().

2

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

3

To remove the mongot and mongod configuration files, run the following commands as root or with sudo by using the full path to your configuration files:

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

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

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

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

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

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

rm /path/to/mongot/data