Other Resources
Postgres as a Service
Deploy a Managed Postgres Cluster in Minutes! Enterprise-ready and Oracle compatible.
![]() |
![]() |
![]() |
3 Installing Postgres Enterprise Manager™ : 3.3 Installing the PEM Server and Apache/PHP on Separate Hosts
To use separate hosts for the PEM server backend database and the Apache/PHP server you must:
1. Invoke the PEM server installer on the host of the Postgres server that will contain the pem database. During the installation, select the Database option on the Advanced options dialog, and provide connection information for the Postgres server.
2. Modify the pg_hba.conf file of the Postgres installation on which the PEM server (and pem database) resides, allowing connections from the host of the Apache/PHP server.
3. Invoke the PEM server installer on the host of the Apache/PHP server, selecting the Web Services option on the Installation Type dialog.Carefully review the license agreement before highlighting the appropriate radio button and accepting the agreement; click Next to continue to the Registration required… dialog (shown in Figure 3.18).The Registration required… dialog (shown in Figure 3.19) asks if you have already signed up for an EnterpriseDB user account; select the appropriate option before clicking Next.If you have not signed up for an EnterpriseDB user account, clicking Next will open a web browser, displaying the EnterpriseDB User Login/Registration page of the EnterpriseDB website.If you have an EnterpriseDB user account, click Next to continue to the EnterpriseDB User Account Information dialog (shown in Figure 3.20).After providing your registered Email address and Password, click Next to continue to the Installation Directory dialog (shown in Figure 3.21).Use fields on the Installation Directory dialog (shown in Figure 3.21) to specify the directory in which the PEM server will reside, and to access the Advanced options dialog:
• By default, the PEM server is installed in the /opt/PEM directory on Linux or in C:\Program Files\PEM on Windows. Accept the default location, or use the Installation Directory field to open a browser dialog and select the directory in which the PEM server will be installed.
• To install the PEM server and Apache/PHP on separate hosts, you must use the Advanced options dialog to specify the installation type (Web Services or Database). Select the Show advanced options check box to instruct the installer to include the Advanced options dialog in the installation process.Use the radio buttons on the Advanced options dialog to specify the component or components that you would like to install:
• Select Web Services and Database to indicate that the Postgres server and Apache/PHP will both reside on the current host. If you select the Web Services and Database option, the PEM server installer will allow you to specify which Postgres server you wish to use for the PEM server before checking for a Apache/PHP installation.
• Select Web Services to install Apache/PHP on the current host, while using a Postgres database server that resides on another host to host the PEM server and pem database.Please note: you must complete the PEM server installation process on the host of the PEM server (and pem backend database), selecting Database on the Advanced options dialog, and modifying the connection properties of the pg_hba.conf file on the PEM server before using the Web Services option to install Apache/PHP.
• Select Database to use an existing Postgres server (version 9.0 or greater), or to install only the database server that is distributed with the PEM server installer.This option invokes the installation steps documented in Section 3.1.2.1, Specifying a Database Host.After selecting an installation option, click Next to continue.Selecting the Database option on the Advanced options dialog (Figure 3.23) allows you to specify connection information for the host on which the PEM server backend database (named pem) will reside.Use the drop-down listbox on the Database Server Selection dialog to select a host for the PEM server backend database. You can:
• Select a host from existing Postgres installations that reside on the current host. Please note that you may be required to add the sslutils package to your installation.
• Select the PostgreSQL 9.3 (Packaged - 32 bit) option to install the Postgres server that is distributed with the PEM server installer.
• Select Other Database Server to specify connection information for a Postgres server that was not installed using a one-click graphical installer from EnterpriseDB.For information about the software pre-requisites for the PEM server database host, please see Section 3.1.3.1, Preparing the Postgres Server.Click Next to continue.If the PEM server will reside on an existing Postgres server, the Database Server Installation Details dialog shown in Figure 3.25 opens.The information required on the Database Server Installation Details dialog may vary; the PEM server installer will ask you to provide only the information about the selected installation that it cannot locate:
•
• Specify the password associated with that user in the Password field.Click Next to continue.If prompted, provide the system password for the service account under which the PEM agent will run, and click Next to continue to the Network Details dialog.Use the Network Details dialog to specify the CIDR-style network address from which PEM agents will connect to the server (the client-side address). The specified address will be added to the server's pg_hba.conf file.You can also specify additional network addresses by manually adding entries to the pg_hba.conf file on the PostgreSQL server; for more information, see Section 8.1.Accept the default (specifying the localhost), or specify a Network address range, and click Next to continue to the Agent Details dialog (shown in Figure 3.27).The PEM server installer will install a PEM agent on the host on which the server resides, to monitor the server and provide alert processing and garbage collection services. A certificate will also be installed in the location specified in the Agent certificate path field.You can enter an alternate description or an alternate agent certificate path for the PEM agent, or accept the defaults. Click Next to continue to the Ready to Install dialog (shown in Figure 3.28).Click Back to modify any of the options previously selected, or Next to proceed with the installation (see Figure 3.29).During the installation process, the installer will copy files to the system, and set up the PEM server's backend database. A popup dialog opens (shown in Figure 3.30) confirming that the pem database has been created and configured.Click OK to acknowledge that the pem database has been created, and continue to the Completed… dialog (shown in Figure 3.31).3.3.1.1 Installing Web ServicesSelecting the Web Services radio button on the Advanced options dialog (Figure 3.32) instructs the PEM server installer to either install Apache/PHP on the current host or update an existing Apache/PHP installation.
• Modified the pg_hba.conf file on the PEM server database host to allow connections from the Apache/PHP host, and restarted the database server. For more information about modifying the pg_hba.conf file, see Section 8.1.When you select the Web Services option and click Next, the PEM server installer will check the current host for an existing Apache/PHP installation. If the installer does not locate an installation, the installer will invoke the Apache/PHP Setup Wizard (see Figure 3.33).Follow the onscreen instructions of the Apache/PHP Setup Wizard. When the wizard completes the installation, click Finish to open the Database Server Installation Details dialog (shown in Figure 3.34).Use the fields on the Database Server Installation Details dialog to provide connection information for the Postgres installation that is hosting the PEM server installation:
•
• Enter the password associated with the Postgres superuser in the Password field.Click Next to continue. Before completing the PEM server installation, the installer will contact the database host. The pg_hba.conf file on the PEM database host must be configured to accept connections from the host of the Apache server and the firewall must allow a connection for the installation to continue.You can use an existing Postgres server (version 9.0 or later) to host the PEM server and the pem database. Postgres installers and pre-requisite software extensions are freely available from the EnterpriseDB website at:The following versions of Postgres are pre-configured to contain the sslutils extension and a service script; no additional preparation is required to use the following Postgres versions as a PEM backend database server:3.3.2.1 Preparing the Postgres ServerBefore installing the PEM server on an existing Postgres server, you must ensure that the Postgres server contains an installation of the sslutils extension.3.3.2.1.1 Installing the sslutils ExtensionThe Postgres server on which the PEM server will reside must contain the sslutils extension. The sslutils package is freely available for download from the EnterpriseDB website at:When the web page opens, select the link for the SSL Utils 3.0.0 package. When the download completes, extract the file, and copy it into the Postgres installation directory.
1.
2.
3. Move into the sslutils folder, and enter:
4. Remember: You are not required to manually add the sslutils extension when using the following Postgres installations:sslutils must be built with the same compiler that was used to compile the backend Postgres installation. If you are using a backend Postgres database that was installed on a Windows platform using a PostgreSQL one-click installer (from EnterpriseDB) or a Postgres Plus Advanced Server installer, you must use Visual Studio to build sslutils. If you are using:
1. Copy the sslutils package to the Postgres installation directory.
2. Open the command line of the appropriate compiler, and navigate into the sslutils directory.
3. Use the following commands to build sslutils:SET USE_PGXS=1
SET GETTEXTPATH=path_to_gettext
SET OPENSSLPATH=path_to_openssl
SET PGPATH=path_to_pg_installation_dir
SET ARCH=x86
REM Set ARCH x64 for 64 bit
msbuild sslutils.proj /p:Configuration=Releasepath_to_gettext specifies the location of the GETTEXT library and header files.path_to_openssl specifies the location of the openssl library and header files.path_to_pg_installation_dir specifies the location of the Postgres installation.
4. Copy the compiled sslutils files to the appropriate directory for your installation. When the build process completes, the sslutils directory will contain the following files:On Linux, the service script must reside in the /etc/init.d directory. The service script must be able to start, stop and restart the database server. Service scripts are platform-specific; you can find a sample service script in Appendix A, Linux Service Script (Sample), and information about creating a Postgres service and writing a custom Postgres service script at:If you are using Windows to host the PEM backend database, you must register the name of the Postgres server with the Windows service manager. If you are using a Postgres server that was created using an EnterpriseDB installer, the service will be registered automatically. If you are manually building the installation, you can use the register clause of the Postgres pg_ctl command to register the service. The syntax of the command is:user_name specifies the name of an operating system user with sufficient privileges to access the Postgres installation directory and start the Postgres service.password specifies the operating system password associated with the user.data_directory specifies the location of the Postgres data directory.For more information about using the pg_ctl command and the available command options, see the Postgres core documentation, available at:The installer displays a Welcome dialog (shown in Figure 3.35).Carefully review the license agreement before highlighting the appropriate radio button and accepting the agreement; click Next to continue to the Registration required… dialog (shown in Figure 3.36).The Registration required… dialog asks if you have already signed up for an EnterpriseDB user account; select the appropriate option before clicking Next.If you have not signed up for an EnterpriseDB user account, click Next to open a web browser, displaying the EnterpriseDB User Login/Registration page of the EnterpriseDB website.If you have an EnterpriseDB user account, click Next to continue to the EnterpriseDB User Account Information dialog (shown in Figure 3.38).After providing your registered Email address and Password, click Next to continue to the Installation Directory dialog (shown in Figure 3.39).Use the Installation Directory dialog (shown in Figure 3.39) to specify the location of the PEM server, and access the Advanced options dialog:
• Use the Installation Directory field to open a browser dialog and select the directory in which the PEM server will be installed.
• If you are installing the PEM server on an existing server, check the box next to Show advanced options to instruct the installer to include the Advanced options dialog in the installation process.Click Next to continue.Use the radio buttons on the Advanced options dialog (shown in Figure 3.40) to specify an installation type. Select:
• Web Services and Database if both the Postgres server and the Apache/PHP server will reside on the current host. This option is valid if you are using an existing Postgres server to host the PEM server, or using the PEM server installer to install the Postgres server on which the PEM server will reside.If you select Web Services and Database, the PEM server installer will check the current host for an Apache/PHP installation, and upgrade or install Apache/PHP if necessary.
• Web Services if only the Apache/PHP server will reside on the current host. See Section 3.1.2.2 for more information about invoking this option.
• Database if you are installing only the PEM server (and creating the pem backend database) on the current host. This option is valid if you are using an existing Postgres server to host the PEM server, or using the PEM server installer to install the PostgreSQL 9.3 server on which PEM will reside.After selecting an installation option, click Next to continue.Use the drop-down listbox on the Database Server Selection dialog (Figure 3.41) to select a Postgres backend database for the PEM server:
• Select the PostgreSQL 9.3 (Packaged) option to instruct the installation wizard to install and use the PostgreSQL server that is packaged with the PEM server installer.
• Select Other Database Server to instruct the PEM server installer to use a Postgres database (version 9.0 or later) that was installed from a source other than an EnterpriseDB installer (i.e. from an rpm, or built from source).Note that the selected database server must include an installation of the sslutils contrib module, and have a startup script (on Linux) or a registered service (on Windows). For information about Preparing the Postgres Server, please see Section 3.1.3.1.If you selected Web Services and Database on the Advanced options dialog, the installation wizard will check the current host for an existing Apache/PHP installation, and upgrade or install the service as needed.If you selected Database on the Advanced options dialog, the Database Server Installation Details dialog (shown in Figure 3.42) opens.Use the fields on the Database Server Installation Details dialog to describe the connection to the Postgres server that will host the PEM server:
• Enter the name of a database superuser in the User field.
• Enter the password associated with the superuser in the Password field.
• Click Next to continue.Use the Network Details dialog (Figure 3.43) to specify the CIDR-style network address from which the PEM agents will connect to the server (the client-side address). The specified address will be added to the server's pg_hba.conf file.You can specify additional network addresses by manually adding entries to the pg_hba.conf file on the PostgreSQL server if required, using the initial entry as a template. For more information about modifying the pg_hba.conf file, see Section 8.1.When you've added the Network address, click Next to continue to the Agent Details dialog (shown in Figure 3.44).The PEM server installer will install a PEM agent to the host on which the server resides, to monitor the server and provide alert processing and garbage collection services. A certificate will also be installed in the location specified in the Agent certificate path field.You can enter an alternate description or an alternate agent certificate path for the PEM agent, or accept the defaults. Click Next to continue to the Ready to Install dialog (shown in Figure 3.45).Click Back to modify any of the options previously selected, or Next to continue with the installation (see Figure 3.46).During the installation process, the installer will copy files to the system, and set up the PEM server's backend database. A popup dialog opens (shown in Figure 3.47) confirming that the pem database has been created and configured.Click OK to acknowledge that the pem database has been created, and continue to the Completed… dialog (shown in Figure 3.48).
•
• Invoke the PEM server installer on the host of the Apache/PHP server. See Section 3.1.2.2 for more information about installing Apache/PHP.3.3.3 Using the PEM Web ClientTo open the PEM web client, navigate through the Applications menu (on Linux) or Start menu (on Windows) to the Postgres Enterprise Manager sub-menu, and select PEM Web Client.Use the fields on the PEM Web Login window (shown in Figure 3.50) to authenticate yourself with the PEM server:
• Provide the name of a Postgres user in the Username field.
• Provide the password associated with the user in the Password field.
• Check the box next to Show system objects? to display the contents, properties and statistics of system databases (such as template0) and system schemas (such as pg_catalog).Click the Login button to connect to the PEM server.If you are using a PEM Trial Licence, the Product Registration dialog (Figure 3.51) will open, and offer you the opportunity to register your copy of PEM.Enter the Product Key, or press Cancel to connect using available time on the Trial Licence. The PEM web client opens (as shown in Figure 3.52).The PEM web client displays information gathered by the PEM agents, rather than displaying a current view from system catalogs on the monitored servers (like the full-featured PEM client). To access online information about using the PEM web client, select Help Contents from the PEM Help menu (see Figure 3.53).
3 Installing Postgres Enterprise Manager™ : 3.3 Installing the PEM Server and Apache/PHP on Separate Hosts
![]() |
![]() |
![]() |