Quick start for CentOS or RHEL 7 v14

EDB Postgres Advanced Server adds extended functionality to the open-source PostgreSQL database that supports database administration, enhanced SQL capabilities, database and application security, performance monitoring and analysis, and application development utilities. EDB Postgres Advanced Server also supports database compatibility features for Oracle users; for detailed information about compatibility features, see the EDB Postgres Advanced Server documentation.

This guide walks you through using yum to install EDB Postgres Advanced Server on a RHEL or CentOS 7 system and deploying a database cluster. The database created by this tutorial is well-suited for experimentation and testing. There are additional security and resource considerations when configuring a production installation that are not covered by this document.

This guide assumes that you are familiar with simple operating system and system administration procedures, and have administrative privileges on the host on which EDB Postgres Advanced Server is installed.

Components of an EDB Postgres Advanced Server deployment

Among the components that make up an EDB Postgres Advanced Server deployment are:

The Database server - The database server (the postmaster) is the service that provides the key functionality that allows you to store and manage data. EDB Postgres Advanced Server is built on the PostgreSQL open-source database project; it includes all of the documented features of community PostgreSQL and more.

The database cluster - A cluster is a set of on-disk structures that comprise a collection of databases. A cluster is serviced by a single-instance of the database server. A database cluster is stored in the data directory. Don't store the data directory of a production database on an NFS file system.

Configuration files - You can use the parameters listed in Postgres configuration files to manage deployment preferences, security preferences, connection behaviors, and logging preferences.

Supporting tools, utilities, and clients - EDB makes available a full suite of tools and utilities that can help you monitor and manage your EDB Postgres Advanced Server deployment. For more information, visit the EDB website.

Supporting functions, rocedures, data types, index types, operators, utilities, and aggregates - EDB Postgres Advanced Server includes a number of features that help you manage your data.

Prerequisites

Before installing EDB Postgres Advanced Server, use yum to install prerequisite packages:

yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

If you are installing Migration Toolkit or EDB*Plus, you must first install Java:

yum -y install java

Installing and configuring EDB Postgres Advanced Server

Step 1: You must register with EDB to receive credentials for the EDB repository. For information about requesting credentials, visit the https://www.enterprisedb.com/user/login.

Step 2: Assume superuser privileges to install the EDB repository configuration package:

yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm

Step 3: The repository configuration file is named edb.repo. The file resides in /etc/yum.repos.d. Ensure the username and password placeholders in the baseurl specification matches with the name and password of a registered EDB user.

Step 4: Update the cache and install EDB Postgres Advanced Server:

yum makecache

yum -y install edb-as14-server

Step 5: Use sudo to assume the identity of the enterprisedb database superuser and create an EDB Postgres Advanced Server cluster named acctg on listener port 5444:

sudo su - enterprisedb

/usr/edb/as14/bin/initdb -D /var/lib/edb/as14/acctg

Starting the cluster

As the enterprisedb user, start the cluster:

/usr/edb/as14/bin/pg_ctl start -D /var/lib/edb/as14/acctg

You can check the status of the cluster with the command:

/usr/edb/as14/bin/pg_ctl status -D /var/lib/edb/as14/acctg

Using the psql command line client

After installing the server and initializing a cluster, you can connect to the database with your choice of client. For convenience, the server is deployed with the pgAdmin 4 graphical client and the psql command line client.

As the enterprisedb user, open a psql session:

/usr/edb/as14/bin/psql -d edb -p 5444

Then, assign a password to the enterprisedb user:

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;
 deptno |   dname    |   loc
--------+------------+----------
     10 | ACCOUNTING | NEW YORK
     20 | RESEARCH   | DALLAS
(2 rows)

Or, create database users:

ALTER ROLE enterprisedb IDENTIFIED BY password;

For detailed product usage information, see the EDB Postgres Advanced Server documentation available at the EDB website.