Installing EDB Postgres Advanced Server on SLES 15 x86_64 v15

Prerequisites

Before you begin the installation process:

  • Set up the repository

    Setting up the repository is a one-time task. If you have already set up your repository, you do not need to perform this step.

    To set up the repository, go to EDB repositories and follow the instructions provided there.

  • Address other prerequisites

    # Activate the required SUSE module
    sudo SUSEConnect -p PackageHub/15.3/x86_64
    
    # Refresh the metadata
    sudo zypper refresh

Install the package

sudo zypper -n install edb-as<xx>-server

Where <xx> is the version of the EDB Postgres Advanced server you are installing. For example, if you are installing version 14, the package name would be edb-as14-server.

To install an individual component:

sudo zypper -n install <package_name>

Where package_name can be any of the available packages from the available package list.

Initial configuration

This section steps you through getting started with your cluster including logging in, ensuring the installation and initial configuration was successful, connecting to your cluster, and creating the user password.

# Initialize the database cluster
PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/edb/as15/bin/edb-as-15-setup initdb

# Start the database cluster
systemctl start edb-as-15
# To work in your cluster, login as the enterprisedb user
su - enterprisedb

# Connect to the database server using the psql command line client
psql edb

# Assign a password to the database superuser the enterprisedb
ALTER ROLE enterprisedb IDENTIFIED BY password;

# Create a database (named hr)
CREATE DATABASE hr;

# Connect to the new database and create a table (named dept)
\c hr
CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk
PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc
varchar(13));

# Add data to the table
INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK');
INSERT into dept VALUES (20,'RESEARCH','DALLAS');

# You can use simple SQL commands to query the database and retrieve
# information about the data you have added to the table
SELECT * FROM dept;
Output
deptno  |   dname    |   loc
--------+------------+----------
10      | ACCOUNTING | NEW YORK
20      | RESEARCH   | DALLAS
(2 rows)