startup postgresql 9.0.3
nightrecon at hotmail.com
Thu Jun 16 19:47:48 UTC 2011
Jeff Hamann wrote:
> I've installed and tested postgresql just fine on FreeBSD 8.2.
> I've been trying to get postgresql (the server) to start on bootup using
> /etc/rc.conf system.
Sometime quite a while back FreeBSD imported the rc.subr startup subsystem
> I'm using the script from the tarball (found in the
> contrib/start-scripts/freebsd of postreges tarball)
This script is not in rc.subr format, looks a tad "Linuxy" at first glance.
> I can't seem to get it to work on FreeBSD 8.2 amd64 (I don't think the
> arch is important here, but you never know).
> As instructed in the script, I've moved the file to
This is definitely the right location.
There are some instructions on a couple of other things to look at first in
the ports build output. These can be examined in the port directory for
> I've added the "postgresql_enable=YES" to /etc/rc/conf.
As a non rc.subr script it will never pick up this variable.
> I know I'm missing some magic here
> I've /usr/local/pgsql/bin./postgres --help'd too and can't seem to get
If everything else seems OK, like you can start it without the script and
all you need to do is convert the script over so it will start with boot,
look over the port patchset and some of the other startup scripts. It's not
too difficult once you see how the other rc.subr scripts are put together.
I thought a sysvinit script would still work as a fallback as long as it was
marked executable, and perhaps with a .sh at the end. I remember needing the
.sh for a while and discovering they were supposed to work anyway without
it. Upon investigation that turned out to be something I missed/ignored with
mergemaster during a system update. Maybe this has fallen by the wayside.
> Can you please help? I'm sure this is something simple I'm neglecting.
I'm pretty "simple" myself. If I can install it with the ports system where
all the hard stuff has been handled for me by people smarter than me, well,
that's a no-brainer. :-)
> Please don't respond with "Why don't you just use the ports collection?"
My first inclination. Postgresql is a fairly complicated thing and using the
ports to install it "makes it go". Too many other pressing issues...
> There's reasons - like:
> 1) need to build from source
Uhmmm - ports build from source.
> 3) it's for a tutorial
> 3) postgresql90-server isn't building.
I would be more concerned by this. I just went to the postgresql90-server
port and it built just fine. If it isn't for you it indicates other
problems with your system. Another thing you'll find eventually, that when
you don't use the ports system maintenance will soon become a nightmare. As
a sysadmin I make it a point to not shoot myself in the foot. Building stuff
from tarballs is for the birds from a sysadmins point of view. It's called:
"Ready! Fire! Aim!"
More information about the freebsd-questions