cancel
Showing results for 
Search instead for 
Did you mean: 

EPAS 9.5 Quickstart

EDB Team Member

Objective

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

 

Prerequisites

Running instance of RHEL 6/7 with root access

 

Components

There are three primary components to EPAS:

  1. EPAS 9.5 Installation (/usr/ppas-9.5)

  2. EPAS 9.5 Cluster Directories (user configurable, but defaults to /var/lib/ppas/9.5/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. RHEL/CentOS 7
      1. Control commands (run as root):
        su - enterprisedb -c "/usr/lib/systemd/system/ppas-9.5.sh initdb" systemctl ppas-9.5.service start|stop|restart
      2. /usr/lib/systemd/system/ppas-9.5.sh (should be cloned for each cluster that you want to run on this machine)
      3. /etc/sysconfig/ppas/ppas-9.5 (configuration for each service, should also be cloned for each cluster that you run on this machine)
    2. RHEL/CentOS 6
      1. Control commands (run as root):
        service ppas-9.5 start|stop|restart|initdb
      2. /etc/init.d/ppas-9.5 (should be cloned for each cluster that you want to run on this machine)
      3. <tbd>

(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.5 repo in edb.repo
#
sed -i "\/ppas95/,/gpgcheck/ s/enabled=0/enabled=1/" /etc/yum.repos.d/edb.repo

#
# Install EPAS 9.5
#
yum -y install ppas95-server

#
# Start the EPAS server and initialize a new Postgres
# data directory using the appropriate mechanism
# for the operating system
#
if [ `cat /etc/redhat-release | grep "release 7" | wc -l` = 1 ]
  then
    /usr/lib/systemd/system/ppas-9.5.sh initdb
    systemctl start ppas-9.5.service
elif [ `cat /etc/redhat-release | grep "release 6" | wc -l` = 1 ]
  then
    service ppas-9.5 initdb
    service ppas-9.5 start
else
  su - enterprisedb -c "/usr/ppas-9.5/bin/initdb -D /var/lib/ppas/9.5/data"
  su - enterprisedb -c "/usr/ppas-9.5/bin/pg_ctl -D /var/lib/ppas/9.5/data start"
fi

#
# 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/ppas-9.5/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.5 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.5.