From: | Bryan <brakeb(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Trouble installing Drupal 5 using sockets (a little long) |
Date: | 2008-08-14 18:17:46 |
Message-ID: | 6532b7c80808141117l6117edd5m9375532380cf6acb@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Greetings and Hello!
I am trying to get my little ALIX server that is running OpenBSD
4.4-current to run pgsql. I've been successful in installing 8.3.3,
and since OpenBSD uses a chrooted environment, I intend on using unix
sockets for making database connections. I read the man pages, ran
"initdb -D /var/postgresql/data -U postgres -A md5 -W" and edited the
/var/postgresql/data/postgresql.conf file to read:
-----------------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = 'localhost' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
#port = 5432 # (change requires restart)
max_connections = 40 # (change requires restart)
# Note: Increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction). You might
# also need to raise shared_buffers to support more connections.
#superuser_reserved_connections = 3 # (change requires restart)
unix_socket_directory = '/var/www/tmp' # (change requires restart)
unix_socket_group = '' # (change requires restart)
unix_socket_permissions = 0777 # begin with 0 to use octal notation
# (change requires restart)
#bonjour_name = '' # defaults to the computer name
-------------------------------------------------------------------------------------
I only have 256MB of RAM, so my connections will stay low. I started
pgsql using:
# pg_ctl -D /var/postgresql/data -l logfile start
And the following shows in the /var/postgresql/logfile:
-------------------------------------------------------------------------------------
LOG: database system was shut down at 2008-08-09 20:33:22 UTC
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
-------------------------------------------------------------------------------------
An output of netstat -a shows the following:
# netstat -a | grep /var
0xd60cab9c stream 0 0 0xd604394c 0x0 0x0 0x0 /var/www/tmp/.s.PGSQL.5432
0xd61f81a8 dgram 0 0 0xd61f3cd0 0x0 0x0 0x0 /var/empty/dev/log
At this point, I think I am good to go, and can continue.
After I installed Drupal 5, I attempted to create the database that
drupal will use in pgsql. pkginfo -D gives me the following:
-------------------------------------------------------------------------------------
In postgresql, assuming an `admin' account has all rights:
createuser -U admin --pwprompt --no-superuser --createdb --no-createrole drupal
createdb -U drupal -E UTF8 drupal
-------------------------------------------------------------------------------------
When I type the following:
# createuser -U admin --pwprompt --no-superuser --createdb
--no-createrole drupal
I get the following output:
-------------------------------------------------------------------------------------
Enter password for new role:
Enter it again:
createuser: could not connect to database postgres: could not connect
to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
-------------------------------------------------------------------------------------
Now, something in pgsql is still set and is overiding the config that
I set up. I did do the initdb and then set the socket, is there
something inside the inital database that needs to be set? After
searching the internet, I found that someone mentioned that a reboot
after some system updates fixed the issue
(http://www.dbforums.com/showthread.php?t=1625811) but I have not
made any systems changes, and restarting pgsql does start the service
and create the socket inside the chroot (/var/www/).
So, is there any other place that I need to change that tells the
system where the unix socket is?
Much obliged,
Bryan Brake
From | Date | Subject | |
---|---|---|---|
Next Message | Frank Bax | 2008-08-14 19:10:34 | Re: Trouble installing Drupal 5 using sockets (a little long) |
Previous Message | Fernando Ike | 2008-08-14 14:56:10 | Re: Supported by latest Debian version? |