Thread: createdb rftDatabase error and error of standard in must be a tty

createdb rftDatabase error and error of standard in must be a tty

From
r92921004@ntu.edu.tw
Date:
Hi:
   My OS is RHL9. I installed postgresql-8.0.2.   There are the
alterations I remembered. (1) in /etc/init.d/postgresql change   " su
-l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -D $PGDATA -p
/usr/bin/postmaster -o "-i" '-p ${PGPORT}' start  > /dev/null 2>&1" <
/dev/null" to
   " su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -o "-i" -D $PGDATA
-p /usr/bin/postmaster start > /dev/null 2>&1" < /dev/null"
    (2) in /var/lib/pgsql/data/pg_hba.conf append
    " host rftDatabase "username" "host-ip" 255.255.255.255 trust"

(3) su postgres; adduser globus

    When I do "/etc/init.d/postgresql start", it seems fine.
          But there is an error when I do "createdb rftDatabase"

    Here is the error message.

globus@flutefly globus]$ /etc/init.d/postgresql start
Postmaster already running.
[globus@flutefly globus]$ createdb rftDatabase
createdb: could not connect to database template1: FATAL:  Missing or
erroneous pg_hba.conf file, see postmaster log for details


     Then I changed the /var/lib/pgsql/data/pg_hba.conf with     "host
rftDatabase "globus" "140.112.20.168" 255.255.255.255 trust"

     And I can't start the database anymore. Here is the new error
message. [globus@flutefly globus]$ /etc/init.d/postgresql start
Starting postgresql service: standard in must be a tty
                                                           [FAILED]




    I am appreciated any help.
    Thanks a lot.
                                                 James Yu