You can use an existing Postgres server (version 9.3 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:This section provides information about configuring an existing Postgres server for a PEM server installation. Please note that the steps that follow should be considered guidelines only; the actual steps required to configure your Postgres installation will vary depending on the configuration of your Postgres server.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:220.127.116.11 Preparing the Postgres Server
• Ensure that the Postgres server contains an installation of the sslutils extension. For more information, see Section 18.104.22.168.1.
• After preparing the server, you can use the PEM server installer to install PEM on the existing Postgres server. For details, see Section 22.214.171.124.126.96.36.199.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 SRC- SSL Utils 1.2 package. When the download completes, extract the file, and copy it into the Postgres installation directory.
2. Set the value of PATH so it can locate the pg_config program:export PATH=$PATH:/opt/postgres_inst_dir/9.x/bin/
3. Then, use yum to install the sslutil dependencies:
4. Move into the sslutils folder, and enter: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 an Advanced Server installer, you must use Visual Studio to build sslutils.While specific details of the installation process will vary by platform and compiler, the basic steps are the same. You must:
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
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. The sslutils directory will contain the following files:Copy the .dll libraries and .sql files into place:A service script allows the PEM server to start, stop or restart the server if necessary when performing configuration management, certificate management, or other administrative tasks.When you install a PostgreSQL or an Advanced Server database using an installer from EnterpriseDB (such as the PostgreSQL one-click installer), the installer will create a service script, or on Windows, register the service for you. If you have built the Postgres installation from source, you are required to manually create a service script.While the PEM server installer checks for the presence of the service script, it does not check the integrity of the script itself; for PEM to function properly, you must ensure that the service script works as expected.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 for Linux in Section 7 Linux Service Script (Sample). For information about customizing a Postgres service, visit: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:pg_ctl register [-N service_name] [-U user_name]
[-P password] [-D data_directory]service_name specifies the name of the Postgres cluster.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:After preparing the existing Postgres server, invoke the PEM server installer. Assume superuser (or, on Windows, Administrative) privileges and navigate into the directory that contains the installer. Then, invoke the installer with the command:./pem_server-7.x.x-x-platform.extThe installer displays a Welcome dialog (shown in Figure 3.31).Click Next to continue to the License Agreement dialog.Carefully review the license agreement (see Figure 3.32) before highlighting the appropriate radio button and accepting the agreement; click Next to continue to the Installation Directory dialog.Use the Installation Directory dialog (shown in Figure 3.33) 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.34) to specify an installation type. Select:
• Web Services and Database if both the Postgres server and the PEM-HTTPD 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 a PEM-HTTPD installation, and upgrade or install PEM-HTTPD if necessary.
• Web Services if only the PEM-HTTPD server will reside on the current host. See 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 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.35) to select a backend database for the PEM server:
• Select the PostgreSQL 9.6 (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 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 .If you selected Web Services and Database on the Advanced options dialog, the installation wizard will check the current host for an existing PEM-HTTPD installation, and upgrade or install the service as needed.If you selected Database on the Advanced options dialog, the Database Server Installation Details dialog opens (shown in Figure 3.36).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.
• Enter the name of the service script for the Postgres server in the Service Name field.Click Next to continue.Use the Network Details dialog (Figure 3.37) 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.When you've added the Network address, click Next to continue to the Agent Details dialog.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 (see Figure 3.38).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.Click Back to modify any of the options previously selected, or Next to continue with the installation.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.41) 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.42).
• Modify the pg_hba.conf file on the Postgres server host to allow connections between the hosts.
• Invoke the PEM server installer on the host of the PEM-HTTPD server. See for more information about installing PEM-HTTPD.