View · Index

Installing OpenACS on Mac OS X

See one of these:

Should you decide to install OpenACS from source using general en:openacs-system-install instructions, refer to these notes for changes:

Installing PostgreSQL

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.

Creating postgres user

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

Compile and install PostgreSQL

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

Set PostgreSQL to start on boot

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 PostgreSQL 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

To get Tcl to build on Leopard or newer

for compiling under Mac OS X Leopard or newer, use the following flags to compile Tcl:

./configure --prefix=/opt/aolserver --enable-threads --disable-corefoundation --enable-symbols

 

To get tDOM to build on tiger

  1. Download and install/update to the latest version of xcode tools (version2.2) from http://developer.apple.com/tools/xcode which updates the gcc compiler.
     
  2. Then make some additional changes to the unix/CONFIG file (after modifying the unix/CONFIG file according to instructions at en:aolserver-install, uncomment:
    'CC=gcc; export CC'
  3. add a new line, somewhere after the first line:
    export CPP="/usr/bin/cpp"

When versions of AOLservers different to AOLserver 4.5 (head, including changes from Mar 22, 2008) are used, AOLserver is likely to segfault on startup due to recent changes in the Mac OS X System libraries. To avoid this, use

ulimit -n 256

in the startup script (don't use unlimited).

previous March 2024
Sun Mon Tue Wed Thu Fri Sat
25 26 27 28 29 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
31 1 2 3 4 5 6

Popular tags

17 , 5.10 , 5.10.0 , 5.9.0 , 5.9.1 , ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bootstrap , bugtracker , CentOS , COMET , compatibility , CSP , CSRF , cvs , debian , docker , docker-compose , emacs , engineering-standards , exec , fedora , FreeBSD , guidelines , host-node-map , hstore
No registered users in community xowiki
in last 30 minutes
Contributors

OpenACS.org