PostgreSQL Launchd on Tiger
Creating a PostgreSQL Launchd file allows your system to start up postmaster when your Mac boots.
This tip shows you how to create this file.
Use a text editor such as emacs to create the PostgreSQL Launchd file:
$ emacs /Library/LaunchDaemons/org.postgresql.PostgreSQL.plist
Copy and paste the following into the file.
################# COPY BELOW ###########################
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.postgresql.PostgreSQL</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/pgsql/bin/pg_ctl</string>
<string>-D</string>
<string>/usr/local/pgsql/data</string>
<string>-l</string>
<string>/usr/local/pgsql/data/server.log</string>
<string>start</string>
</array>
<key>ServiceDescription</key>
<string>PostgreSQL Server</string>
<key>UserName</key>
<string>postgres</string>
<key>GroupName</key>
<string>web</string>
</dict>
</plist>
################# COPY BELOW ###########################
Next reboot your Mac and check to see if postmaster started up.
Or you can try the following commands:
$ sudo launchctl load /Library/LaunchDaemons/org.postgresql.PostgreSQL.plist
$ sudo launchctl start org.postgresql.PostgreSQL
10:37 AM, 07 Jun 2005 by Nick Carroll Permalink | Comments (1)
| June 2005 | ||||||
| S | M | T | W | T | F | S |
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | ||