Table of Contents Previous Next


3 Using a Package Manager to Install Advanced Server : 3.4 Configuring a Package Installation

The PostgreSQL initdb command creates a database cluster; when installing Advanced Server with an RPM package, the initdb executable is in /usr/edb/asx.x/bin. After installing Advanced Server, you must manually configure the service and invoke initdb to create your cluster. When invoking initdb, you can:
Include the service command on RHEL or CentOS 6.x and use a service configuration file to configure the environment.
Include the systemd service manager on RHEL or CentOS 7.x | 8.x and use a service configuration file to configure the environment.
To review the initdb documentation, visit:
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 3.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:
To invoke initdb on a RHEL or CentOS 7.x | 8.x system, with the options specified in the service configuration file, assume the identity of the operating system superuser:
To initialize a cluster with the non-default values, you can use the PGSETUP_INITDB_OPTIONS environment variable by invoking the edb-as-12-setup cluster initialization script that resides under EPAS_Home/bin.
To invoke initdb export the PGSETUP_INITDB_OPTIONS environment variable with the following command:
After creating the cluster, use systemctl to start, stop, or restart the service:
Note: The data directory is created under /var/lib/edb-as/12/main2 and configuration directory is created under /etc/edb-as/12/main/.
On a CentOS or RedHat version 6.x host, the RPM installer creates a service configuration file named edb-as-12.sysconfig in /etc/sysconfig/edb/as12 (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 3.4.2.1.
You can modify the edb-as-12.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-12.sysconfig file (and the associated edb-as-12 startup script) and modify the file contents for each additional instance that resides on the same host.

3 Using a Package Manager to Install Advanced Server : 3.4 Configuring a Package Installation

Table of Contents Previous Next