Re: Updated: Compiling/Installing as a non-admin user

From: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>
To: "Ritesh Nadhani" <riteshn(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Updated: Compiling/Installing as a non-admin user
Date: 2006-11-02 07:42:43
Message-ID: bf54be870611012342p2160df13o645bc5fe546bd7a4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Before using the createdb binary, su the Linux console as the same user
which you used while doing the initdb process on your $PGDATA folder.

Thanks,
--------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 11/1/06, Ritesh Nadhani <riteshn(at)gmail(dot)com> wrote:
>
> Hello All
>
> Thanks for all the suggestions. I was able to configire and compile it.
> I set the data directory to one of my directories, use 'initdb'
> successfully. I am also able to start the pgsql and can see that it is
> running on port 4444 as I had configured.
>
> Now the problem is when I try to create a db using createdb, I get the
> error:
>
> createdb: could not connect to database postgres: FATAL: role "ritesh"
> does not exist
>
> I am not sure what is that?
>
> Doing a google gave me:
> http://pgfoundry.org/pipermail/pgcluster-general/2006-May/000699.html
>
> > You must be postgres user to run this. Another option might be
> passing > a user switch .
>
> I cannot run with postgres as I dont have access and I am not sure how
> to use the user switch? Any help?
>
> I guess once I am through with this, I am successful!
>
> Ritesh
>
> Richard Huxton wrote:
> > Gurjeet Singh wrote:
> >> You are talking about /usr/local/data; so I assume that you are trying
> >> this
> >> on Linux or some other Nixen.
> >>
> >> You just need to use the --prefix option to configure... Here's what I
> >> typically do:
> >>
> >> Download/'CVS checkout' the sources. Enter the source directory, and
> >> invoke
> >> configure like this:
> >>
> >> ./configure --enable-debug --prefix `pwd`/db CFLAGS=-O0
> >>
> >> And the run 'make' and 'make install'. This will install the data in
> your
> >> <sources_dir>/db/data.
> >
> > And then of course you'll need to remember to set your port to something
> > other than 5432, and tweak your PATH, PGPORT etc or define some
> > aliases/wrappers so you don't end up running against the default
> > installation. Oh, and you'll need to tweak the startup scripts and
> > logging configuration so you get logs somewhere useful.
> >
> > I think Tom Lane has a script that lets him switch between different
> > installations (versions in his case). I only tend to have two versions
> > active at any one time, so I just define an alias for psql.
> > alias psql82='/usr/local/pgsql82/bin/psql -p 5434'
> > On the rare occasion when I run an 8.2 createdb I need to remember to
> > put the port number in manually of course.
> >
> > HTH
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2006-11-02 08:16:29 Re: time value '24:00:00'
Previous Message Tom Lane 2006-11-02 06:31:25 Re: Encoding, Unicode, locales, etc.