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.
% ./configure
#include "port/darwin/sem.h"
#include <sys/sem.h>
src/backend/storage/ipc/ipc.c
src/backend/storage/lmgr/proc.c
and src/backend/storage/lmgr/spin.c
src/backend/port/darwin/Makefile
: sem.o
from the OBJS
setting
% make
% 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/bin
into 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 openacs
and 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_buffers
and set it to a larger value (I use 16384)
/System/Library/StartupItems/SystemTuning/SystemTuning
to 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
root
% cd root/aolserver/include
Makefile.global
.
Search for "Mac OS X". Find the
LDSO
line and add -flat_namespace
to it. The
resulting line should look like:LDSO=$(LD) -bundle -undefined suppress -flat_namespace
% cd .. (into aolserver)
% make
% sudo make install
/usr/local/aolserver/
% sudo chown -R markd /usr/local/aolserver
nssock.so
or other shared
libraries, add the lineset ext .so
opeancs.tcl
configuration 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.gz
for the above tarball)
% ./configure
Makefile
:
replace the PYTHON
line with
PYTHON =
replace the SUBDIRS
and DIST_SUBDIRS
lines with
SUBDIRS = include . doc example
DIST_SUBDIRS = include . doc example
(you'll be taking off the python)
in the EXTRA_DIST
line, remove check-xml-test-suite.py and genUnicode.py
add -flat_namespace
to LDFLAGS
:
LDFLAGS = -flat_namespace
libtool
:
archive_cmds
, line 184, stick in -flat_namespace
after -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)
you can make uninstall
to get rid of things
% ./configure
-flat_namespace
to LDFLAGS
change the PYTHON
setting to say
PYTHON =
in the SUBDIRS section, remove the python \
line
in DIST_SUBDIRS
, remove python
Apply same fix to libtool as above
% make
% sudo make install
nsxml.tgz
package and cd into the resulting directory
Makefile
and add a CFLAGS
before the include
statement:CFLAGS += -I/usr/local/include/libxml2 -I/usr/local/include/libxslt -I/usr/local/libxslt
% make
% cp nsxml.so /usr/local/aolserver/bin
postgresql-driver.tgz
and cd to the resulting directory
% sudo ranlib /usr/local/pgsql/lib/libpq.a
Makefile
. Before the MOD = postgres.so
line addPGINC = /usr/local/pgsql/include
PGLIB = /usr/local/pgsql/lib
change the 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.
% make
% cp postgres.so /usr/local/aolserver/bin
-lcrypto
and -lssl
to your PGLIB line in the makefile.
nscache
% make
% cp nscache.so /usr/local/aolserver/bin
nsrewrite
% make
% cp nsrewrite.so /usr/local/aolserver/bin
nssha1
% make
% cp nssha1.so /usr/local/aolserver/bin
% sudo mkdir /web
% sudo chown markd /web
% cd /web
% cvs -z3 -d :pserver:anonymous@openacs.org:/cvsroot login
% cvs -z3 -d :pserver:anonymous@openacs.org:/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 server
line. change "birdnotes" to "openacs". Change "set servername" to "OpenACS Playground"
pthread_stacksize
error 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.
nsadmin
with openacs
% 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