EDB Postgres Advanced Server Installation Guide Linux v11
EDB Postgres Advanced Server Installation Guide Linux v11
March 7, 2019
EDB Postgres™ Advanced Server Installation Guide for Linux
by EnterpriseDB® Corporation
Copyright © 2009 - 2019 EnterpriseDB Corporation. All rights reserved.
Table of Contents
1 Introduction ........................................................................................................................................... 4
1.1 Typographical Conventions Used in this Guide ............................................................................... 5
2 Requirements Overview ........................................................................................................................ 6
2.1 Supported Platforms ......................................................................................................................... 6
2.2 Linux Installation Prerequisites ........................................................................................................ 7
3 Limitations ............................................................................................................................................ 8
4 Using a Package Manager to Install Advanced Server ......................................................................... 9
4.1 Installing an RPM Package .............................................................................................................11
4.1.1 Advanced Server RPMs Packages .........................................................................................13
4.1.2 Performing a Minor Version Update of an RPM Installation ................................................16
4.2 Installing Advanced Server on a SLES Host ...................................................................................17
4.3 Installing Advanced Server on a Debian or Ubuntu Host ...............................................................23
4.3.1 Advanced Server Debian Packages .......................................................................................24
4.4 Configuring a Package Installation .................................................................................................27
4.4.1 Creating a Database Cluster and Starting the Service ............................................................27
4.4.2 Using a Service Configuration File on CentOS or Redhat 6.x ..............................................29
4.4.2.1 Specifying Cluster Options with INITDBOPTS ..........................................................30
4.4.3 Modifying the Data Directory Location on CentOS or Redhat 7.x .......................................32
4.5 Starting Multiple Postmasters with Different Clusters ....................................................................33
4.6 Creating an Advanced Server Repository on an Isolated Network .................................................35
5 Installation Troubleshooting ................................................................................................................37
6 Managing an Advanced Server Installation .........................................................................................38
6.1 Starting and Stopping Advanced Server and Supporting Components ...........................................38
6.1.1 Controlling a Service on CentOS or RHEL 7.x .....................................................................39
6.1.2 Controlling a Service on CentOS or RHEL 6.x .....................................................................40
6.1.3 Controlling a Service on Debain 9x or Ubuntu 18.04 ............................................................41
6.1.4 Using pg_ctl to Control Advanced Server .............................................................................42
6.1.5 Configuring Component Services to AutoStart at System Reboot ........................................43
6.2 Modifying the postgresql.conf File .................................................................................................44
6.3 Modifying the pg_hba.conf File ......................................................................................................46
6.4 Connecting to Advanced Server with psql ......................................................................................47
7 Uninstalling Advanced Server .............................................................................................................48
7.1 Uninstalling an RPM Package .........................................................................................................48
7.2 Uninstalling Advanced Server Components on a Debian or Ubuntu Host ......................................49
1 Introduction
The EDB Postgres Advanced Server Installation Guide is a comprehensive guide to
installing EDB Postgres Advanced Server (Advanced Server). In this guide you will find
detailed information about:
In the following descriptions, a term refers to any word or group of words that are
language keywords, user-supplied values, literals, etc. A term’s exact meaning depends
upon the context in which it is used.
Italic font introduces a new term, typically in the sentence that defines it for the
first time.
Fixed-width (mono-spaced) font is used for terms that must be given
literally such as SQL commands, specific table and column names used in the
examples, programming language keywords, etc. For example, SELECT * FROM
emp;
Italic fixed-width font is used for terms for which the user must
substitute values in actual usage. For example, DELETE FROM table_name;
A vertical pipe | denotes a choice between the terms on either side of the pipe. A
vertical pipe is used to separate two or more alternative terms within square
brackets (optional choices) or braces (one mandatory choice).
Square brackets [ ] denote that one or none of the enclosed terms may be
substituted. For example, [ a | b ] means choose one of “a” or “b” or neither
of the two.
Braces {} denote that exactly one of the enclosed alternatives must be specified.
For example, { a | b } means exactly one of “a” or “b” must be specified.
Ellipses ... denote that the preceding term may be repeated. For example, [ a |
b ] ... means that you may have the sequence, “b a a b a”.
2 Requirements Overview
The following sections detail the supported platforms and installation requirements for
EDB Postgres Advanced Server 11.
64 bit Linux:
Installing EPEL
Before installing Advanced Server, you may be required to install the EPEL (Extra
Packages for Enterprise Linux) repository. You can use yum to install the package:
If yum cannot access a repository that contains epel-release, you will get an error
message:
If you receive this error, you can download the EPEL rpm package, and install it
manually. To manually install EPEL, download the rpm package, assume superuser
privileges, navigate into the directory that contains the package, and install EPEL with the
command:
https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F
You must install xterm, konsole, or gnome-terminal before executing any console-
based program installed by EnterpriseDB installers.
Before using an RPM to install Migration Toolkit or EDB*Plus, you must first install
Java version 1.7 or later for Migration Toolkit and Java version 1.8 or later for
EDB*Plus. On a Linux system, you can use the yum package manager to install Java.
Open a terminal window, assume superuser privileges, and enter:
3 Limitations
The following limitation applies to the EDB Postgres Advanced Server:
The LLVM JIT package is supported on RHEL 7.x and SLES. LLVM JIT is not
supported on RHEL 6.x and PPC-LE 64 (running RHEL or CentOS 7.x).
You must have credentials for the EnterpriseDB repository to install Advanced Server; to
submit a request for credentials, click an Access Repository button on the following page:
https://www.enterprisedb.com/advanced-downloads
For a list of the RPM installers and Debian packages available from EnterpriseDB for
Advanced Server and supporting components, see Section 4.1.1.
Installing the server package creates a database superuser named enterprisedb. The
user is assigned a user ID (UID) and a group ID (GID) of 26. The user has no default
password; use the passwd command to assign a password for the user. The default
shell for the user is bash, and the user's home directory is /var/lib/edb/as11.
By default, Advanced Server logging is configured to write files to the log subdirectory
of the data directory, rotating the files each day and retaining one week of log entries.
You can customize the logging behavior of the server by modifying the
postgresql.conf file; for more information about modifying the postgresql.conf
file, please see Section 6.2.
The RPM installers place Advanced Server components in the directories listed in the
table below:
The Debian package place Advanced Server and supporting components in the
directories listed in the following table:
1. Assume superuser privileges and use either rpm or yum to create the repository
configuration file:
or
2. Use your choice of editor to modify the repository configuration file, enabling
each repository from which you will install packages, and providing your
credentials. The repository configuration file is named edb.repo; it resides in
/etc/yum.repos.d.
To enable a repository, change the value of the enabled parameter to 1 and replace
the user name and password placeholders in the baseurl specification with your
user name and the repository password.
To install Advanced Server 11, enable and provide connection credentials for the
edbas11 repository and the enterprisedb-dependencies repository:
[edbas11]
name=EnterpriseDB Advanced Server 11 $releasever -
$basearch
baseurl=https://<username>:<password>@yum.enterprisedb.com/
11/redhat/rhel-$releasever-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY
[enterprisedb-dependencies]
name=EnterpriseDB Dependencies $releasever - $basearch
baseurl=https://<username>:<password>@yum.enterprisedb.com/
dependencies/redhat/rhel-$releasever-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY
The repository configuration file also contains an entry for the enterprisedb-
tools repository. Enable the [enterprisedb-tools] and the
[enterprisedb-dependencies] entries in the edb.repo file when installing
Advanced Server supporting components:
[enterprisedb-tools]
name=EnterpriseDB Tools $releasever - $basearch
baseurl=https://<username>:<password>@yum.enterprisedb.com/
tools/redhat/rhel-$releasever-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY
3. After modifying applicable entries in the repository configuration file, save the
configuration file and exit the editor.
Then, you can use the yum install command to install Advanced Server or supporting
components. For example, to install the server and its core components, use the
command:
When you install an RPM package that is signed by a source that is not recognized by
your system, yum may ask for your permission to import the key to your local server. If
prompted, and you are satisfied that the packages come from a trustworthy source, enter a
y, and press Return to continue.
After installing Advanced Server, you must configure the installation; see Section 4.4,
Configuring a Package Installation, for details.
During the installation, yum may encounter a dependency that it cannot resolve. If it
does, it will provide a list of the required dependencies that you must manually resolve.
The tables that follow list the RPM packages that are available from EnterpriseDB.
You can also use the yum search command to access a list of the packages that are
currently available from your configured repository. Open a command line, assume
superuser privileges, and enter:
Where package is the search term that specifies the name (or partial name) of a package.
The repository search will return a list of available packages that include the specified
search term.
The following table lists the packages for Advanced Server 11 supporting components
that are stored in the Tools repository:
If you used an RPM package to install Advanced Server or its supporting components,
you can use yum to perform a minor version upgrade to a more recent version. To review
a list of the package updates that are available for your system, open a command line,
assume root privileges, and enter the command:
Where package_name is the search term for which you wish to search for updates.
Please note that you can include wild-card values in the search term. To use yum
update to install an updated package, use the command:
Where package_name is the name of the package you wish to update. Include wild-
card values in the update command to update multiple related packages with a single
command. For example, use the following command to update all packages whose
names include the expression edb:
Please note that the yum update command will only perform an update between minor
releases; to update between major releases, you must use pg_upgrade.
For more information about using yum commands and options, enter yum --help on
your command line, or visit:
https://access.redhat.com/documentation/en-
US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-yum.html
https://www.enterprisedb.com/advanced-downloads
You can use the zypper package manager to install Advanced Server or Advanced Server
supporting components on an SLES host. zypper will attempt to satisfy package
dependencies as it installs a package, but some components require access to specific
repositories that are not hosted at EnterpriseDB.
To add Advanced Server or supporting components, use the following commands to add
EnterpriseDB repository configuration files to your SLES host:
edbas11suse.repo
edbasdependencies.repo
edbastools.repo
After creating the repository configuration files, use the zypper refresh command to
refresh the metadata on your SLES host to include the EnterpriseDB repositories.
When prompted for a User Name and Password, provide your connection credentials
for the EnterpriseDB repository. If you need credentials, contact EnterpriseDB at:
https://www.enterprisedb.com/general-inquiry-form
Before installing EDB Postgres Advanced Server or supporting components, you must
also add SUSEConnect and the SUSE Package Hub extension to the SLES host and
register the host with SUSE, allowing access to SUSE repositories. Use the commands:
https://www.suse.com/support/kb/doc/?id=7016626
The following sections provide information about the specific repositories that are not
hosted by EnterpriseDB, but that provide software that satisfies dependencies for each
listed component. Please note that after adding repository access, you should use the
zypper refresh command to process the repository content:
zypper refresh
Java Components:
Please note that only OpenJDK (version 1.8) is supported on SLES hosts of Java
components. Before using an RPM package to add Advanced Server or a supporting
component that requires Java, use zypper to add supporting repository locations to your
system.
zypper addrepo
http://download.opensuse.org/repositories/Java:/Factory/SLE_12_SP
2/Java:Factory.repo
zypper refresh
Then, to install the server and its core components, invoke the command:
Slony:
If you are using a package to add Slony to a SLES host, please note that you must add
access to the Perl repository:
zypper addrepo
http://download.opensuse.org/repositories/devel:languages:perl/SL
E_12_SP2/devel:languages:perl.repo
zypper addrepo
http://download.opensuse.org/repositories/devel:languages:perl/SL
E_12_SP3/devel:languages:perl.repo
Then:
zypper refresh
PostGIS:
When using an RPM package to add PostGIS to a SLES host, you must add the following
repository:
zypper addrepo
"http://download.opensuse.org/repositories/server:/Kolab:/3.3/SLE
_12/server:Kolab:3.3.repo"
Then:
zypper refresh
pgAgent:
When adding the pgAgent packages to a SLES host, you must add access to the
wxWidgets repository:
SUSEConnect –p sle-module-legacy/12/x86_64
SUSEConnect –p sle-sdk/12/x86_64
zypper addrepo
http://download.opensuse.org/repositories/X11:/wxWidgets/SLE_12_S
P2/X11:wxWidgets.repo
SUSEConnect –p sle-module-legacy/12/x86_64
SUSEConnect –p sle-sdk/12/x86_64
zypper addrepo
http://download.opensuse.org/repositories/X11:/wxWidgets/SLE_12_S
P3/X11:wxWidgets.repo
Then:
zypper refresh
When adding the PEM Server and PEM Agent to a SLES host, you must add access to
the wxWidgets repository:
SUSEConnect -p sle-module-legacy/12/x86_64
SUSEConnect -p sle-sdk/12/x86_64
zypper addrepo
https://download.opensuse.org/repositories/Apache:Modules/SLE_12_
SP2/Apache:Modules.repo
zypper addrepo
http://download.opensuse.org/repositories/Cloud:/OpenStack:/Newto
n:/cisco-apic:/2.3.1/SLE_12_SP2/ pem_opensuse_boost
SUSEConnect -p sle-module-legacy/12/x86_64
SUSEConnect -p sle-sdk/12/x86_64
zypper addrepo
https://download.opensuse.org/repositories/Apache:Modules/SLE_12_
SP3/Apache:Modules.repo
zypper addrepo
http://download.opensuse.org/repositories/Cloud:/OpenStack:/Newto
n:/cisco-apic:/2.3.1/SLE_12_SP3/ pem_opensuse_boost
Then:
zypper refresh
zypper install edb-pem-server
The PEM server installer includes a script (configure-pem-server.sh) to help automate the
configuration process for RPM installations. The script is installed in the
/usr/edb/pem/bin directory. To invoke the script, use the command:
/usr/edb/pem/bin/configure-pem-server.sh
BART:
When installing BART on a SLES host, you must add the SUSE SDK as well as the
Archiving repository:
SUSEConnect –p sle-sdk/12/x86_64
zypper addrepo
https://download.opensuse.org/repositories/Archiving/SLE_12_SP3/A
rchiving.repo
Then:
zypper refresh
LLVM JIT:
When installing LLVM JIT on a SLES host, you must add the following repository to
your system:
zypper addrepo
https://download.opensuse.org/repositories/devel:/tools:/compiler
/SLE_12_SP3/devel:tools:compiler.repo
Then:
zypper refresh
To update components installed with zypper, use the zypper update command.
https://www.enterprisedb.com/advanced-downloads
The following steps will walk you through using the EnterpriseDB apt repository to
install a debian package. When using the commands, replace the username and
password with the credentials provided by EnterpriseDB.
sudo su –
sh -c 'echo "deb
https://username:[email protected]/$(lsb_release -
cs)-edb/ $(lsb_release -cs) main" >
/etc/apt/sources.list.d/edb-$(lsb_release -cs).list'
wget -q -O - https://username:password
@apt.enterprisedb.com/edb-deb.gpg.key | apt-key add -
apt-get update
The table that follows lists some of the Debian packages that are available from
EnterpriseDB.
You can also use the apt list command to access a list of the packages that are
currently available from your configured repository. Open a command line, assume
superuser privileges, and enter:
https://www.postgresql.org/docs/11/static/app-initdb.html
After specifying any options in the service configuration file, you can create the database
cluster and start the service; these steps are platform specific.
To create a database cluster in the PGDATA directory that listens on the port specified by
the PGPORT environment variable specified in the service configuration file (described in
Section 4.4.2), assume root privileges, and invoke the service script:
You can also assign a locale to the cluster when invoking initdb. By default, initdb
will use the value specified by the $LANG operating system variable, but if you append a
preferred locale when invoking the script, the cluster will use the alternate value. For
example, to create a database cluster that uses simplified Chinese, invoke the command:
After creating a database cluster, start the database server with the command:
To invoke initdb on a RHEL or CentOS 7.x system, with the options specified in the
service configuration file, assume the identity of the operating system superuser:
su - root
To initialize a cluster with the non-default values, you can use the
PGSETUP_INITDB_OPTIONS environment variable by invoking the edb-as-11-setup
cluster initialization script that resides under EPAS_Home/bin.
After creating the cluster, use systemctl to start, stop, or restart the service:
You can initialize multiple clusters using the bundled scripts. To create a new cluster,
assume root privileges, and invoke the bundled script:
/usr/bin/epas_createcluster 11 main2
/usr/bin/epas_lsclusters
On a CentOS or RedHat version 6.x host, the RPM installer creates a service
configuration file named edb-as-11.sysconfig in /etc/sysconfig/edb/as11
(see Figure 4.1). Please note that options specified in the service configuration file are
only enforced if initdb is invoked via the service command; if you manually invoke
initdb (at the command line), you must specify the other options (such as the location
of the data directory and installation mode) on the command line.
PGENGINE specifies the location of the engine and utility executable files.
PGPORT specifies the listener port for the database server.
PGDATA specifies the path to the data directory.
PGLOG specifies the location of the log file to which the server writes startup
information.
Use INITDBOPTS to specify any initdb option or options that you wish to apply
to the new cluster. For more information, see Section 4.4.2.1.
You can modify the edb-as-11.sysconfig file before using the service command to
invoke the startup script to change the listener port, data directory location, startup log
location or installation mode. If you plan to create more than one instance on the same
system, you may wish to copy the edb-as-11.sysconfig file (and the associated
edb-as-11 startup script) and modify the file contents for each additional instance that
resides on the same host.
You can use the INITDBOPTS variable to specify your cluster configuration preferences.
By default, the INITDBOPTS variable is commented out in the service configuration file;
unless modified, when you run the service startup script, the new cluster will be created
in a mode compatible with Oracle databases. Clusters created in this mode will contain a
database named edb, and have a database superuser named enterprisedb.
To create a new cluster in PostgreSQL mode, remove the pound sign (#) in front of the
INITDBOPTS variable, enabling the "--no-redwood-compat" option. Clusters
created in PostgreSQL mode will contain a database named postgres, and have a
database superuser named postgres.
You may also specify multiple initdb options. For example, the following statement:
Creates a database cluster (without compatibility features for Oracle) that contains a
database named postgres that is owned by a user named alice; the cluster uses UTF-
8 encoding.
--no-redwood-compat
--redwood-like
--icu-short-form
http://www.enterprisedb.com/products-services-training/products/documentation
For more information about using initdb, and the available cluster configuration
options, see the PostgreSQL Core Documentation available at:
https://www.postgresql.org/docs/11/static/app-initdb.html
You can also view online help for initdb by assuming superuser privileges and
entering:
/path_to_initdb_installation_directory/initdb --help
On a CentOS or RedHat version 7.x host, the unit file is named edb-as-11.service
and resides in /usr/lib/systemd/system. The unit file contains references to the
location of the Advanced Server data directory. You should avoid making any
modifications directly to the unit file because it may be overwritten during package
upgrades.
cp /usr/lib/systemd/system/edb-as-11.service
/etc/systemd/system/
After copying the unit file to the new location, modify the service file
(/etc/systemd/system/edb-as-11.service) with your editor of choice,
correcting any required paths.
Then, use the following command to reload systemd, updating the modified service
scripts:
systemctl daemon-reload
Then, start the Advanced Server service with the following command:
The edb-as11-server-core RPM contains a script that starts the Advanced Server
instance. The script can be copied, allowing you to run multiple services, with unique
data directories and that monitor different ports. You must have root access to invoke
or modify the script.
The example that follows creates a second instance on an Advanced Server host; the
secondary instance is named secondary:
ln edb-as-11 secondary-edb-as-11
https://www.postgresql.org/docs/11/static/app-initdb.html
5. Edit the postgresql.conf file to specify the port, address, TCP/IP settings, etc.
for the secondary instance.
The edb-as11-server-core RPM for version 7.x contains a unit file that starts the
Advanced Server instance. The file allows you to start multiple services, with unique
data directories and that monitor different ports. You must have root access to invoke
or modify the script.
The example that follows creates an Advanced Server installation with two instances; the
secondary instance is named secondary:
1. Make a copy of the default file with the new name. As noted at the top of the file,
all modifications must reside under /etc. You must pick a name that is not
already used in /etc/systemd/system.
cp /usr/lib/systemd/system/edb-as-11.service
/etc/systemd/system/secondary-edb-as-11.service
2. Edit the file, changing PGDATA to point to the new data directory that you will
create the cluster against.
5. Edit the postgresql.conf file for the new instance, specifying the port, the IP
address, TCP/IP settings, etc.
mkdir /srv/repos
3. Copy the RPM installation packages to your local repository. You can download
the individual packages or use a tarball to populate the repository.
5. Install your preferred webserver on the host that will act as your local repository,
and ensure that the repository directory is accessible to the other servers on your
network.
6. On each isolated database server, configure yum to pull updates from the mirrored
repository on your local network. For example, you might create a repository
configuration file called /etc/yum.repos.d/edb-repo with connection
information that specifies:
[edbas11]
name=EnterpriseDB Advanced Server 11
baseurl=https://yum.your_domain.com/edbas11
enabled=1
gpgcheck=0
After specifying the location and connection information for your local repository, you
can use yum commands to install Advanced Server and its supporting components on the
isolated servers. For example:
https://wiki.centos.org/HowTos/CreateLocalRepos
5 Installation Troubleshooting
Difficulty Displaying Java-based Applications
If you encounter difficulty displaying Java-based server features (controls or text not
being displayed correctly, or blank windows), upgrading to the latest libxcb-xlib
libraries should correct the problem on most distributions. Please visit the following link
for other possible work-arounds:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373
If an installation fails to complete due to existing content in the data directory, the server
will write an error message to the server logs:
If you encounter a similar message, you should confirm that the data directory is empty;
the presence of files (including the system-generated lost+found folder) will prevent
the installation from completing. Either remove the files from the data directory, or
specify a different location for the data directory before re-invoking the installer to
complete the installation.
The following table lists the names of the services that control Advanced Server and
services that control Advanced Server supporting components:
You can use the Linux command line to control Advanced Server's database server and
the services of Advanced Server's supporting components. The commands that control
the Advanced Server service on a Linux platform are host specific.
If your installation of Advanced Server resides on version 7.x of RHEL and CentOS, you
must use the systemctl command to control the Advanced Server service and
supporting components.
The systemctl command must be in your search path and must be invoked with
superuser privileges. To use the command, open a command line, and enter:
Where:
action
service_name
On version 6.x of RHEL or CentOS Linux, you can control a service at the command line
with the service command. The service command can be used to manage an
Advanced Server cluster, as well as the services of component software installed with
Advanced Server.
Using the service command to change the status of a service allows the Linux service
controller to keep track of the server status (the pg_ctl command does not alert the
service controller to changes in the status of a server). The command must be in your
search path and must be invoked with superuser privileges. Open a command line, and
issue the command:
The Linux service command invokes a script (with the same name as the service) that
resides in /etc/init.d. If your Linux distribution does not support the service
command, you can call the script directly by entering:
/etc/init.d/service_name action
Where:
service_name
action
By default, a server is running with the peer or md5 permission on a Debian or Ubuntu
host. You can change the auth_type from pg_hba.conf file available under:
vi /etc/edb-as/11/main/pg_hba.conf
To know more about modifying the pg_hba.conf file, see Section 6.3.
Please note, all the server configuration files are available under /etc/edb-
as/11/main.
2. Stop a service:
3. Restart a service:
4. Reload a service:
You can use the pg_ctl utility to control an Advanced Server service from the
command line on any platform. pg_ctl allows you to start, stop, or restart the
Advanced Server database server, reload the configuration parameters, or display the
status of a running server. To invoke the utility, assume the identity of the cluster owner,
navigate into the home directory of Advanced Server, and issue the command:
data_directory
action
For more information about using the pg_ctl utility, or the command line options
available, please see the official PostgreSQL Core Documentation available at:
https://www.postgresql.org/docs/11/static/app-pg-ctl.html
You can use the pg_ctl utility to manage the status of an Advanced Server cluster, but
it is important to note that pg_ctl does not alert the operating system service controller
to changes in the status of a server, so it is beneficial to use the service command
whenever possible.
After installing, configuring, and starting the services of Advanced Server supporting
components on a Linux system, you must manually configure your system to autostart the
service when your system reboots. To configure a service to autostart on a Linux system,
open a command line, assume superuser privileges, and enter the following command.
/sbin/chkconfig service_name on
Parameters that are preceded by a pound sign (#) are set to their default value (as shown
in the parameter setting). To change a parameter value, remove the pound sign and enter
a new value. After setting or changing a parameter, you must either reload or restart the
server for the new parameter value to take effect.
Within the postgresql.conf file, some parameters contain comments that indicate
change requires restart (see Figure 6.1). To view a list of the parameters that
require a server restart, execute the following query at the psql command line:
When you invoke the initdb utility to create a cluster, initdb creates a
pg_hba.conf file for that cluster that specifies the type of authentication required from
connecting clients.
To modify the pg_hba.conf file, open the file with your choice of editor. After
modifying the authentication settings in the pg_hba.conf file, use the Linux command
line to restart the server and apply the changes.
For more information about authentication, and modifying the pg_hba.conf file, see
the PostgreSQL Core Documentation at:
https://www.postgresql.org/docs/11/static/auth-pg-hba-conf.html
psql is a command line client application that allows you to execute SQL commands
and view the results. To open the psql client, the client must be in your search path. The
executable resides in the bin directory, under your Advanced Server installation.
Use the following command and options to start the psql client (see Figure 6.2):
Where:
-U specifies the identity of the database user that will be used for the session.
For more information about using the command line client, please refer to the
PostgreSQL Core Documentation at:
https://www.postgresql.org/docs/11/static/app-psql.html
Include the -e option when invoking the rpm command to remove an installed package;
the command syntax is:
rpm -e package_name
Where package_name is the name of the package that you would like to remove.
You can use the yum remove command to remove a package installed by yum. To
remove a package, open a terminal window, assume superuser privileges, and enter the
command:
Where package_name is the name of the package that you would like to remove.
Note: yum and RPM will not remove a package that is required by another package. If
you attempt to remove a package that satisfies a package dependency, yum or RPM will
provide a warning.
Please note: the configuration files and data directory remains intact.
2. To uninstall Advanced Server, configuration files, and data directory, invoke the
following command: