From: mathan <mathan@hotpop.com>
To: Eric M. Wulff <ewulff@footbag.org>
To: pgsql-admin@postgresql.org
Subject: Re: postgres installed via rpms -can't run postmaster or
Date: Mon, 20 Oct 2003 10:36:55 +0530
Message-ID: <014001c396c7$ff74aa40$250110ac@MAMCO> (raw)
References: <1066508130.2275.89.camel@ewulff>
Hai Eric
Try the following, let me know if you have any doubts
1. To start postmaster you must be logged in to your PostgreSQL server
account( postgres). It will not work as root.
create the data dir (eg: /var/postgresql/data)
# mkdir /var/postgresql/data
# chown postgres /var/postgresql/data
create the user "postgres"
# su - postgres
$ initdb -D /var/postgresql/data
$ postmaster -i -D /var/postgresql/data
This will start the server in the background.
To stop a server running in the background you can type
$ kill `cat /var/postgresql/data/postmaster.pid`
In order to allow TCP/IP connections (rather than only Unix domain socket
ones) you need to pass the "-i" option to "postmaster".
3. Create a database:
create a database named 'db'
$ createdb db
4. To view the database created, use the following command:
$ psql -l
Now postgresql is running, we can view the PID by using the
following command
$ ps -ef | grep postmaster
Then enter
$ psql db
Above rule should prompt to database db as
Welcome to psql 7.3.1, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
db=#
thanks
mathan
----- Original Message -----
From: "Eric M. Wulff" <ewulff@footbag.org>
To: <bruno.leveque@net6d.com>; <pgsql-admin@postgresql.org>
Sent: Sunday, October 19, 2003 1:45 AM
Subject: Re: [ADMIN] postgres installed via rpms -can't run postmaster or
> This is very helpful. My next problem is setting up a db. createdb
fails...
>
> "psql: FATAL: user "blah" does not exist
> createdb: database creation failed"
>
> The user is either myself or root. Of course, doesn't like root. How
> do I get psql to recognize me as a user.
>
> fyi - I'm on redhat 8.0. Can anyone refer me to documentation for
> configuring if installed via rpm? The docs on postgres.org seem to refer
> to deeper darker operations than I need. The README.rpm-dist alluded that
> might need to set the config file for tcpip. Did that. Still didn't help.
> Redhat is more often refereeing to Red Hat db. I am missing
something.Also,
> I have now studied the server start script somewhat but that hasn't shed
> any light on the issue either.
>
> thx much
> Eric
>
>
> > On Sat, 2003-10-18 at 10:42, Mailing List wrote:
> > >
> > > > Hi, I am relatively new to Linux and just installed postgres via
rpms.
> > > > I think. However, I can't for the life of me figure out how to
start up
> > > > postmaster or psql.
> > >
> > > If you installed via RPMS you're probably using Red Hat Linux (or
> > > something similar). Then you should rely on your OS' startup script.
> > > As root give:
> > >
> > > /etc/rc.d/init.d/postgresql start
> > >
> > > to start your PostgreSQL server.
> > >
> > >
> > > > psql - I keep getting the following error when running psql...
> > > >
> > > > "psql: could not connect to server: No such file or directory
> > > > Is the server running locally and accepting
> > > > connections on Unix domain socket "/tmp/.s.PGSQL.1234"?"
> > > >
> > > > How do I find out if the server is running locally and accepting
> > > > connections on Unix domain socket?
> > >
> > > It is not, apperantly...
> > >
> > >
> > > > postmaster - I keep getting the following error when trying to start
> > > > postmaster...
> > > >
> > > > "postmaster does not know where to find the database system data.
> > > > You must specify the directory that contains the database system
> > > > either by specifying the -D invocation option or by setting the
> > > > PGDATA environment variable."
> > >
> > > Look at Red Hat's startup script: without the environment variables
> > > defined therein the postmaster is lost...
> > >
> > >
> > > > Oh, and another thing I'm confused about is... I tried to install
these
> > > > in /usr/local/bin, that's where the rpms are, but they wound up in
> > > > /usr/lib. Any idea why that might be? I rpm'd from /usr/local/bin
> > >
> > > RPMs install at locations specified in the packages. You can't really
> > > influence that (ok, you can, but you need to know what you are
doing...)
> > >
> > >
> > > Bye, Chris.
> > >
> > >
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: mathan@hotpop.com, ewulff@footbag.org
Subject: Re: postgres installed via rpms -can't run postmaster or
In-Reply-To: <014001c396c7$ff74aa40$250110ac@MAMCO>
References: <1066508130.2275.89.camel@ewulff> <014001c396c7$ff74aa40$250110ac@MAMCO>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox