Install AlloyDB Omni for Linux

Select a documentation version:

You can perform single instance installations of AlloyDB Omni on any Linux machine or bare metal server that supports RHEL 9 runtimes.

To get started with this deployment model, submit this form to request access.

Before you begin

Before you install AlloyDB Omni, read Plan your AlloyDB Omni installation.

Create a directory where AlloyDB Omni stores data

If you're using a storage system that runs AlloyDB Omni along with other applications, you can create the AlloyDB Omni directory on your device's existing file system. Otherwise, you can create a new file system on your dedicated device.

Existing file system

To create a directory in an existing file system, run the following command:

mkdir -p DATA_DIR

Replace the following variable:

  • DATA_DIR: the host directory path that your data is stored in.

Dedicated device

To create a directory in a dedicated file system, perform the following steps:

  1. Create a directory on the host where the disk will be mounted.

    mkdir -p MOUNT_POINT

    Replace the following variable:

    • MOUNT_POINT: top-level directory path that should contain your AlloyDB Omni instance.
  2. Create a gpt partition table and file system, and mount the disk device.

    EXT4

    parted -s DEVICE_PATH mklabel gpt
    parted -s DEVICE_PATH mkpart primary 0% 100%
    mkfs.ext4 -q -m 1 -L FS_LABEL -F PARTITION_PATH
    echo -e "LABEL=FS_LABEL\tMOUNT_POINT\text4\tdefaults\t0 0" | tee -a /etc/fstab
    mount MOUNT_POINT

    Replace the following variables:

    • DEVICE_PATH: path assigned by the operating system to the disk device.
    • FS_LABEL: label for the file system. The maximum length is 12 characters for xfs.
    • PARTITION_PATH: path for the disk partition that's used to store the file system data.

    XFS

    parted -s DEVICE_PATH mklabel gpt
    parted -s DEVICE_PATH mkpart primary 0% 100%
    dnf install xfsprogs
    mkfs.xfs -L FS_LABEL -f PARTITION_PATH
    echo -e "LABEL=FS_LABEL\tMOUNT_POINT\txfs\tdefaults\t0 0" | tee -a /etc/fstab
    mount MOUNT_POINT

    Replace the following variables:

    • DEVICE_PATH: path assigned by the operating system to the disk device.
    • FS_LABEL: label for the file system. The maximum length is 16 characters for ext4.
    • PARTITION_PATH: path for the disk partition that's used to store the file system data.
  3. Create a data directory in this file system. We recommend creating DATA_DIR as a subdirectory inside the mount point—for example, MOUNT_POINT/17.

    mkdir -p DATA_DIR

    Replace DATA_DIR with host directory path to store database related data in—for example, MOUNT_POINT/17.

Configure SELinux policy

Install the required policycoreutils-python-utils package so that the SELinux policy is configured to allow AlloyDB Omni database service while installing the AlloyDB Omni RPM package.

Install AlloyDB Omni

  1. Configure the YUM repository in your local directory.

    sudo tee -a /etc/yum.repos.d/alloydbomni.repo << EOF
    [alloydbomni]
    name=alloydbomni
    baseurl=ALLOYDB_OMNI_URL
    enabled=1
    repo_gpgcheck=0
    gpgcheck=1
    gpgkey=https://dl.google.com/linux/linux_signing_key.pub
    EOF
    
    $ sudo yum makecache
    

    Replace ALLOYDB_OMNI_URL with the AlloyDB Omni URL that you receive after you sign up for access.

  2. Install the AlloyDB Omni RPM package.

    sudo dnf install alloydbomni17
  3. Initialize and configure the AlloyDB Omni database.

    sudo PGPASSWORD=POSTGRES_PASSWORD PGDATA=DATA_DIR /usr/lib/postgresql/17/bin/alloydbomni17-setup initdb

    Optionally, you can pass standard initdb options as a single string in the POSTGRES_INITDB_ARGS variable.

  4. Prepare the AlloyDB Omni database.

    sudo PGPASSWORD=POSTGRES_PASSWORD /usr/lib/postgresql/17/bin/alloydbomni17-setup preparedb
  5. Optional. For optimized execution of the AlloyDB Omni service, run the following command.

    sudo /usr/lib/postgresql/17/bin/alloydbomni17-setup-host
  6. Start the AlloyDB Omni systemd service.

    sudo systemctl enable alloydbomni17
    $ sudo systemctl start alloydbomni17
  7. Check whether the AlloyDB Omni service is running successfully.

    sudo systemctl status alloydbomni17

    The following is an example response. Verify that the status is active (running).

        Loaded: loaded (/usr/lib/systemd/system/alloydbomni17.service; enabled; preset: disabled)
       Drop-In: /etc/systemd/system/alloydbomni17.service.d
         Active: active (running) since Wed 2025-11-19 07:37:31 UTC; 1 day 6h ago "
       Process: 120228 ExecStartPre=/usr/lib/postgresql/17/bin/alloydbomni17-check-db-dir ${PGDATA} (code=exited, status=0 SUCCESS)
      Main PID: 120231 (postgres)
         Tasks: 19 (limit: 203438)
        Memory: 161.7M (peak: 170.0M)
           CPU: 28min 10.149s
        CGroup: /system.slice/alloydbomni17.service
                ├─120231 /usr/lib/postgresql/17/bin/postgres -D /var/lib/postgresql/17/data
                ├─120232 "postgres: alloydb internal logger "
                ├─120233 "postgres: checkpointer "
                ├─120234 "postgres: background writer "
                ├─120237 "postgres: walwriter "
                ├─120243 "postgres: lux wal preallocator "
                ├─120244 "postgres: autovacuum launcher "
                ├─120246 "postgres: free buffer manager "
                ├─120247 "postgres: buffer control "
    

What's next