|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
See one of these:
Should you decide to Install OpenACS from source using general openacs-system-install instructions, refer to these notes for changes:
OS X conventions
On Mac OS X type sudo su - to become root.
Use curl -L -O instead of wget
If you are running Mac OS X prior to 10.3, you should be able to install and use PostGreSQL 7.3.x. Mac OS X 10.3 requires PostGreSQL 7.4. Note: if you're installing PG on an Intel Mac, you'll need to install 8.x; 7.4.x won't compile because of a lack of "native spinlock support" -- and this is something that the PG maintainers aren't inclined to fix. See this. PG 8.0.x installs fine, as does PG 8.1 or 8.2.
Do this instead:
First make sure the gids and uids below are available (change them if they are not). To list taken uids and gids:
nireport / /groups name gid | grep "[0-9][0-9][0-9]"
nireport / /users name uid | grep "[0-9][0-9][0-9]"
Now you can install the users
sudo niutil -create / /groups/web
sudo niutil -createprop / /groups/web gid 201 sudo niutil -create / /users/postgres sudo niutil -createprop / /users/postgres gid 201 sudo niutil -createprop / /users/postgres uid 502 sudo niutil -createprop / /users/postgres home /usr/local/pgsql sudo niutil -create / /users/$OPENACS_SERVICE_NAME sudo niutil -createprop / /users/$OPENACS_SERVICE_NAME gid 201 sudo niutil -createprop / /users/$OPENACS_SERVICE_NAME uid 201 mkdir -p /usr/local/pgsql chown -R postgres:web /usr/local/pgsql /usr/local/src/postgresql-7.4.7 chmod 750 /usr/local/pgsql
If you're using Fink:
Append --with-includes=/sw/include/ --with-libraries=/sw/lib flags to ./configure.
./configure --with-includes=/sw/include/ --with-libraries=/sw/lib
cd /Library/StartupItems/
tar xfz /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/osx-postgres-startup-item.tgz
Alternatively, one can use an XML file like the following to start postgres via launchd (specifying the postgres binary directory and database directory)
For Mac OS X Tiger (10.4.*), use:
<?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>GroupName</key>
<string>nsadmin</string>
<key>Label</key>
<string>org.postgresql.PostgreSQL</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/pg820/bin/pg_ctl</string>
<string>-D</string>
<string>/usr/local/pg820/data</string>
<string>-l</string>
<string>/usr/local/pg820/data/server.log</string>
<string>start</string>
</array>
<key>ServiceDescription</key>
<string>PostgreSQL Server</string>
<key>UserName</key>
<string>postgres</string>
</dict>
</plist>
For Mac OS X Leopard (10.5.*), use:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//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>UserName</key>
<string>postgres</string>
<key>GroupName</key>
<string>nsadmin</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/pg820/bin/postmaster</string>
<string>-D</string>
<string>/usr/local/pg820/data</string>
<string>-c</string>
<string>log_connections=YES</string>
</array>
</dict>
</plist>
Save the above files as /Library/LaunchDaemons/org.postgresql.PostgreSQL.plist and postgres will be started automatically on the next boot of the system. One can use launchctl to start the service for testing;
launchctl
% load /Library/LaunchDaemons/org.postgresql.PostgreSQL.plist
% start org.postgresql.PostgreSQL
% ^D
'CC=gcc; export CC'
export CPP="/usr/bin/cpp"
Comments