cancel
Showing results for 
Search instead for 
Did you mean: 

EPAS 9.6 for RHEL/CentOS 7 Quickstart

Community Manager

Objective

Quickly (less than five minutes) install and run a default EPAS 9.6 cluster on RHEL 7

 

Prerequisites

Running instance of RHEL/CentOS 7 with root access

 

Components

There are three primary components to EPAS:

  1. EPAS 9.6 Installation (/usr/edb/as9.6/)

  2. EPAS 9.5 Cluster Directories (user configurable, but defaults to /var/lib/edb/as9.6/data)

    1. pg_hba.conf - Postgres Host Based Access file specifices who can connect to the cluster
    2. postgresql.conf - Postgres main configuration file with all other configuration settings for the cluster
  3. Linux Service Files

    1. Control commands (run as root):
su - enterprisedb -c "/usr/lib/systemd/system/edb-as-9.6.sh initdb"
systemctl edb-as-9.6.service start|stop|restart/usr/lib/systemd/system/edb-as-9.65.sh (should be cloned for each cluster that you want to run on this machine)

             2.  /usr/lib/systemd/system/edb-as-9.65.sh (should be cloned for each cluster that you want to run on this machine)

            3.  /etc/sysconfig/edb/as-9.6 (configuration for each service, should also be cloned for each cluster that you run on this machine)

 

Steps (as root user)

#!/bin/bash

#
# Setup YUM repository for installing EPAS 
#
rpm -Uvh http://yum.enterprisedb.com/edbrepos/edb-repo-9.6-4.noarch.rpm

#
# Set YUM username/password in edb.repo
#
export YUM_USER=<yum user>
export YUM_PASSWORD=<yum password>
sed -i "s/<username>:<password>/$YUM_USER:$YUM_PASSWORD/g" /etc/yum.repos.d/edb.repo

#
# Enable the EPAS 9.6 repo in edb.repo
#
sed -i "\/edbas96/,/gpgcheck/ s/enabled=0/enabled=1/" /etc/yum.repos.d/edb.repo
sed -i "\/enterprisedb-dependencies/,/gpgcheck/ s/enabled=0/enabled=1/" /etc/yum.repos.d/edb.repo
#
# Install EPAS 9.6
#
yum -y install edb-as96-server
#
# Start the EPAS server and initialize a new Postgres
# data directory using the appropriate mechanism
# for the operating system
#
su - enterprisedb -c "/usr/edb/as9.6/bin/initdb -D /var/lib/edb/as9.6/data"
systemctl start edb-as-9.6.service
#
# Connect to the "edb" database on the Postgres cluster running on port 5444,
# list your connection info (\conninfo), list all databases on this cluster (\l)
# list users in the cluster (\dg), list all the "\" commands (\? - commented
# out below because it has pages of documentation, but please look at it), 
# and exit psql (exit).  Execute as enterprisedb user.
#
su - enterprisedb -c "/usr/edb/as9.6/bin/psql -p 5444 -d edb"
\conninfo
\l
\dg
-- \?
exit

#
# Congratulations! You have successfully installed, configured, and connected to your first EPAS 9.5 cluster.

Tips

 

Summary

This guide is intended to get you up and started with a default installation of EPAS 9.6 as quickly as possible.  This is just the beginning though.  Please stay tuned for more tutorials and demos of specific features available in EPAS 9.6.