Forum OpenACS Development: Re: AOLserver 4 Setup

Collapse
3: Re: AOLserver 4 Setup (response to 1)
Posted by Randy O'Meara on
Vinod,

No error messages at all. This isn't a real high priority item since I can do what I have to do with the older 331_oacs1 version. I'm trolling and collecting information that will help when I attack this issue again.

Malte,

You mentioned (on Oct 31 2003 02:56:34 https://openacs.org/forums/message-view?message_id=135959) that you had created detailed instructions that work (unmodified) for both OS X and Linux. Can you post them here?

I would like to have your new docs available when/if I get time to look at this again. So, if you don't want to post them here publically, could you send them privately? The first thing that I would do is establish the *exact* versions and pedigree of all components. Does your doc provide concrete links to each required component? nsrewrite was one component I questioned the last time around.

BTW, there's another user over in the dotlrn forum (today) that says his service hangs after some number of page requests. It's by no means certain that this is the same issue. But it could be a second data point. Essentially the same OS (RH AS vs. RH 9), different DB (oracle vs. pg), same oacs code base (oacs5/dotlrn2 vs. oacs HEAD). I've asked the poster to provide AS version.

Randy

Collapse
4: Re: AOLserver 4 Setup (response to 3)
Posted by Chris Davies on
After much ado, I do have both the OpenACS 5.0 tarball and OpenACS 5.0 CVS running under Aolserver 4.b10.

Other than the core, adding almost any package results in an error, but other than that, for a development platform, it has worked through about 2 hours of development moving a package I wrote under 4.6.3.

Data points:

Debian/Sid, Postgresql 7.3.4-9. Aolserver 4 beta 10, openacs 5.0 tarball as published on openacs.org, and openacs cvs

Wasn't using any dotlrn code in either install.

Collapse
5: Re: AOLserver 4 Setup (response to 3)
Posted by Malte Sussdorff on
This is just a quick rundown on what I did and how I succeded in getting OpenACS to run using "OS X" or Linux. The first version deals with Postgres.... If you think it looks fairly alike to Vinods instructions, no wonder, they are based on them 😉.

Installing Postgres

  1. Get and install Readline (unless it is already installed on your system):
    1. Download readline from http://ftp.gnu.org/pub/gnu/readline/readline-4.3.tar.gz into /usr/local/src
    2. Extract readline in /usr/local/src:
      $ cd /usr/local/src
      $ tar xvfz readline-4.3.tar.gz
    3. Change into readline directory, configure and compile:
      $ cd readline-4.3
      $ ./configure
      $ make
      $ sudo make install
  2. Get Postgres 7.3.4 (or newer) from one of the mirrors at http://www.postgresql.org/mirrors-ftp.html
  3. Extract Postgres in /usr/local/src:
    $ tar xvfz postgresql-7.3.4.tgz
  4. Change into Postgres directory, configure and compile:
    $ cd postgresql-7.3.4
    $ ./configure
    $ make
    $ sudo make install
  5. Add the binary location of Postgres to your path:
    echo "PATH=\$PATH:/usr/local/pgsql/bin" >>~/.profile
  6. Initialize your database. You might have to add "--no-locale" to it, if you get an error here:
    $ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
  7. Start Postgres:
    $ pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/server.log start
    $ createlang plpgsql template1
    $ createdb openacs
    $ createuser openacs
    (Answer 'Y' twice)
  8. Make it start automatically:
    1. OS X: You can easily create a StartupItem for OS X to achieve this. If you would like PostgreSQL to start up automatically when the system comes up, then you can untar this archive into /Library/StartupItems: postgres-startup-item.tgz
    2. Linux: Depending on your Linux Distribution, create a startup-script in /etc/init.d/. Check chapter 8 of the Postgres Installation Instructions at https://openacs.org/doc/openacs-HEAD/postgres.html

Install TCL 8.4.4 or newer

  1. $ cd /usr/local/src
  2. Download TCL from http://prdownloads.sourceforge.net/tcl/tcl8.4.4-src.tar.gz.
  3. Extract TCL:
    $ tar xvfz tcl8.4.4-src-tar.gz
  4. Change into TCL directory, make and install:
    $ cd tcl8.4.4/unix
    $ ./configure --enable-threads
    $ make
    $ sudo make install

Install AOLserver

I'm using the CVS checkout of AOLserver for the time beeing. Not sure if it is very wise, but it works.
  1. Get AOLserver and a couple of modules needed
    $ mkdir /usr/local/src/aolserver
    $ cd /usr/local/src/aolserver
    $ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver login (and hit return)
    $ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co aolserver
    $ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nscache
    $ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nsrewrite
    $ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nspostgres
    $ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nssha1
  2. Configure, compile and install AOLserver
    cd aolserver
    /usr/local/src/aolserver/aolserver/$ ./configure --with-tcl=/usr/local/lib/
    /usr/local/src/aolserver/aolserver/$ sudo make install
  3. Make and install the modules
    $ cd ../nscache
    /usr/local/src/aolserver/nscache$ sudo make install
    /usr/local/src/aolserver/nscache$ cd ../nsrewrite
    /usr/local/src/aolserver/nsrewrite$ sudo make install
  4. 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;
  5. Compile nssha1:
    /usr/local/src/aolserver/nssha1$ sudo make install
    /usr/local/src/aolserver/nssha1$ cd ../nspostgres
  6. nspostgres doesn't link out ouf the box. Add -lnsdb to the MODLIBS var in the Makefile:
    MODLIBS = -L$(PGLIB) -lpq -lnsdb
  7. Compile nspostgres:
    $ sudo make install POSTGRES=/usr/local/pgsql ACS=1
  8. If you run into ranlib problems with libpq.a, do the following:
    sudo ranlib /usr/local/pgsql/lib/libpq.a

Installing tDOM

  1. Get and extract tdom from http://tdom.org/tDOM-0.7.8.tar.gz:
    /usr/local/src/$ wget http://tdom.org/tDOM-0.7.8.tar.gz
    $ tar xvfz tDOM-0.7.8.tar.gz
    $ cd tDOM-0.7.8
  2. 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=/usr/local/lib
  3. Configure tdom:
    $ cd /usr/local/src/tDOM-0.7.8/unix
    $ sh CONFIG
  4. Make,install and link tdom into AOLserver (no need to load the module in config.tcl or call package require):
    $ sudo make install
    sudo ln -s /usr/local/aolserver/lib/tdom0.7.8/tdom.tcl /usr/local/aolserver/modules/tcl/

Tclwebtest, Daemontools and OpenACS download

  1. Download tclwebtest:
    $ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/tclwebtest login
    $ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/tclwebtest co tclwebtest
    sudo mv tclwebtest /usr/local/
  2. Install Daemontools following the docs at http://cr.yp.to/daemontools/install.html
  3. Download OpenACS to /web:
    /web/$ cvs -z3 -d :pserver:anonymous@openacs.org:/cvsroot co openacs-4
  4. If you want to have dotlrn:
    $ cd /web/openacs-4/packages
    $ cvs -q -d :pserver:anonymous:@dotlrn.openacs.org:/dotlrn-cvsroot login
    $ cvs -q -z3 -d :pserver:anonymous@dotlrn.openacs.org:/dotlrn-cvsroot co dotlrn-core

Install OpenACS

  1. Edit nsd.tcl (a.k.a. config.tcl).
    1. Change server to whatever you want to call your server.
    2. Set serverroot to wherever you put your OpenACS CVS (should be /web/servername, see step above)
    3. Add nsdb to the modules list ns_section ns/server/${server}/modules ns_param nsdb ${bindir}/nsdb.so
    4. Remove libtdom.so from the modules list
    5. If 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
      Change the stacksize to 2048000 (or any number divisible by 4096)
  2. Set some permissions:
    chmod 755 /usr/local/aolserver/log
  3. Start it!
    $ /usr/local/aolserver/bin/nsd -b your_ip_address:your_port_number -ft /web/openacs/etc/config.tcl
  4. If it worked, start it with daemontools:
    1. Edit /web/yourserverlocation/etc/daemontools/run. Change the "exec" line to reflect your startup above. Note the additional "i" switch.
    2. Link it with SVC:
      ln -s /web/yourserverlocation/etc/daemontools/ /service/yourservername
    3. It should have been automatically started.