Learn about Centmin Mod LEMP Stack today
Become a Member

Error installing PostgreSQL via php upgrade

Discussion in 'Install & Upgrades or Pre-Install Questions' started by MaximilianKohler, Oct 26, 2023.

  1. MaximilianKohler

    MaximilianKohler Member

    201
    8
    18
    Jun 23, 2023
    Ratings:
    +35
    Local Time:
    11:24 AM
    Thanks. I used the "ls -lahrt /root/centminlogs/ | egrep 'php_upgrade'" command and it matches the "sort by last modified" view in Filezilla that I was using. Is the minimal log I provided adequate? Or do I need to compress the full log and upload it?

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,158
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    4:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Full compressed log is probably best for this
     
  3. MaximilianKohler

    MaximilianKohler Member

    201
    8
    18
    Jun 23, 2023
    Ratings:
    +35
    Local Time:
    11:24 AM
    Here you go ****

    I included the past few logs because I noticed they had differences.
     
    Last edited by a moderator: Oct 29, 2023
  4. eva2000

    eva2000 Administrator Staff Member

    55,158
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    4:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Ok I see a typo in my PostgreSQL 15 CentOS 7 routine. Can you check if this file exists with this command
    Code (Text):
    ls -lAh /usr/pgsql-15/bin/postgresql-15-setup
    

    The typos I had was /usr/pgsql-16/bin/postgresql-15-setup
     
  5. MaximilianKohler

    MaximilianKohler Member

    201
    8
    18
    Jun 23, 2023
    Ratings:
    +35
    Local Time:
    11:24 AM
    Code:
    ls -lAh /usr/pgsql-15/bin/postgresql-15-setup
    -rwxr-xr-x 1 root root 9.4K Aug 10 07:23 /usr/pgsql-15/bin/postgresql-15-setup
    
     
  6. MaximilianKohler

    MaximilianKohler Member

    201
    8
    18
    Jun 23, 2023
    Ratings:
    +35
    Local Time:
    11:24 AM
    I saw you updated inc/postgresql.inc, so I ran php upgrade again and it seems to be working. Thanks!

    Extra info:
    I ran "psql" and it says:
    Code:
    psql
    psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "root" does not exist
    
    I tried these https://stackoverflow.com/questions/46142381/psql-fatal-role-root-does-not-exist
    This one works:
    Code:
    sudo -i -u postgres
    psql
    The next one gives an error:
    Code:
    su postgres
    [02:36][postgres@centos7test root]$ psql
    could not change directory to "/root": Permission denied
    psql (15.4)
    Type "help" for help.
    
    postgres=#
    
    Looks like a pw is set or has to be set:
    Code:
    psql -U postgres
    psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  Peer authentication failed for user "postgres"
    
    The -W will prompt for a pw:
    Code:
    psql -U postgres -W
    I don't know what the default is. Someone on stackoverflow says:
    So presumably, the easiest way to set up the user would be:
    Code:
    sudo -i -u postgres
    psql
    ALTER USER postgres PASSWORD 'newpw';
    exit
    psql -U postgres -W
    newpw
    But that seems to only work temporarily. More info:
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,158
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    4:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+