On Tue, Mar 2, 2010 at 9:45 PM, Henry Gall <xob...@gmail.com> wrote: > I am trying to replace mysql with postgresql on my openbsd + apache +php > server. > > I need to install postgresql from source, as I need special options, and the > latest version. > > I am runnning openbsd 4.5, php 5.2.8 from packages, > postgresql-8.4.2 from source. All dependencies from packages. > > > Postgresql compiles and installs fine, works fine as a stand alone server. > > Since I have a running mysql server, I have the /var/www/run/ directories > and subdirectories > > I edited postgresql.conf to have the socket in /var/www/tmp, which it does > > I did put the _postgresql user and processes in their own login class > (usermod -L postgresql _postgresql) > > > I tried to preload the libpd.so.5.2 library, it can't since by the > time it gets to it, > php5 is already loaded. > > I put the following in /etc/rc.conf.local > > if [ -x /usr/local/bin/pg_ctl ]; then > echo -n ' postgresql' > su -l _postgresql -c "nohup /usr/local/bin/pg_ctl start \ > -D /var/postgresql/data -l /var/postgresql/logfile \ > -o '-D /var/postgresql/data' >/dev/null" > fi > (that's where I need pg_ctl and data to be) but it won't load at boot anyway. > That's even secondary, I can start the pgsql server by hand after > boot, and restart > apache, the server is not intended to be rebooted often anyway. > > I can't get postgresql to work with php with the chrooted environment. > I searched the > archives and googled quite a bit, without success.
I always found it easier to set postgres to listen on localhost and connect to it via port 5432. -B