From: | Michael Wood <esiotrot(at)gmail(dot)com> |
---|---|
To: | Don Fox <donfox1(at)mac(dot)com> |
Cc: | "Mark H(dot) Nichols" <info(at)markhnichols(dot)com>, pgsql-novice(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Install problems for postgresql-8.4.1 |
Date: | 2009-11-02 08:18:49 |
Message-ID: | 5a8aa6680911020018s7167deeat66bf5e48de953399@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
2009/11/1 Don Fox <donfox1(at)mac(dot)com>:
>
> Here is record of my attempt to do the install! I've used several sets of
> instructions for installing from src, mainly
> http://zanshin.net/2009/09/07/installing-postgresql-on-mac-10-6-snow-leopard/
> which appears to be the clearest.
> Obviously something has been omitted! Any suggestions are greatly
> appreciated.
[...]
> Shouldn't the following result in a postgres file under /Users?
> It doesn't!
> sudo dscl . -create /Users/postgres
[...]
No, I believe it's meant to create a user called postgres. Those are
not filesystem paths.
> Then did this and went tosystem prefs pane and reset Accounts for Postgres
> Admin to 'postgres'.
> cd /usr/local/
> ...:local donfox1$ su postgres
It's usually best to use "su - username" and not just "su username". See below.
> Password:
> bash-3.2$ whoami
> postgres
> bash-3.2$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
[...]
> Success. You can now start the database server using:
> /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
> or
> /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
> bash-3.2$
> bash-3.2$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l
> logfile.log start
> server starting
> bash-3.2$ sh: logfile.log: Permission denied
If you run "pwd" now, you should see that you are in your home
directory instead of somewhere that the "postgres" user can write this
log file. Instead of using "su postgres" above, you could have run
"su - postgres" to put you in the postgres user's home directory
(/usr/local/pgsql) which should be writable. Otherwise specify
somewhere else to create the log file where the postgres user has
write access. e.g. /usr/local/pgsql/bin/pg_ctl -D
/usr/local/pgsql/data -l /path/to/logfile start
> But this works!
> bash-3.2$ pg_ctl -D /usr/local/pgsql/data status
> pg_ctl: server is running (PID: 60134)
> /usr/local/pgsql/bin/postgres "-D" "/usr/local/pgsql/data"
> bash-3.2$
>
> bash-3.2$ pg_ctl -D /usr/local/pgsql/data start &
> [1] 60129
> bash-3.2$ server starting
> LOG: database system was shut down at 2009-11-01 11:49:21 EST
> LOG: autovacuum launcher started
> LOG: database system is ready to accept connections
>
> However!
> bash-3.2$ createdb testdb
> Bus error
I don't know what would cause a Bus error here. Everything up to this
point seems fine. Can you connect to the database using "psql"?
--
Michael Wood <esiotrot(at)gmail(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Wood | 2009-11-02 08:26:10 | Re: Apple switched to BSDtar from GNUtar with Leopard |
Previous Message | Mark H. Nichols | 2009-11-01 20:00:27 | Re: Install problems for postgresql-8.4.1 |