Install problems for postgresql-8.4.1 - Mailing list pgsql-novice
From | Don Fox |
---|---|
Subject | Install problems for postgresql-8.4.1 |
Date | |
Msg-id | 5321FE54-6B6D-4A61-90D4-B2ED0E369677@mac.com Whole thread Raw |
Responses |
Re: Install problems for postgresql-8.4.1
Re: Install problems for postgresql-8.4.1 |
List | pgsql-novice |
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.
This installation will be used with python and an opens source application 'GNUmed' used for electronic medical records.
Thanks,
Don
./configure --with-perl --with-python --with-openssl --with-bonjour PERL=/usr/bin/perl PYTHON=/usr/bin/python
make
sudo make install
Resulted with apparent success
PostgreSQL installation complete.
This is in .profile
if [ -d /usr/local/pgsql/bin ] ; then
PATH="/usr/local/pgsql/bin:${PATH}"
fi
export PATH
I'm using 103
sudo dseditgroup -o create -i 102 -r "PostgreSQL Users" postgres
Shouldn't the following result in a postgres file under /Users?
It doesn't!
sudo dscl . -create /Users/postgres
sudo dscl . -create /Users/postgres UniqueID 102
sudo dscl . -create /Users/postgres UserShell /bin/bash
sudo dscl . -create /Users/postgres RealName "Postgres Administrator"
sudo dscl . -create /Users/postgres NFSHomeDirectory /usr/local/pgsql
sudo dscl . -create /Users/postgres PrimaryGroupID 102
sudo dscl . -create /Users/postgres Password postgres
sudo chown -R postgres:postgres /usr/local/pgsql
Then did this and went tosystem prefs pane and reset Accounts for Postgres Admin to 'postgres'.
cd /usr/local/
...:local donfox1$ su postgres
Password:
bash-3.2$ whoami
postgres
bash-3.2$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".
creating directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.
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
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
sh-3.2# ls -l
total 0
drwxr-xr-x 23 postgres postgres 782 Nov 1 00:15 bin
drwx------ 15 postgres postgres 510 Nov 1 00:31 data
drwxr-xr-x 24 postgres postgres 816 Nov 1 00:15 include
drwxr-xr-x 50 postgres postgres 1700 Nov 1 00:15 lib
drwxr-xr-x 21 postgres postgres 714 Nov 1 00:15 share
pgsql-novice by date: