installing Postgres

Brandon Allbery allbery.b at gmail.com
Tue Sep 13 14:18:06 PDT 2011


On Tue, Sep 13, 2011 at 17:07, Brandon Allbery <allbery.b at gmail.com> wrote:

> On Tue, Sep 13, 2011 at 16:59, Puneet Kishor <punk.kish at gmail.com> wrote:
>
>> $sudo su postgres -c '/opt/local/lib/postgresql90/bin/pg_ctl start -D
>> /path/to/db/postgresql90/defaultdb -l ~/Logs/postgresql90-server/main.log'
>>
>> but, I don't know the password for the 'postgres' user
>>
>
> Are you using the actual command you quoted?  The "sudo" shifts to root,
> which doesn't need a password to "su postgres".
>

Oh, the "$" isn't part of the command; if you're typing it, then the shell
is trying to expand a variable called "sudo" that is probably empty, so
you'd get the password prompt.

    sudo su postgres -c '/opt/local/lib/postgresql90/bin/pg_ctl start -D
/path/to/db/postgresql90/defaultdb -l ~/Logs/postgresql90-server/main.log'

(all on one line)

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20110913/97777f04/attachment.html>


More information about the macports-users mailing list