pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Elphick <olly@lfix.co.uk>
To: Bogdan Paduraru <bpaduraru@petar.ro>
Cc: pgsql-admin@postgresql.org
Subject: Re: Starting postmaster problem
Date: Wed, 01 Nov 2000 23:10:44 +0000
Message-ID: <200011012310.eA1NAjl31990@linda.lfix.co.uk> (raw)
In-Reply-To: <bpaduraru@petar.ro> <3A0041AE.9649089C@petar.ro>

Bogdan Paduraru wrote:
  >Hello,
  >I installed Postgresql 7.0.2 on a Redhat Linux 6.1 and I want now to run
  >it, but it seems I have a problem.
  >I connected as root on my server.
  >After that I do :
  >$ su postgres
  >$nohup /usr/local/pgsql/data \ </dev/null >>server.log 2>>1 &
  >After the second command I get
  >bash : server.log: Permission denied
  >Can you help me?

Several things:

1. /usr/local/pgsql/data is a directory, not a command; it's not at all
   clear what you are trying to do here.  I suppose you want to run the
   postmaster:  `/usr/local/pgsql/bin/postmaster >>server.log 2>>1', but
   you need to specify some options or define some environment
   variables (see the documentation!)

2. `su postgres' will not change directory for you, so you will still
   be in the directory where you issued the su command; however you
   are now user postgres and postgres doesn't have write permission
   in the current directory.  If you use `su - postgres' you will not
   only become user postgres but you will be put in the postgres home
   directory, where you presumably will have write permission.

3. nohup does not need to be used to run the postmaster, which disconnects
   itself from the terminal.  In fact, running nohup is probably a bad
   idea, at least on Linux, because it nices the process down, which
   will slow down query processing by the backend.

  >And another thing : how can I make it to run when I start my Linux
  >server?

Define a script under /etc/rc.d (I think that's right for Red Hat).
Look at the documentation for init for a description of what happens
at boot time.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "But they that wait upon the LORD shall renew their 
      strength; they shall mount up with wings as eagles; 
      they shall run, and not be weary; and they shall walk,
      and not faint."            Isaiah 40:31 





view thread (3+ messages)  latest in thread

Message-ID: <200011012310.eA1NAjl31990@linda.lfix.co.uk>
Permalink:  ../200011012310.eA1NAjl31990@linda.lfix.co.uk/
Also on:    postgresql.org/message-id/200011012310.eA1NAjl31990@linda.lfix.co.uk

 · 

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 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: olly@lfix.co.uk, bpaduraru@petar.ro
  Subject: Re: Starting postmaster problem
  In-Reply-To: <200011012310.eA1NAjl31990@linda.lfix.co.uk>
  References: <200011012310.eA1NAjl31990@linda.lfix.co.uk>

* 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