startup postgresql 9.0.3

2011-06-16 Thread Jeff Hamann
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.

I'm using the script from the tarball (found in the 
contrib/start-scripts/freebsd of postreges tarball)

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 
/usr/local/etc/rc.d/postgresql

I've added the postgresql_enable=YES to /etc/rc/conf.

I know I'm missing some magic here 
(http://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-scripting/index.html 
perhaps?)

I've /usr/local/pgsql/bin./postgres --help'd too and can't seem to get traction.

Can you please help? I'm sure this is something simple I'm neglecting.

Please don't respond with Why don't you just use the ports collection? 
There's reasons - like: 1) need to build from source, 3) it's for a tutorial, 
and 3) postgresql90-server isn't building.

Respectfully,
Jeff.


Jeff Hamann, PhD
PO Box 1421
Corvallis, Oregon 97339-1421
541-754-2457
jeff.hamann[at]forestinformatics[dot]com
http://www.forestinformatics.com
http://forufus.blogspot.com/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: startup postgresql 9.0.3

2011-06-16 Thread Chuck Swiger
On Jun 16, 2011, at 10:26 AM, Jeff Hamann wrote:
 I've installed and tested postgresql just fine on FreeBSD 8.2.

I gather this means running the database manually via postgres -D 
/usr/local/pgsql/data works normally?

 As instructed in the script, I've moved the file to 
 /usr/local/etc/rc.d/postgresql
 
 I've added the postgresql_enable=YES to /etc/rc/conf.

Is /usr/local/etc/rc.d/postgresql executable?

What does /usr/local/etc/rc.d/postgresql start do?
(If you don't get a useful answer, running it via sh -x might be more 
informative.)

 Please don't respond with Why don't you just use the ports collection? 
 There's reasons - like: 1) need to build from source, 3) it's for a tutorial, 
 and 3) postgresql90-server isn't building.

You've counted to three rather oddly there.
Obviously, building from ports is building from source.

I don't see how the first 3) is relevant, but the errors reported from the 
second 3) might be more interesting.

Regard,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: startup postgresql 9.0.3

2011-06-16 Thread Michael Powell
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 
from NetBSD.

 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
 /usr/local/etc/rc.d/postgresql

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 
clues.
 
 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
 (http://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-
scripting/index.html
 perhaps?)
 
 I've /usr/local/pgsql/bin./postgres --help'd too and can't seem to get
 traction.

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 

- non-sequitur

 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!

-Mike

 



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org