Welcome to Centmin Mod Community
Become a Member

PHP-FPM MariaDB Postgresql

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Qu Don, Sep 29, 2017.

Tags:
  1. Qu Don

    Qu Don Member

    79
    7
    8
    Aug 21, 2017
    Brooklyn, New York
    Ratings:
    +22
    Local Time:
    6:02 PM
    I would like to use Postgresql as database for a new Drupal installation to harness its fulltext search feature.

    Will the Centmin installation of MariaDB affect this in any way or should I just go ahead and download it.


    • Out of curiosity, will we at some point see Drupal and Postgresql integrated in Centmin
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Drupal integration into Centmin Mod would be hard as i don't know drupal well enough to do it properly to the standard of other integrations.

    As to PostgreSQL, Centmin Mod 123.09beta01 has optional install only support - meaning configuration and setup is left to you after Centmin Mod installs it via official PostgreSQL RPM install via optional setting POSTGRESQL='y' set in persistent config file at /etc/centminmod/custom_config.inc + run centmin.sh menu option 5 to recompile PHP server as outlined at https://community.centminmod.com/th...n-option-to-centmin-sh-for-123-09beta01.4490/. It will install latest PostgreSQL 9.6 version these days

    PostgreSQL shouldn't affect MariaDB MySQL. But you should test on a test server first.
     
  3. Qu Don

    Qu Don Member

    79
    7
    8
    Aug 21, 2017
    Brooklyn, New York
    Ratings:
    +22
    Local Time:
    6:02 PM
    Went ahead and downloaded but hit a snag. Not sure where its coming from. Any help will be appreciated

    error.JPG
     
  4. Qu Don

    Qu Don Member

    79
    7
    8
    Aug 21, 2017
    Brooklyn, New York
    Ratings:
    +22
    Local Time:
    6:02 PM
    Ah looks like I posted just as you were also about to post. I'll start with a clean Centmin install and enabling Postgres in custom config before I set up vhost and see how it goes.

    According to last section of this page https://www.drupal.org/docs/7/install/step-2-create-the-database I just had to set up the user and create database, with Mariadb i just went ahead and created user and database so I assumed I hope Postgres works when when I enable it. Will keep you posted
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    There maybe more steps for PostgreSQL you have to do from https://www.postgresql.org/download/linux/redhat/ you need to initialize the database too and enable automatic restarts. Ignore any yum tasks on that page as Centmin Mod does that for you. So

     
  6. Qu Don

    Qu Don Member

    79
    7
    8
    Aug 21, 2017
    Brooklyn, New York
    Ratings:
    +22
    Local Time:
    6:02 PM
    Thanks
     
  7. Qu Don

    Qu Don Member

    79
    7
    8
    Aug 21, 2017
    Brooklyn, New York
    Ratings:
    +22
    Local Time:
    6:02 PM
    I dont know if I have been doing the right thing but this is my custom_config_inc after which I used option 5 to upgrade and downgrade but Postgresql doesnt appear after Php recompile (up or downgrade)

    Code:
    NGINX_PAGESPEED=y
    NGINX_ZLIBCUSTOM='y'
    ORESTY_LUANGINX=n
    NGINX_XSLT='n'
    NGINX_LIBBROTLI='y'
    NGXDYNAMIC_XSLT='n'
    NGXDYNAMIC_IMAGEFILTER='y'
    NGXDYNAMIC_GEOIP='y'
    NGXDYNAMIC_STREAM='y'
    NGXDYNAMIC_HEADERSMORE='y'
    NGXDYNAMIC_SETMISC='y'
    NGXDYNAMIC_ECHO='y'
    NGXDYNAMIC_SRCCACHE='y'
    NGXDYNAMIC_MEMC='y'
    NGXDYNAMIC_REDISTWO='y'
    NGXDYNAMIC_NGXPAGESPEED='y'
    NGXDYNAMIC_BROTLI='y'
    PHPMSSQL='y'
    PHP_PGO='y'
    PHP_PGO_CENTOSSIX='y'
    NGINX_DEVTOOLSETGCC='y'
    GENERAL_DEVTOOLSETGCC='y'
    CLANG='n'
    LIBRESSL_SWITCH='n'
    NGX_GSPLITDWARF='y'
    PHP_GSPLITDWARF='y'
    NGX_LDGOLD='y'
    LETSENCRYPT_DETECT='y'
    POSTGRESQL='y'
    
     
  8. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what version of PHP ?

    Every centmin.sh menu option has a full server log created with time stamped file name at /root/centminlogs. You can check that specific error log for clues or copy and paste log contents and post to pastebin.com or gist.github.com for sharing.

    To troubleshoot, you need to check the the php upgrade logs at /root/centminlogs and instructions under Sharing logs and errors heading for using Pastebin.com or Gists to share a sanitised version of the contents of the nginx_upgrade and php_upgrade logs. You can see full details at How to troubleshoot Centmin Mod initial install issues

    if you type this command it lists all logs in date ascending order so latest log at bottom
    Code (Text):
    ls -lArt /root/centminlogs

    so copy the entire contents of latest php_upgrade log to gist.github.com or pastebin.com

    you can use grep to filter the logs, i.e. look for nginx_upgrade or php in log name
    Code (Text):
    ls -lahrt /root/centminlogs/ | egrep 'nginx_upgrade|php_upgrade'
    

    Code (Text):
    ls -lahrt /root/centminlogs/ | egrep 'nginx_upgrade|php_upgrade'
    -rw-r--r--  1 root root  2.6M Oct  3 03:48 centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log
    -rw-r--r--  1 root root  664K Oct 12 09:24 centminmod_1.2.3-eva2000.09.001_121016-092406_nginx_upgrade.log
    

    So the last php upgrade log was named centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log and located at /root/centminlogs/centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log
    then use cat command to output the contents of that log.

    clear your ssh window buffer/screen and type
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log

    then select and copy and paste output to pastebin.com or gist.github.com file to share. If your SSH client's scroll buffer isn't large enough using cat might not output the entire log file contents, so you may need to download the log and use local text editor to open and copy and paste.

    so only need content of a specific log, in this case most recent php_upgrade.log logs
     
  9. Qu Don

    Qu Don Member

    79
    7
    8
    Aug 21, 2017
    Brooklyn, New York
    Ratings:
    +22
    Local Time:
    6:02 PM
  10. Qu Don

    Qu Don Member

    79
    7
    8
    Aug 21, 2017
    Brooklyn, New York
    Ratings:
    +22
    Local Time:
    6:02 PM
    I'll just try a fresh install again.
     
  11. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You entered PHP version number incorrectly has a few non-english characters after it
    Code (Text):
    ----------------------------------------------------------------
    Install which version of PHP? (version i.e. 7.1.10, 7.0.18, NGDEBUG)
    PHP 7.x/7.1.x is GA Stable but still may have broken PHP extensions.
    NGDEBUG is PHP 7.2.0 dev builds minus incompatible PHP extensions
    ----------------------------------------------------------------
    Enter PHP Version number you want to upgrade/downgrade to: 7.23[K.0
    ----------------------------------------------------------------
    

    Which forced Centmin Mod to download php 7.2 developer branch instead via git clone
    Code (Text):
    ----------------------------------------------------------------
    [1;33;40mDownloading PHP 7.2 from https://git.php.net/repository/php-src.git
    (B[mCloning into 'php-7.2.0'...
    Checking out files:  43% (8560/19522)
    

    Try sticking with PHP 7.1.9 stable for now or enter correct PHP 7.2 version number = 7.2.0RC3
     
  12. Qu Don

    Qu Don Member

    79
    7
    8
    Aug 21, 2017
    Brooklyn, New York
    Ratings:
    +22
    Local Time:
    6:02 PM
    I went by the literal definition of upgrade, I could have stared at those logs for a year and still not have noticed. You helped me learn something new. Thanks
     
  13. Qu Don

    Qu Don Member

    79
    7
    8
    Aug 21, 2017
    Brooklyn, New York
    Ratings:
    +22
    Local Time:
    6:02 PM
    It works.!

    However does the PHP/Postgres recompile come with pdo_pgsql or php7.0 pgsql module? Do I have to make an entry in b_customphp.ini or custom_config_inc and then recompile to have it autoload?

    shit.JPG
     
  14. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    see https://community.centminmod.com/th...n-option-to-centmin-sh-for-123-09beta01.4490/
    in your case it's PostgreSQL 9.6 server and pdo-pgsql PHP driver extension get automatically installed - you can check loaded PHP extensions using command
    Code (Text):
    php -m
    
     
  15. Qu Don

    Qu Don Member

    79
    7
    8
    Aug 21, 2017
    Brooklyn, New York
    Ratings:
    +22
    Local Time:
    6:02 PM
    Awesome Sauce..!!