How to install and initialize PostgreSQL in Plesk?

Created:

2016-11-16 12:52:30 UTC

Modified:

2017-08-16 16:14:43 UTC

6

Was this article helpful?


Have more questions?

Submit a request

How to install and initialize PostgreSQL in Plesk?

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 12.0 for Linux

Question

How to install and initialize PostgreSQL support in Plesk?

Answer

In order to install PostgreSQL support, open Plesk > Tools & Settings > Updates and Upgrades > Add and Remove Product Components > PostgreSQL server support

Start PostgreSQL service in Plesk > Tools & Settings > Services Management

To initialize PosgreSQL go to Plesk > Tools & Settings > Database Servers > PosgreSQL > enter Plesk admin password

If PostgreSQL can not be started from Services Management with error:

PLESK_ERROR: Error: Unable to make action: Unable to manage service by pg_manage: Error: Unable to start PostgreSQL. 1 ('--start', 'postgresql')

  1. Run command:

    # service postgresql initdb

  2. Start PostgreSQL manually:

    # service postgresql start

  3. Go to Tools & Settings > Database Servers > PosgreSQL > enter Plesk admin password.

  4. Make sure that /opt/psa/admin/bin/pg_manage is a symbolic link to /usr/local/psa/admin/sbin/wrapper:

    # ls -l /opt/psa/admin/bin/pg_manage
    lrwxrwxrwx 1 root root 15 Aug 26 2015 /opt/psa/admin/bin/pg_manage -> ../sbin/wrapper

    if not then remove this file and create a symbolic link:

    # ln -s /usr/local/psa/admin/sbin/wrapper /opt/psa/admin/bin/pg_manage

Have more questions? Submit a request

3 Comments

  • 0
    Avatar
    Vivo forta

    This procedure has installed PostgreSQL 9.2 on Plesk onyx with centOS 7.3
    How to install PostgreSQL 9.5 or 9.6?

    Edited by Vivo forta
  • 1
    Avatar
    Bulat Tsydenov

    @Vivo, PostgreSQL is installed from the repositories enabled on the server. You can enable any other repository which provides the required version of PostgreSQL and install it the same way.

  • 0
    Avatar
    Vitaly Zhidkov

    @Vivo, you should enable a corresponding repo for it. Check their list at https://yum.postgresql.org/

Please sign in to leave a comment.