pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Marc Fromm <Marc.Fromm@wwu.edu>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: starting postgres on red hat
Date: Thu, 11 Sep 2008 11:21:53 -0600
Message-ID: <dcc563d10809111021i46b4019idd6ab3d12bbcd00d@mail.gmail.com> (raw)
In-Reply-To: <B0D7C0A3F35FE144A70312D086CBCA9B143453A4@ExchMailbox2.univ.dir.wwu.edu>
References: <B0D7C0A3F35FE144A70312D086CBCA9B143453A4@ExchMailbox2.univ.dir.wwu.edu>

On Thu, Sep 11, 2008 at 10:57 AM, Marc Fromm <Marc.Fromm@wwu.edu> wrote:
>
> I installed Red Hat 5.2 EL. During the install I select postgresql and this versoin was installed: postgresql-8.1.11-1.el5_1.1.
>
> 1. I started postgresql as follows:
> initdb -D /var/lib/pgsql/data

There's an initidb function built into the /etc/init.d/postgresql
script you can use:

sudo /etc/init.d/postgresql initdb

both work similarly.

> 2. I started the database server as follows:
> /usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start
>
> 3. I started the postmaster as follows:
> service postgresql start

These two steps do the same thing.  the db server was already started
in step2.   The preferred way is how you did it in step 3.

> When I check that it is all running with ps command I get:
> 324 pts/1    S      0:00 /usr/bin/postmaster -D /var/lib/pgsql/data
>
> When I did the same setps in fedora 8  the postmaster was started on a port
> 1703 ?        S      0:01 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
>
> Why is there no -p 5432 on the red hat box? I assume the port is needed. What do I need to do to have the postmaster running on port 5432 like on the fedora box?

Because pgsql is reading it from the postgresql.conf file.

Stick to the /etc/init.d/postgresql way of starting and stopping.

To set pgsql to start automatically on bootup, use chkconfig:

chkconfig postgresql on
chkconfig --list postgresql



view thread (8+ messages)  latest in thread

Message-ID: <dcc563d10809111021i46b4019idd6ab3d12bbcd00d@mail.gmail.com>
Permalink:  ../dcc563d10809111021i46b4019idd6ab3d12bbcd00d@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10809111021i46b4019idd6ab3d12bbcd00d@mail.gmail.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: scott.marlowe@gmail.com, Marc.Fromm@wwu.edu
  Subject: Re: starting postgres on red hat
  In-Reply-To: <dcc563d10809111021i46b4019idd6ab3d12bbcd00d@mail.gmail.com>

* 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