Forum OpenACS Development: Re: Error on OS X using install-ns.sh

Collapse
Posted by Dave Bauer on
Thanks for confirming that. I'll have to figure out where it gets that information.

I don't seem to be able to find more than one version of psql. I did

sudo su -
cd /
find . -type f -name "psql"

and only the home brew install of psql was found.

Is there another way I can look for another postgresql install? I am running OS X 10.9.5 Mavericks.

next I looked at the postgresql install script that builds postgresql https://github.com/Homebrew/homebrew/blob/master/Library/Formula/postgresql.rb

I don't see any configuration that changes the default socket directory. Presumably the Naviserver database driver is connecting to a misconfigured library? The socket is definitely in /tmp/.s.PGSQL.5432 and that is the default setting for Postgresql, from what I can find.

Any other ideas where to look? I'd like to be able to consistenly install it correctly, and if possible find the home brew postgresql install script, but I don't see where this is changed when postgresql is compiled.

Collapse
Posted by Michael Aram on
Hello Dave,

IIRC, when compiling PG manually the default location of the socket is in /tmp/.s.PGSQL.5432. When using PG from the distribution, it is somewhere else.

Anyhow, when I install OpenACS, I typically use a wrapper script for starting NaviServer, which includes the PATH to PG. To be honest, I dont know if this is (still) really needed, but maybe it helps?


function install_nsd_pg {
# Add wrapper script
local NSD_PREFIX=$1
local PG_VERSION=$2
local PG_PREFIX=$3

cat <<EOF > ${NSD_PREFIX}/bin/nsd-pg${PG_VERSION}
#!/bin/bash
export PATH=\$PATH:${PG_PREFIX}/bin
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${PG_PREFIX}/lib:${NSD_PREFIX}/lib
ulimit -c unlimited
exec ${NSD_PREFIX}/bin/nsd \$*
EOF
chmod 755 ${NSD_PREFIX}/bin/nsd-pg${PG_VERSION}
}
# Set vars as needed....
install_nsd_pg $PREFIX_NS $POSTGRES_VERSION $PREFIX_POSTGRES