These directions are getting a bit out of date. If you're wanting to be on the leading edge and use aolserver 4, pg 73, and openacs 5 beta, then check out Svet Ivantchev's instructions or Vinod Kurup's instructions or Stan Kaufman's instructions. The Epimetrics Group has an install guide too.
One question that comes up occasionally on OpenACS.org is "I have this great new TiBook. What does it take to get openacs running on Mac OS X?" Here are some notes for getting things up and running. Note that these aren't performance tuned, and don't include full-text search, but they will get you up and running to play with OpenACS. One assumption is that it's you on your personal machine. I don't do any of the "create new users for the database and web server" steps, and I'm kinda sloppy with where stuff gets put. I assume that everything will be run with my usual userid (markd), and I assume that you'll be wanting to take down the database and the webserver when you're playing.
For a production system, you should instead do All The Right Things. For development or just playing with OpenACS, it's just hassle.
I've included some of the tarballs that I use here, in case you have trouble finding the particular versions mentioned here (like it took me for-ev-er to find the approproite libxml sources)
Some of the oddities in getting things to work on Mac OS X is the two-level namespace stuff (which standard unix doesn't know about), and some wonkiness between the primarily SysV Linux world and the BSD Mac world.
The Official install Instructions are at http://openacs.org/doc/openacs-4/. Use those once you have some working binaries if you want to deploy a production system.
Postgresql 7.3 and later compile cleanly onMac OS X, so if you're using one of the latest OpenACSs (4.6.3 or later), you can just install 7.3 and ignore the source code hacking below.
% sudo make install
This should put stuff into
/usr/local/pgsql. One control-C should be enough
to signal it and make the backend shutdown cleanly.
/usr/local/pgsql/bininto your path
% sudo chown -R markd /usr/local/pgsql
% initdb -D /usr/local/pgsql/data
% /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
I just stick it into another shell
% createlang plpgsql template1
% createdb openacs
% createuser opeancs
psql openacsand poke around for fun.
openacs=# select * from pg_language; lanname | lanispl | lanpltrusted | lanplcallfoid | lancompiler ----------+---------+--------------+---------------+------------- internal | f | f | 0 | n/a C | f | f | 0 | /bin/cc sql | f | f | 0 | postgres plpgsql | t | t | 16556 |
/usr/local/pgsql/data/postgresql.conf, look for
shared_buffersand set it to a larger value (I use 16384)
/System/Library/StartupItems/SystemTuning/SystemTuningto increase your system's shared memory settings. Search for 'shmmax', and tweak values upwards. This is what I'm using:
sysctl -w kern.sysv.shmmax=167772160 # bytes: 160 megs sysctl -w kern.sysv.shmmin=1 sysctl -w kern.sysv.shmmni=32 sysctl -w kern.sysv.shmseg=8 sysctl -w kern.sysv.shmall=65536 # 4k pages: 256 megs
% cd root/aolserver/include
Makefile.global. Search for "Mac OS X". Find the
LDSOline and add
-flat_namespaceto it. The resulting line should look like:
LDSO=$(LD) -bundle -undefined suppress -flat_namespace
% cd .. (into aolserver)
% sudo make install
% sudo chown -R markd /usr/local/aolserver
nssock.soor other shared libraries, add the line
set ext .so
opeancs.tclconfiguration file. Thanks to Gunnar Hellekson for this tidbit.)
Finding the tarball
from the usual sources
no luck. use this one
(Steve Ivy found libxml binaries pckaged as OS X frameworks at http://www.zveno.com/open_source/libxml2xslt.html, if you want to use those instead of building it yourself. You'll need to tweak the CFLAGS in the nsxml building below)
libxml2-2.4.26.tar.gzfor the above tarball)
PYTHON line with
DIST_SUBDIRS lines with
SUBDIRS = include . doc example
DIST_SUBDIRS = include . doc example
(you'll be taking off the python)
EXTRA_DIST line, remove check-xml-test-suite.py and
LDFLAGS = -flat_namespace
archive_cmds, line 184, stick in
-dynamiclib), so it looks like this:
archive_cmds="\$CC \$(test .\$module = .yes && echo -bundle || echo -dynamiclib) -flat_namespace \$allow_undefined_flag -o \$lib \$libobjs \$deplibs\$linkopts -install_name \$rpath/\$soname \$(test -n \\\"\$verstring\\\" -a x\$verstring != x0.0 && echo \$verstring)"
% make(go out to dinner)
% sudo make install
(this scatter sstuff into /usr/local/bin, lib, and include)
make uninstall to get rid of things
PYTHON setting to say
in the SUBDIRS section, remove the
python \ line
Apply same fix to libtool as above
% sudo make install
nsxml.tgzpackage and cd into the resulting directory
Makefileand add a
CFLAGS += -I/usr/local/include/libxml2 -I/usr/local/include/libxslt -I/usr/local/libxslt
% cp nsxml.so /usr/local/aolserver/bin
postgresql-driver.tgzand cd to the resulting directory
% sudo ranlib /usr/local/pgsql/lib/libpq.a
Makefile. Before the
MOD = postgres.soline add
PGINC = /usr/local/pgsql/include
PGLIB = /usr/local/pgsql/lib
OBJS line to this:
OBJS = postgres.o -L$(PGLIB)
There's something odd about the bit of shell script in this makefile. Rather than take the time to figure it out, I just hard code the paths.
% cp postgres.so /usr/local/aolserver/bin
-lsslto your PGLIB line in the makefile.
% cp nscache.so /usr/local/aolserver/bin
% cp nsrewrite.so /usr/local/aolserver/bin
% cp nssha1.so /usr/local/aolserver/bin
% sudo mkdir /web
% sudo chown markd /web
% cd /web
% cvs -z3 -d :pserver:firstname.lastname@example.org:/cvsroot login
% cvs -z3 -d :pserver:email@example.com:/cvsroot checkout -r oacs-4-6 openacs-4
% mv oacs-4-6 openacs
/usr/local/aolserver, a bad habit from my arsDigita days. There's a couple of tweaks you may need to make:
set serverline. change "birdnotes" to "openacs". Change "set servername" to "OpenACS Playground"
pthread_stacksizeerror on launch, change the stack size to a value that's an even multiple of 4096, like 249856.
127.0.0.1. Mac OS X has a nasty habit of dropping the ethernet device when there's no phyiscal cable hooked up to the machine and the airport can't find the network. The loopback address will always work.
% cd /usr/local/aolserver
% bin/nsd -fkt ./openacs.tcl
- Wait a bit and watch it load stuff. When you see "
nssock: accepting connections", point your web browser to http://127.0.0.1:8000
You should see a welcome page.
- click the Next button.
- go get a snack while it loads some data model stuff
- click the Next button again
- go get another snack while it loads more stuff
- click Next again and fill out admin stuff
- the web server will exit. re-run it and reload your browsre
- Have fun! you should now have a functional OpenACS install