Installing EDB Postgres Advanced Server on Debian 11 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.

Install the package

sudo apt-get -y 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 15, the package name would be edb-as15-server.

To install an individual component:

sudo apt-get -y 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 was successful, connecting to your cluster, and creating the user password.

# 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)