Setting up Postgresql on Linux - Mailing list pgsql-general

From phil campaigne
Subject Setting up Postgresql on Linux
Date
Msg-id 4043F434.4010403@charter.net
Whole thread Raw
List pgsql-general
On Mon, 1 Mar 2004, Phil Campaigne wrote:


>> Hello,
>> I originally installed postgresql as root user and now I am setting up a
>> development environment with cvs and a java ide and tomcat. I have
>> everything with the exception of postgresql integreted using a non-root
>> user.
>> THe process I am using is  to logon as postges and start the database
>> and do queries from the command line using psql. Then I logoff and logon
>> as phil and start tomcat and my java ide.
>
>

I'm a little confused as to what you are trying to accomplish.


>>
>> 1.Is there a better way to start the database and the web application?
>
>

Can't you just start postgresql and tomcat?


>>
>> 2. During setup of postgresql I chown and ghgrp the /usr/local/pgsql
>> directoy tree to postgres?
>
>

A little strange but perfectly acceptable if that's how you want it; I install
all software under /usr/local as a special software manager, although I'm not
sure if I'd bother chown-ing an existing directory tree to non-root.


>>
>> 3.However my development environment(i.e. jdbc connection from my
>> application) doesn't seem to have permission to access to all the files
>> it needs in postgres?
>
>

What's the error message? I'm not a jdbc person but I suspect from the
preceding comments that you're not running the postmaster or jdbc requires a
tcp connection and you haven't configured postgresql to allow that.


>>
>> 4. Is is best to install postgresql as user "phil" in order to gain
>> access for my integrated develoment environment?
>
>

You can install postgresql as whatever user you want, all it requires is that
it runs as a non-root user, and has the proper ownership etc on it's data
directory.

First, I would do a: ps axu | grep post
and see if the postmaster is running. If not nad this is not supposed to run as
a normal service use:

pg_ctl -l /path/to/a/logfile \
    -D /path/to/data/directory/initialised/with/initdb \
    start

Start Tomcat. If after doing whatever to setup and use jdbc to access your
database (for testing you may want to createdb testdb) you still don't get any
connection set tcpip_socket to true in postgres.conf in the data directory and
stop and start postgresql using pg_ctl. Also look in the Tomcat logs and in
/path/to/a/logfile. While editing postgres.conf you may also want to look at
the log_ settings and enable a few to see what is happening in more detail.

The postgresql documentation is at http://www.postgresql.org/doc/ and
unfortunately I can't be more specific with urls since the domain falls into to
large IP block I block completely due to the excessive number of speculative
probes of my systems (not postgresql.org addresses I hasten to add). In deed,
this email will probably not reach the list, I wish I know what causes the
switch from that working to not working.


-- Nigel J. Andrews



pgsql-general by date:

Previous
From: "Shawn Harrison"
Date:
Subject: Database metadata queries (WAS Re: Moving from MySQL to PGSQL....some questions)
Next
From: Tom Lane
Date:
Subject: Re: Database metadata queries (WAS Re: Moving from MySQL to PGSQL....some questions)