Home
The Toolkit for Online Communities
12899 Community Members, 0 members online
Log In Register

OpenACS BlogArchive

OpenACS Home : OpenACS Blog : Archive : 2005 : June : 07

PostgreSQL Launchd on Tiger

I just installed PostgreSQL on Mac OS X 10.4 Tiger, and found that the PostgreSQL StartupItem provided in the acs-core-docs no longer works.  Instead use Tiger's Launchd system, which is so much simpler than StartupItems in previous Mac OS X releases.

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)

XML

Archive

June 2005
S M T W T F S
      4 
6  7  8  10  11 
12  13  14  15  16  17  18 
19  20  21  22  23  24  25 
26  27  28  29  30     
April 2007
March 2007
October 2006
March 2006
February 2006
January 2006
December 2005
November 2005
August 2005
July 2005
June 2005
May 2005

Notifications

You may request notification for OpenACS Blog.

Syndication Feed

XML

Recent Comments

  1. Silvio Ernesto: hola
  2. Martin v. Löwis: Cannot run pg_ctl from launchd
  3. Joan Miller: Something Interesting
  4. Hubert Erlmoser: trustpharma.com
  5. Hubert Erlmoser: TRUSTPHARMA
  6. Ben Koot: Selva
  7. LARRY SCOVEL: TRUST PHARMA
  8. Nick Carroll: Theme Selva
  9. Ben Koot: More enhancements
  10. Jane Perez: Trustpharma.com