Installing AIDB
===============

AIDBは、スタンドアロンのPostgreSQL拡張機能です。AI FactoryまたはHybrid
Managerに依存せず、Postgresインスタンスに直接インストールされます。以下の手順では、スタンドアロンパッケージとしてインストールする手順を説明します。

!!!note AI
Factoryを介して展開する場合、AIDBはそのセットアップの一部としてバンドルおよび構成されます。代わりにAI
Factoryインストールガイドを参照してください。

AIDBは、使用しているPostgresディストリビューションと同じプラットフォームでサポートされています。詳細については、以下を参照してください。

- `PostgreSQL product compatibility <https://www.enterprisedb.com/resources/platform-compatibility#pg>`_ 

- `EDB Postgres Advanced Server product compatibility <https://www.enterprisedb.com/platform-compatibility#epas>`_ 

- `EDB Postgres Extended Server product compatibility <https://www.enterprisedb.com/resources/platform-compatibility#epas_extended>`_ 

前提条件
--------

インストールプロセスを開始する前に

1. リポジトリのセットアップ
   リポジトリのセットアップは1回限りのタスクです。すでにリポジトリを設定している場合、この手順を実行する必要はありません。リポジトリを設定するには、
   `EDB repositories <https://www.enterprisedb.com/repos-downloads>`_ に移動し、そこに提供されている指示に従ってください。

2. Postgresのフレーバーがまだインストールされていない場合は、インストールします。

   - :ref:`Installing PostgreSQL <Installing AIDB>` 

   - `Installing EDB Postgres Advanced Server <https://www.enterprisedb.com/docs/epas/latest/installing/>`_ 

   - `Installing EDB Postgres Extended Server <https://www.enterprisedb.com/docs/pge/latest/installing/>`_ 

3. pgvector拡張機能をインストールします。

AIDBは、ベクターデータ管理にpgvector拡張機能に依存しています。

インストール手順については、 :ref:`Installing pgvector <Installing AIDB>` を参照してください。

1. VectorChordをインストールしますオプショナル
   高性能、低レイテンシーのベクトル取得。
   :ref:`Installing VectorChord <Installing AIDB>` を参照してください。

2. VectorChord-BM25インストールオプションオプション。ハイブリッドキーワード+セマンティック検索が必要な場合にのみ必要です。
   :ref:`Installing VectorChord-BM25 <Installing AIDB>` を参照してください。

パッケージをインストールする
----------------------------

Package installコマンドの構文は次のとおりです。

.. code:: shell


   #  For Debian/Ubuntu:

   sudo apt-get install edb-<postgres><postgres_version>-aidb

   #  For Linux:

   sudo dnf install edb-<postgres><postgres_version>-aidb

どこで

- ``<postgres>`` は、使用しているPostgresのディストリビューションです。

.. csv-table::
  :header: Postgres distribution,Value
  :widths: 10,30
  :align: left
  :class: longtable

  PostgreSQL,pg
  EDB Postgres Advanced Server (EPAS),as
  EDB Postgres Extended,pgextended

- ``<postgres_version>`` は、使用しているPostgresのバージョンです。

たとえば、Debian/UbuntuにEDB Postgres Advanced Server
17のAIDBをインストールするには

.. code:: shell

   sudo apt-get install edb-as17-aidb

例、RHEL8にAIDB for PostgreSQL 16をインストールするには

.. code:: shell

   sudo dnf install edb-pg16-aidb

AIDBパッケージをインストールした後、次の手順については
:ref:`Configuring AIDB <Configuring AIDB>` を参照してください。
