Puneet Lakhina wrote:
hi amit,
On 14 Apr 2006 18:33:10 -0000, Amit amit_karia99@rediffmail.com wrote:
Hi All,
I have installed posgresql 8.1 database in my system(RHEL3) . It was installed perfectly and i also compiled it with gmake and gmake install later. i added user posgres for creating database and made him owner of /usr/local/pgsql directory . I created a db called db1 with initdb -D and createdb command and all the datas were located at /usr/local/pgsql/data .but when i tried to create a user or start teh database with psql .. it throws an error saying server is not running locally.. three questions
You need to start the database with postmaster.. and in case you need to connect from remote machines you need to start postmaster with -i option
$postmaster -i -D /usr/local/pgsql/data & D is to specify the data directory & to run it in the background
Now you will need to edit /usr/local/pgsql/data/pg_hba.conf This file contains information on which users from which machine are allowed to connect to which databases and what postgres sql users role they assume. The file contains all the information you require for editing the file.
- what port does posgresql listen?
5432 by default... u can change it in /usr/local/pgsql/data/postgres.conf
- What services i need to start?
postmaster only AFAIK
-- Puneet
Dear Amit,
Since you're on an rhel system, you could use the rpms provided by postgresql.org, as they integrate with /etc/init.d
If you don't want rpms, u can just get the initscript /etc/init.d/postgresql and integrate it with chkconfig.
Regards Rajeev