Table of Contents Previous Next


4 Using a Package Manager to Install Advanced Server : 4.4 Configuring a Package Installation

The PostgreSQL initdb command creates a database cluster. 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 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 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:
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:
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.
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/11/main2 and configuration directory is created under /etc/edb-as/11/main/.

4 Using a Package Manager to Install Advanced Server : 4.4 Configuring a Package Installation

Table of Contents Previous Next