Attempting to install postgres via Darwin Ports forced me, for the first time to try to utilize variants. From what I understand, variants are somewhat like USE flags in Gentoo, but beyond that, I don’t know much.
The default postgres version in port is still 7, but postgresql8 is also in port, and currently is version 8.1.3. Looking at its Portfile, we can see that the server variant tells you handy commands that assist in setting up the server. To install the server variant, run:
sudo port install postgresql8 +server
After the install, if you load NetInfo Manager, you’ll notice that a postgres8 user was added. That user is used to set permissions in the steps you are asked to execute by the port post-install process. Follow the directions for setting up the default database, as well as interfacing with launchd. Reading man launchctl can’t hurt either.
The following seems to restart the server, not stop it:
sudo launchctl stop org.darwinports.postgresql8
The following can be used to fully stop the server:
sudo launchctl unload -w /opt/local/etc/LaunchDaemons/org.darwinports.postgresql8/org.darwinports.postgresql8.plist
… and to start (from a stopped state):
sudo launchctl load -w /opt/local/etc/LaunchDaemons/org.darwinports.postgresql8/org.darwinports.postgresql8.plist
Post a Comment