Another Mac OS X OpenACS Installation Guide
I installed OpenACS 5.0 on my PowerBook G4. Everyone should read MarkD’s guide since it’s more comprehensive and explains a lot of the changes that I don’t explain. I used some different software versions which made my experience different enough to document.
This is a quick and dirty document for people who have installed OpenACS 4. If I haven’t been clear enough or if I’ve made mistakes, please let me know.
Apparently, these instructions may also help you install OpenACS on FreeBSD
- look at Andrei’s instructions if you’re doing that.
Software Versions
All of the AOLserver modules were obtained from CVS (2003-09-14).
- Postgresql 7.3.4
- AOLserver 4.0b14
- nscache CVS
- nsrewrite CVS
- nssha1 CVS
- nspostgres CVS
- tDom 0.78
- OpenACS CVS
Install Postgresql
-
./configure
- fails on readline not being installed -
Install readline:
$ fink install readline
-
Configure
$ ./configure --with-includes=/sw/include --with-libs=/sw/lib
-
Compile
$ make $ sudo make install
-
Create the database directory and give yourself permission over it.
$ sudo mkdir /usr/local/pgsql/data $ sudo chown vinod.staff /usr/local/pgsql/data
-
change
$PATH
. Add/usr/local/pgsql/bin
to the PATH variable in your~/.profile
-
I tried doing an initdb next and it worked, but then I got the following error when starting PG.
FATAL: invalid value for option 'LC_TIME': 'en_US'
-
I found Tom Lane’s answer:
$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data --no-locale
-
Start it.
$ pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/server.log start $ createlang plpgsql template1 $ createdb openacs $ createuser openacs (Answer 'Y' twice)
Install AOLserver
I’m going to use AOLserver 4. Previous versions of AOLserver came bundled
with a customized version of TCL, but AOLserver 4 can use the standard TCL
releases, as long as TCL was built with thread support. Mac OS X 10.2 comes
with TCL 8.3.x, but without thread support. Fink currently has TCL 8.4.1,
but also without thread support. So, the right solution is to download TCL
and build it manually. But I had already downloaded Fink’s version, so I
just manually edited the .info file that specifies how to build TCL and
added --enable-threads
. Of course, when the next version of TCL gets
uploaded to the Fink repository, I’ll be screwed, but I’m too lazy to
compile TCL again right now.
-
Configure and Compile AOLserver
/usr/local/src/aolserver/aolserver$ ./configure --with-tcl=/sw/lib /usr/local/src/aolserver/aolserver$ sudo make install
-
Install nscache and nsrewrite
/usr/local/src/aolserver/nscache$ sudo make install /usr/local/src/aolserver/nsrewrite$ sudo make install
-
nssha1 doesn’t compile without editing nssha1.c. Comment out the following 2 lines (lines 139-140):
// typedef unsigned int u_int32_t; // typedef unsigned char u_int8_t;
-
Compile nssha1
/usr/local/src/aolserver/nssha1$ sudo make install
-
nspostgres doesn’t link outta the box. Add
-lnsdb
to the MODLIBS var in the Makefile:MODLIBS = -L$(PGLIB) -lpq <b>-lnsdb</b>
-
Compile nspostgres
/usr/local/src/aolserver/nspostgres$ sudo make install POSTGRES=/usr/local/pgsql ACS=1
Install tDom 0.78
-
Edit
/usr/local/src/tDOM-0.7.8/unix/CONFIG
-
Uncomment the instructions meant for AOLserver 4, but edit it to look like this:
../configure --enable-threads --disable-tdomalloc \ --prefix=/usr/local/aolserver --with-tcl=/sw/lib
-
OpenACS 5 will notice that you’re using AOLserver 4 and will automatically call ‘package require tdom’. You shouldn’t have to do anything special to get tDOM working with OpenACS 5.
Get ready to start
-
Get OpenACS CVS.
-
Edit config.tcl (a.k.a. nsd.tcl).
-
Change
server
toopenacs
. -
Set
serverroot
to wherever you put your OpenACS CVS -
The config.tcl file that comes with OpenACS 5 will properly load nsdb.so (and ignore libtdom.so) if you’re using AOLserver 4.
-
Change the
stacksize
to2048000
. If the number you choose is not divisible by 4096, then you get:\[15/Sep/2003:19:08:02\]\[1997.2684358124\]\[-main-\] Notice: PostgreSQL loaded. nsthreads: pthread_attr_setstacksize failed in NsCreateThread: Invalid argument Abort trap
-
-
Set some permissions:
chmod 755 /usr/local/aolserver/log
-
Start it!
$ /usr/local/aolserver/bin/nsd -ft /web/openacs/etc/config.tcl
Changelog
- 2004-01-23 - Pointed to Andrei’s FreeBSD document. Simplified instructions which are automatically taken care of by OpenACS 5
- 2004-01-05 - Added fixes from Jeff Davis.
- 2003-09-14 - Initial Revision