Auf dieser Seite erfahren Sie, wie Sie AlloyDB Omni herunterladen, installieren und eine Verbindung dazu herstellen. Wenn Sie schnell mit der Standardkonfiguration von AlloyDB Omni beginnen möchten, lesen Sie den Abschnitt AlloyDB Omni unter Debian oder Ubuntu installieren.
In diesem Dokument erfahren Sie außerdem, wie Sie Folgendes tun:
Erstellen Sie eine neue Festplattenpartition, um die Datenspeicherung zu optimieren.
Konfigurieren Sie Ihren Server.
Kompatibilität mit Debian, Ubuntu und RHEL sicherstellen
Verwenden Sie die AlloyDB Omni-Befehlszeile, um zu bestätigen, dass Ihr Linux-Computer für die Installation von AlloyDB Omni bereit ist:
sudoalloydbsystem-check
Passen Sie Ihr System bei Bedarf an, bis die Ausgabe des Befehls system-check einen erfolgreichen Check zurückgibt.
Optional: Wenn Sie eine neue Festplattenpartition für AlloyDB Omni erstellen möchten, die für die Datenspeicherung verwendet werden soll, empfehlen wir die Verwendung eines ext4-Dateisystems für eine optimale Leistung.
Verwenden Sie den folgenden Befehl, um ein ext4-Dateisystem zu erstellen:
mkfs.ext4-m1-F"$disk_path"
Verwenden Sie den folgenden Befehl, um das Laufwerk bereitzustellen:
Ersetzen Sie DATA_DIR durch das Verzeichnis in Ihrem lokalen Dateisystem, in dem AlloyDB Omni seine Daten, Metadaten und Konfigurationsdateien speichern soll. AlloyDB Omni versucht, dieses Verzeichnis zu erstellen, falls es noch nicht vorhanden ist. Wenn Sie diesen Wert nicht angeben, wird für AlloyDB Omni standardmäßig /var/alloydb/main/ verwendet.
Wenn AlloyDB Omni Verbindungen an einem anderen TCP-Port als dem Standardport 5432 überwachen soll, fügen Sie das Flag --pg-port ein:
DATA_DIR: Das Verzeichnis in Ihrem lokalen Dateisystem, in dem AlloyDB Omni seine Daten, Metadaten und Konfigurationsdateien speichern soll. AlloyDB Omni versucht, dieses Verzeichnis zu erstellen, falls es noch nicht vorhanden ist. Wenn Sie diesen Wert nicht angeben, wird für AlloyDB Omni standardmäßig /var/alloydb/main/ verwendet.
SOURCE_IP: Die IP-Adresse der primären AlloyDB Omni-Instanz, von der repliziert werden soll.
SOURCE_PORT: Der TCP-Port der primären AlloyDB Omni-Instanz, von der repliziert werden soll. Wenn Sie diesen Wert nicht angeben, wendet AlloyDB Omni den Standardwert 5432 an.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-17 (UTC)."],[[["\u003cp\u003eThis document guides you through downloading, installing, and connecting to AlloyDB Omni, with a quick start option available for Debian or Ubuntu.\u003c/p\u003e\n"],["\u003cp\u003eAlloyDB Omni supports Debian, Ubuntu, and RHEL operating systems, requiring a minimum of 2 CPUs, 2 GB of RAM, and 20 GB of storage.\u003c/p\u003e\n"],["\u003cp\u003eYou can optimize data storage by creating a new disk partition with an \u003ccode\u003eext4\u003c/code\u003e file system, and configuring the AlloyDB Omni server as either a primary instance or a read replica.\u003c/p\u003e\n"],["\u003cp\u003eThe installation process includes verifying the Linux machine's readiness with the \u003ccode\u003esystem-check\u003c/code\u003e command and installing the server software, with options to specify the data directory and TCP port.\u003c/p\u003e\n"],["\u003cp\u003eConnecting to AlloyDB Omni is done using \u003ccode\u003epsql\u003c/code\u003e after installing the software, allowing for interaction with the database server.\u003c/p\u003e\n"]]],[],null,["# Customize your AlloyDB Omni installation\n\nSelect a documentation version: 15.5.2keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/install)\n- [16.8.0](/alloydb/omni/16.8.0/docs/install)\n- [16.3.0](/alloydb/omni/16.3.0/docs/install)\n- [15.12.0](/alloydb/omni/15.12.0/docs/install)\n- [15.7.1](/alloydb/omni/15.7.1/docs/install)\n- [15.7.0](/alloydb/omni/15.7.0/docs/install)\n- [15.5.5](/alloydb/omni/15.5.5/docs/install)\n- [15.5.4](/alloydb/omni/15.5.4/docs/install)\n- [15.5.2](/alloydb/omni/15.5.2/docs/install)\n\n\u003cbr /\u003e\n\n| **Note:** Your use of AlloyDB Omni is subject to the agreement between you and Google that governs Google Cloud offerings. If you do not have a Google Cloud account, or have not otherwise entered into an agreement with Google that governs Google Cloud offerings, please do not proceed or download this software until you have done so. To create a Google Cloud account, see [the Google Cloud homepage](/docs/get-started).\n\n\u003cbr /\u003e\n\nThis page shows you how to download, install, and connect to\n[AlloyDB Omni](/alloydb/omni/15.5.2/docs). To get started quickly\nwith AlloyDB Omni using the default configuration, see\n[Install AlloyDB Omni on Debian or Ubuntu](/alloydb/omni/15.5.2/docs/quickstart).\n\nIn this document, you also learn how to do the following:\n\n- Create a new disk partition to optimize data storage.\n- Configure your server.\n- Ensure compatibility with Debian, Ubuntu, and RHEL.\n\nBefore you begin\n----------------\n\n#### System requirements\n\n### Debian\n\n- A virtual or physical machine running a Debian-based OS, such as Debian or Ubuntu.\n- A minimum of 2 CPUs, with x86/AMD64 architecture.\n- A minimum of 2 GB of RAM. For optimal performance, we recommend allocating 8 GB of RAM for each CPU.\n- At least 20 GB of available storage.\n- Unrestricted root access within the OS.\n- Docker version 20.10 or higher.\n- Linux kernel version 4.18 or higher. We recommend kernel version 5.3 or higher for best performance.\n- Linux cgroup v2 enabled. By default, cgroup v2 is enabled on most modern Linux systems. To\n check whether cgroup v2 is enabled, run\n `stat -fc %T /sys/fs/cgroup/` in a shell.\n If cgroup v2 is enabled, the command output shows `cgroup2fs`.\n\n- If you want to integrate with Vertex AI, then you need\n the [Google Cloud CLI](/sdk/docs/install) available in your\n environment.\n\n- To install AlloyDB Omni on a cloud platform, we recommend using the following instance types:\n - On Google Cloud, we recommend `n2-highmem` instances.\n - On Amazon Web Services, we recommend `R6i` instances.\n - On Microsoft Azure, we recommend `Ebsv5` instances.\n- We recommend that you use a dedicated SSD storage device for storing your data. If you use a physical device for this purpose, we recommend attaching it directly to the host machine.\n\n### RHEL\n\n- A virtual or physical machine running a Red Hat Enterprise Linux (RHEL) version 8 or later. To let the automatic memory management features of AlloyDB Omni work, use RHEL version 9 or later.\n- A minimum of 2 CPUs, with x86/AMD64 architecture.\n- A minimum of 2 GB of RAM. For optimal performance, we recommend allocating 8 GB of RAM for each CPU.\n- At least 20 GB of available storage.\n- Unrestricted root access within the OS.\n- Docker version 20.10 or higher.\n- Linux kernel version 4.18 or higher. We recommend kernel version 5.3 or higher for best performance.\n- Linux cgroup v2 enabled. By default, cgroup v2 is enabled on most modern Linux systems. To\n check whether cgroup v2 is enabled, run\n `stat -fc %T /sys/fs/cgroup/` in a shell.\n If cgroup v2 is enabled, the command output shows `cgroup2fs`.\n\n- If you want to integrate with Vertex AI, then you need\n the [Google Cloud CLI](/sdk/docs/install) available in your\n environment.\n\n- To install AlloyDB Omni on a cloud platform, we recommend using the following instance types:\n - On Google Cloud, we recommend `n2-highmem` instances.\n - On Amazon Web Services, we recommend `R6i` instances.\n - On Microsoft Azure, we recommend `Ebsv5` instances.\n- We recommend that you use a dedicated SSD storage device for storing your data. If you use a physical device for this purpose, we recommend attaching it directly to the host machine.\n\nDownload and install AlloyDB Omni\n---------------------------------\n\n| **Note:** To install the latest version of AlloyDB Omni, see [Customize your AlloyDB Omni installation](/alloydb/docs/omni/install).\n\n1. [Install the AlloyDB Omni CLI](/alloydb/omni/15.5.2/docs/omni-cli#install-debian).\n\n2. Use the AlloyDB Omni CLI to confirm that your Linux machine is ready to install\n AlloyDB Omni:\n\n sudo alloydb system-check\n\n If needed, modify your system until the output of the `system-check`\n command returns a successful check.\n3. Optional: To create a new disk partition for\n AlloyDB Omni to use for data storage, we recommend that you\n use an `ext4` file system for optimal performance.\n\n 1. To create an `ext4` file system, use the following command:\n\n mkfs.ext4 -m 1 -F \"$disk_path\"\n\n 2. To mount your disk, use the following command:\n\n mount --make-shared -o noatime,discard,errors=panic \"$disk_path\" \"$disk_mountpoint\"\n\n4. Install the server software using one of the following options:\n\n | **Note:** To install AlloyDB Omni with machine learning (ML) functions enabled, including the ability to query large language models (LLMs), see [Install AlloyDB Omni with AlloyDB AI](/alloydb/omni/15.5.2/docs/install-with-alloydb-ai).\n - To configure the server as a primary instance, run the following command:\n\n sudo alloydb database-server install --data-dir=$(realpath \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e)\n\n Replace \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e with the directory on your local file system\n where you want AlloyDB Omni to store its data, metadata,\n and configuration files. AlloyDB Omni tries to create\n this directory if it doesn't already exist. If you don't specify this\n value, then AlloyDB Omni defaults to\n `/var/alloydb/main/`.\n\n To have AlloyDB Omni listen for connections on a TCP port\n other than the default `5432`, include the `--pg-port`\n flag: \n\n sudo alloydb database-server install \\\n --data-dir=$(realpath \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e) \\\n --pg-port=\u003cvar translate=\"no\"\u003ePORT\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003ePORT\u003c/var\u003e with the TCP port that you want\n AlloyDB Omni to accept connections on.\n - To configure the server as a read replica, include the `--replica-source-ip`\n and `--replica-source-port` flags:\n\n sudo alloydb database-server install \\\n --data-dir=$(realpath \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e) \\\n --replica-source-ip=\u003cvar translate=\"no\"\u003eSOURCE_IP\u003c/var\u003e \\\n --replica-source-port=\u003cvar translate=\"no\"\u003eSOURCE_PORT\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e: the directory on your local file system\n where you want AlloyDB Omni to store its data, metadata,\n and configuration files. AlloyDB Omni tries to create\n this directory if it doesn't already exist. If you don't specify this\n value, then AlloyDB Omni defaults to\n `/var/alloydb/main/`.\n\n - \u003cvar translate=\"no\"\u003eSOURCE_IP\u003c/var\u003e: the IP address of the primary\n AlloyDB Omni instance to replicate from.\n\n - \u003cvar translate=\"no\"\u003eSOURCE_PORT\u003c/var\u003e: the TCP port of the primary\n AlloyDB Omni instance to replicate from. If you don't\n provide this value, then AlloyDB Omni applies a default\n value of `5432`.\n\n For more information on AlloyDB Omni read replicas, see\n [Create a read-only replica](/alloydb/omni/15.5.2/docs/set-up-read-replica).\n5. If your system runs Red Hat Enterprise Linux, then update the\n `/usr/lib/tuned/virtual-guest/tuned.conf` file with the following:\n\n vm.swappiness=1\n\nConnect to and use the database server\n--------------------------------------\n\nConnect to AlloyDB Omni using `psql`: \n\n sudo docker exec -it pg-service psql -h localhost -U postgres\n\nThe terminal window displays `psql` login text that ends with a\n`postgres=#` prompt."]]