Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Nov 2004
    Posts
    29

    Default postgresql problem

    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. #2
    Member
    Join Date
    Mar 2007
    Posts
    37

    Default

    Hello

    You can reinstall postgresql.

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

    Greetings

  3. #3
    Member
    Join Date
    Nov 2004
    Posts
    29

    Default

    Quote Originally Posted by alpc360 View Post
    Hello

    You can reinstall postgresql.

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

    Greetings

    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. #4
    Member
    Join Date
    Nov 2004
    Posts
    29

    Default

    no way to fix ?!

  5. #5
    Member
    Join Date
    Apr 2004
    Posts
    220

    Default

    check whether this file exist /var/lib/pgsql/data/pg_hba.conf

    check also its permission and owner, then retry to configure the postgresql
    HalfDedi.com : Half Dedicated Half Price
    We Provide Affordable VPS hosting solution in US and Singapore

  6. #6
    Member
    Join Date
    Nov 2004
    Posts
    29

    Default

    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


Similar Threads & Tags
Similar threads

  1. PostGreSQL - backup problem
    By reltringham in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-22-2007, 08:39 PM
  2. postgresql problem
    By NoAgendas in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-04-2006, 08:48 AM
  3. PostgreSQL problem!
    By geraldo in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-17-2006, 03:34 PM
  4. Problem PostGreSql
    By Aldweb in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-19-2005, 01:28 PM
  5. PostgreSQL Problem...
    By lutronik1 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-23-2005, 11:52 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube