Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

installpostgres script never runs as intended

Discussion in 'Database Discussion' started by SuperSajuuk, Jan 13, 2018.

Tags:
  1. SuperSajuuk

    SuperSajuuk Member

    Joined:
    Apr 10, 2016
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Hi there.

    I've been looking at this problem for at least 2 hours, but cannot find a solution. I hope a member of cPanel staff can assist.

    I have been trying repeatedly to run the /usr/local/cpanel/scripts/installpostgres script. I needed to edit the file in order for it to be pointed to the correct rh-postgres files, as they would always return "no such package", but no matter what, the script always seems to fail with "Failed to determine postgresql data directory", which makes no sense to me.

    In addition, one of the scripts in the install file -- specifically Cpanel::SafeRun::Simple::saferunnoerror('/usr/local/cpanel/scripts/restartsrv_postgres'); -- always appears to result in a failure of the script, as this being "uncommented" sends the installer to "The PostgreSQL installation failed". Commenting it causes the installer to head to "this install succeeded", but the appropriate entries in WHM/cPanel are never revealed, suggesting the installation is still failing.

    I'm not sure what else I should be doing at this point, as everything I've tried does not work, and I'm following the instructions as outlined in the cPanel documentation.

    Any assistance would be greatly appreciated so I can take advantage of PostgreSQL for my Python-based discord moderation bot.

    Cheers,
    - Sajuuk
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    We don't support manual modifications to the PostgreSQL installation script. Is there a specific version of PostgreSQL you are attempting to install?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. SuperSajuuk

    SuperSajuuk Member

    Joined:
    Apr 10, 2016
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Hi

    I was forced to edit the script, because rh-postgresql could not be found in any of the default repositories provided for CentOS 7.4, and the script msde no attempt to add an appropriate red hat repository for the files it wanted. The only publicly available software collection for the latest version of postgresql, 9.5, specifically formats the package with -95 in the name, thus centos 7.4 would not ever install the packages if they were left as is.

    If you can provide a way that allows me to install the latest postgresql vesion, 9.5, snd support for the appropriate cpanel and whm links, it would be much appreciated.

    Thanks
     
    #3 SuperSajuuk, Jan 18, 2018
    Last edited: Jan 18, 2018
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. SuperSajuuk

    SuperSajuuk Member

    Joined:
    Apr 10, 2016
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Hi. I had a look at that thread, but that still assumes the installpostgres script actually installs and I think I've worked out where the problem is...

    ( $status, $message ) = Whostmgr::Postgres::update_config();

    I think this is the line that "fails" because Whostmgr (aka WHM) is making an assumption about where postgres has been installed. I will try to symlink the folder it wants to where it really exists and see if that makes it work, but as you said, this is likely going into unsupported territory.

    I will be in full support of proper pgSQL support for cPanel, it's kinda bad that cPanel still does not properly support alternate database solutions without doing modifications.
     
  6. SuperSajuuk

    SuperSajuuk Member

    Joined:
    Apr 10, 2016
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Hi.

    I eventually managed to get PostgreSQL installed and detected by cPanel/WHM. It looks like it was installing pgSQL from non-base CentOS repo, which is apparently the one that WHM demands to access. I can probably update the PostgreSQL version using the link you gave before at a later time, if needed.

    Thanks!
     
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice