The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

postgresql problem

Discussion in 'General Discussion' started by persiasoft, Aug 23, 2008.

  1. persiasoft

    persiasoft Active Member

    Joined:
    Nov 15, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    i cant install postgresql with /scripts/installpostgresql


    Installed: postgresql.i386 0:7.4.19-1.el4_6.1 postgresql-devel.i386 0:7.4.19-1.el4_6.1 postgresql-server.i386 0:7.4.19-1.el4_6.1
    Complete!
    Stopping postgresql service: [FAILED]
    postmaster: no process killed
    postmaster: no process killed
    Initializing database: [FAILED]
    Starting postgresql service: [FAILED]
    You should now configure postgresql from WHM!
    You should now configure postgresql from WHM!
    You should now configure postgresql from WHM!
    You should now configure postgresql from WHM!



    after this , i went to WHM to config the postgresql , set the password , but when i wanna install config , the error contain the page :

    Failed to update /var/lib/pgsql/data/pg_hba.conf: No such file or directory
    Failed to update /var/lib/pgsql/data/pg_hba.conf: No such file or directory

    well , i've created this file , and retried " install config" with success.

    now i cant start postgresql :

    service postgresql start
    Initializing database: [FAILED]
    Starting postgresql service: [FAILED]

    any idea ?
    im running on WHM 11.23.2 cPanel 11.23.4-R26138
     
  2. alpc360

    alpc360 Active Member

    Joined:
    Mar 30, 2007
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Hello

    You can reinstall postgresql.

    yum remove postgresql postgresql-devel postgresql-server -y
    and /scripts/installpostgres

    Greetings
     
  3. persiasoft

    persiasoft Active Member

    Joined:
    Nov 15, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1

    nothing changed !

    Installed: postgresql.i386 0:7.4.19-1.el4_6.1 postgresql-devel.i386 0:7.4.19-1.e l4_6.1 postgresql-server.i386 0:7.4.19-1.el4_6.1
    Complete!
    Stopping postgresql service: [FAILED]
    postmaster: no process killed
    postmaster: no process killed
    Initializing database: [FAILED]
    Starting postgresql service: [FAILED]
    You should now configure postgresql from WHM!
    You should now configure postgresql from WHM!
    You should now configure postgresql from WHM!
    You should now configure postgresql from WHM!




    installing config :


    Postgres Config
    Install Postgres Config
    Failed to update /var/lib/pgsql/data/pg_hba.conf: No such file or directory
    Failed to update /var/lib/pgsql/data/pg_hba.conf: No such file or directory


    i think the path of pg_hba.conf is invalid in cpanel . because the pg_hba.conf is exist on /var/lib/pgsql/ directory

    [/var/lib/pgsql]# ll
    total 40K
    drwx------ 4 postgres postgres 4.0K Aug 24 13:36 ./
    drwxr-xr-x 20 root root 4.0K Aug 23 19:53 ../
    drwx------ 2 postgres postgres 4.0K Jan 14 2008 backups/
    -rw------- 1 postgres postgres 301 Aug 23 20:25 .bash_history
    -rw-r--r-- 1 postgres postgres 107 Jan 14 2008 .bash_profile
    drwx------ 2 postgres postgres 4.0K Aug 24 13:42 data/
    -rw-r--r-- 1 postgres postgres 147 Aug 24 13:42 initdb.i18n
    -rw-r--r-- 1 postgres postgres 63 Aug 24 13:42 pg_hba.conf
    -rw------- 1 postgres wheel 25 Aug 24 13:37 .pgpass


    but its not in data directory !
    also if you create this file under data directory initialization of database will fail ! it says that the data directory isnt empty ....!

    any idea ?
     
  4. persiasoft

    persiasoft Active Member

    Joined:
    Nov 15, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    no way to fix ?!
     
  5. markhard

    markhard Well-Known Member

    Joined:
    Apr 22, 2004
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    16
    check whether this file exist /var/lib/pgsql/data/pg_hba.conf

    check also its permission and owner, then retry to configure the postgresql
     
  6. persiasoft

    persiasoft Active Member

    Joined:
    Nov 15, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    i mentioned in my post first time , that i did it !
    but it doesnt help , because initdb cannot initialize the database folder thats not empty !!

    so i create new directory /var/lib/pgsql/db , and ran :

    su -l postgres -c initdb -D /var/lib/pgsql/db

    every thing was ok , then ran :

    /usr/bin/pg_ctl -D /var/lib/pgsql/db -l logfile start
    postmaster successfully started

    :D
     
Loading...

Share This Page