From: | "Erik S(dot) Peterson" <erikp(at)tricomsg(dot)com> |
---|---|
To: | "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Help please: postgres on linux |
Date: | 1998-07-16 04:01:24 |
Message-ID: | 01BDB044.7DE2C440.erikp@tricomsg.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
I'm having difficuly getting postgres running on RedHat 5.1 Linux. Below is a list of command sequences and the errors being reported.
Thanks for your help!
Erik
==================================================
[postgres(at)linny lib]$ whoami
postgres
[postgres(at)linny lib]$ pwd
/var/lib
[postgres(at)linny lib]$ postgres -D pgsql
---debug info---
Quiet = f
Noversion = f
timings = f
dates = Normal
bufsize = 64
sortmem = 512
query echo = f
DatabaseName = [postgres]
----------------
InitPostgres()..
FATAL 1: Database postgres does not exist in pg_database
FATAL 1: Database postgres does not exist in pg_database
======================
[postgres(at)linny pgsql]$ nohup postmaster > server.log 2>&1 &
[1] 1517
[postgres(at)linny pgsql]$ postgres -D pgsql
---debug info---
Quiet = f
Noversion = f
timings = f
dates = Normal
bufsize = 64
sortmem = 512
query echo = f
DatabaseName = [postgres]
----------------
InitPostgres()..
FATAL 1: Database system does not exist. PGDATA directory 'pgsql' not found.
Normally, you create a database system by running initdb.
FATAL 1: Database system does not exist. PGDATA directory 'pgsql' not found.
Normally, you create a database system by running initdb.
[1]+ Exit 2 nohup postmaster >server.log 2>&1
=====================
Try init db
[postgres(at)linny pgsql]$ initdb --pglib=/usr/lib --pgdata=/var/lib/pgsql
initdb: using /usr/lib/local1_template1.bki.source as input to create the templa
te database.
initdb: using /usr/lib/global1.bki.source as input to create the global classes.
initdb: using /usr/lib/pg_hba.conf.sample as the host-based authentication contr
ol file.
We are initializing the database system with username postgres (uid=100).
This user will own all the files and must also own the server process.
initdb: error: File /var/lib/pgsql/PG_VERSION already exists.
This probably means initdb has already been run and the
database system already exists.
If you want to create a new database system, either remove
the /var/lib/pgsql directory or run initdb with a --pgdata option
other than /var/lib/pgsql.
===============
init db in another directory
[postgres(at)linny pgsql]$ initdb --pglib=/usr/lib --pgdata=/var/lib/pgsql/data
initdb: using /usr/lib/local1_template1.bki.source as input to create the templa
te database.
initdb: using /usr/lib/global1.bki.source as input to create the global classes.
initdb: using /usr/lib/pg_hba.conf.sample as the host-based authentication contr
ol file.
We are initializing the database system with username postgres (uid=100).
This user will own all the files and must also own the server process.
Creating Postgres database system directory /var/lib/pgsql/data/base
initdb: creating template database in /var/lib/pgsql/data/base/template1
Running: postgres -boot -C -F -D/var/lib/pgsql/data -Q template1
Creating global classes in /base
Running: postgres -boot -C -F -D/var/lib/pgsql/data -Q template1
Adding template1 database to pg_database...
Running: postgres -boot -C -F -D/var/lib/pgsql/data -Q template1 < /tmp/create.1
550
vacuuming template1
creating public pg_user view
loading pg_description
=======================
start postmaster and check server.log
[postgres(at)linny pgsql]$ nohup postmaster -D /var/lib/pgsql/data > server.log 2>
[1] 1609
[postgres(at)linny pgsql]$ cat server.log
FATAL: StreamServerPort: bind() failed: errno=98
Is another postmaster already running on that port?
If not, remove socket node (/tmp/.s.PGSQL.<portnr>)and retry.
postmaster: cannot create UNIX stream port
[1]+ Exit 1 nohup postmaster -D /var/lib/pgsql/data >server.lo
g 2>&1
=====================
remove socket node
[postgres(at)linny pgsql]$ rm /tmp/.s.PGSQL.5432
=======================
restart postmaster and try psql and postgres
[postgres(at)linny pgsql]$ rm /tmp/.s.PGSQL.5432
[postgres(at)linny pgsql]$ rm server.log
<stmaster -D /var/lib/pgsql/data > server.log 2>&1 &
[1] 1615
[postgres(at)linny pgsql]$ cat server.log
[postgres(at)linny pgsql]$ psql
Connection to database 'postgres' failed.
FATAL 1: Database postgres does not exist in pg_database
[postgres(at)linny pgsql]$ postgres -D /var/lib/pgsql/data
---debug info---
Quiet = f
Noversion = f
timings = f
dates = Normal
bufsize = 64
sortmem = 512
query echo = f
DatabaseName = [postgres]
----------------
InitPostgres()..
FATAL 1: Database postgres does not exist in pg_database
FATAL 1: Database postgres does not exist in pg_database
[postgres(at)linny pgsql]$ postgres -D /var/lib/pgsql/data ALL
---debug info---
Quiet = f
Noversion = f
timings = f
dates = Normal
bufsize = 64
sortmem = 512
query echo = f
DatabaseName = [ALL]
----------------
InitPostgres()..
FATAL 1: Database ALL does not exist in pg_database
FATAL 1: Database ALL does not exist in pg_database
From | Date | Subject | |
---|---|---|---|
Next Message | Lorenzo Huerta | 1998-07-17 14:19:43 | security on line by line basis |
Previous Message | 1214 | 1998-07-15 23:41:47 | Mega-Cash Wants To Advertise On Your Site! |