Index: openacs-4/packages/acs-core-docs/www/aolserver4.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/aolserver4.html,v diff -u -N -r1.16 -r1.17 --- openacs-4/packages/acs-core-docs/www/aolserver4.html 29 Jun 2004 15:50:14 -0000 1.16 +++ openacs-4/packages/acs-core-docs/www/aolserver4.html 16 Feb 2005 00:21:02 -0000 1.17 @@ -1,82 +1,112 @@ -Install AOLserver 4

Install AOLserver 4

by Malte Sussdorff

+Install AOLserver 4

Install AOLserver 4

by Malte Sussdorff

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -
  1. Retrieve TCL 8.4 (or higher).�Download and install TCL 8.4

    If you have not installed TCL already, download the latest TCL version from Sourceforge

    Remember that you have to be root if you want to follow these instructions. On Mac OS X type sudo su - to become root.

    Alternatively use curl -L -O instead of wget (especially on Mac OS X.

    [root root]# cd /usr/local/src
    -[root src]# wget http://heanet.dl.sourceforge.net/sourceforge/tcl/tcl8.4.6-src.tar.gz
    -[root src]# tar xfz tcl8.4.6-src.tar.gz
    -[root src]# cd tcl8.4.6/unix
    +        
  1. Check suitability of previously installed TCL.�Start tcl (type tclsh or find it using which tclsh). +

    [root root]% info exists tcl_platform(threaded)
    +1
    +[root root]% info patchlevel
    +8.4.7
    +[root root]%
    +tclsh
    +info exists tcl_platform(threaded)
    +info patchlevel
    +

    If the first command returns anything other than 1, + then tcl is not threaded. If tcl is threaded and the version is 8.4 or higher, then installing + tcl from source is optional. +

    Retrieve TCL 8.4 (or higher).�Download and install TCL 8.4 from source

    Note for Debian users: you can apt-get install + tcl8.4-dev if you have the right version (stable users will need + to add tcl8.4 to their sources.list file as described on the + Install Postgres page). You'll + have to use /usr/lib/tcl8.4/ instead of /usr/local/lib when you + try to find the tcl libraries, however.

    If you have not installed TCL already, download the latest TCL version from Sourceforge

    Debian: + apt-get install + tcl8.4 tcl8.4-dev and proceed to + the next step. In that step, replace + --with-tcl=/usr/local/lib/ with + --with-tcl=/usr/lib/tcl8.4.

    Remember that you have to be root if you want to follow these instructions. On Mac OS X type sudo su - to become root.

    Alternatively use curl -L -O instead of wget (especially on Mac OS X).

    [root root]# cd /usr/local/src
    +[root src]# wget http://heanet.dl.sourceforge.net/sourceforge/tcl/tcl8.4.9-src.tar.gz
    +[root src]# tar xfz tcl8.4.9-src.tar.gz
    +[root src]# cd tcl8.4.9/unix
     [root unix]# ./configure --enable-threads
     [root unix]# make install
     [root root]# 
     cd /usr/local/src
    -wget http://heanet.dl.sourceforge.net/sourceforge/tcl/tcl8.4.6-src.tar.gz
    -tar xfz tcl8.4.6-src.tar.gz
    -cd tcl8.4.6/unix
    +wget http://heanet.dl.sourceforge.net/sourceforge/tcl/tcl8.4.9-src.tar.gz
    +tar xfz tcl8.4.9-src.tar.gz
    +cd tcl8.4.9/unix
     ./configure --enable-threads
     make install
           
  2. Retrieve AOLserver.�Download the aolserver from CVS.

    [root root]# cd /usr/local/src
    -[root src]# mkdir aolserver40r5
    -[root src]# cd aolserver40r5
    +[root src]# mkdir aolserver40r10
    +[root src]# cd aolserver40r10
     [root aolserver]# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver login
    -[root aolserver]# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co  -r aolserver_v40_r5 aolserver
    +[root aolserver]# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co  -r aolserver_v40_r10 aolserver
     [root aolserver]# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nscache
     [root aolserver]# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nspostgres
     [root aolserver]# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nssha1
     [root aolserver]# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co -r v2_7 nsoracle
    -[root aolserver]# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nsxml
     [root aolserver]# wget http://www.tdom.org/tDOM-0.7.8.tar.gz
     [root aolserver]# tar xvfz tDOM-0.7.8.tar.gz
     [root root]# 
     cd /usr/local/src
    -mkdir aolserver40r5
    -cd aolserver40r5
    -cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co -r aolserver_v40_r5 aolserver
    +mkdir aolserver40r10
    +cd aolserver40r10
    +cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co -r aolserver_v40_r10 aolserver
     cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nscache
     cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nspostgres
     cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nssha1
     cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co -r v2_7 nsoracle
    -cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nsxml
    -wget http://www.tdom.org/tDOM-0.7.8.tar.gz
    -tar xvfz tDOM-0.7.8.tar.gz
  3. Configure, compile and install AOLserver.�Many people need to run more than one version of AOLserver in parallel. This section accomodates future upgrades by installing AOLserver 4 in /usr/local/aolserver40r5.

    [root aolserver]# cd /usr/local/src/aolserver40r5/aolserver
    -[root aolserver]# ./configure --prefix=/usr/local/aolserver40r5 --with-tcl=/usr/local/lib/
    +wget http://www.tdom.org/files/tDOM-0.8.0.tar.gz
    +tar xvfz tDOM-0.8.0.tar.gz
  4. Configure, compile and install AOLserver.�Many people need to run more than one version of AOLserver in parallel. This section accomodates future upgrades by installing AOLserver 4 in /usr/local/aolserver40r9.

    [root aolserver]# cd /usr/local/src/aolserver40r10/aolserver
    +[root aolserver]# ./configure --prefix=/usr/local/aolserver40r10 --with-tcl=/usr/local/lib/
     [root aolserver]# make install
    -cd /usr/local/src/aolserver40r5/aolserver
    -./configure --prefix=/usr/local/aolserver40r5 --with-tcl=/usr/local/lib/
    +cd /usr/local/src/aolserver40r10/aolserver
    +./configure --prefix=/usr/local/aolserver40r10 --with-tcl=/usr/local/lib/
     make install
    -ln -s /usr/local/aolserver40r5 /usr/local/aolserver

    If this is the only version of AOLserver in use, or is the default version, create a symlink. If not, then be sure to use /usr/local/aolserver40r5 instead of /usr/local/aolserver in future steps.

    [root aolserver]# ln -s /usr/local/aolserver40r5 /usr/local/aolserver
  5. Configure, compile and install the modules.� -

    1. Install nscache

      [root aolserver]# cd /usr/local/src/aolserver40r5/nscache
      -[root nscache]# make install
    2. Install nsoracle (if you want to use Oracle)

      [root nscache]# cd ../nsoracle
      -[root nsoracle]# make install
    3. Install nspostgres (if you want to use Postgres)

      [root nsrewrite]# cd ../nspostgres
      -[root nspostgres]# make install POSTGRES=LSB ACS=1 INST=/usr/local/aolserver40r5 

      If you get errors like:

      nspostgres.c: In function `Ns_PgTableList':
      +

      If this is the only version of AOLserver in use, or is the default version, create a symlink. If not, then be sure to use /usr/local/aolserver40r10 instead of /usr/local/aolserver in future steps and check any scripts and makefiles you run to ensure they use the correct path.

      [root aolserver]# ln -s /usr/local/aolserver40r10 /usr/local/aolserver
    4. Configure, compile and install the modules.� +

      OpenACS looks for the Oracle driver at + /usr/local/aolserver/bin/ora8.so, but some versions of + nsoracle may create nsoracle.so instead. In that case, you + can symlink (ln -s nsoracle.so ora8.so) to fix it.

      1. Install nscache

        [root aolserver]# cd /usr/local/src/aolserver40r10/nscache
        +[root nscache]# make install AOLSERVER=/usr/local/aolserver40r10
      2. Install nsoracle (if you want to use Oracle)

        [root nscache]# cd ../nsoracle
        +[root nsoracle]# make install AOLSERVER=/usr/local/aolserver40r10
      3. Install nspostgres (if you want to use Postgres)

        [root nscache]# cd ../nspostgres
        +[root nspostgres]# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib[root nspostgres]# make install POSTGRES=LSB ACS=1 INST=/usr/local/aolserver40r10  AOLSERVER=/usr/local/aolserver40r10
        +              

        If you get errors like:

        nspostgres.c: In function `Ns_PgTableList':
         nspostgres.c:679: warning: passing arg 3 of `Tcl_DStringAppend' as signed due to prototype

        then PostGreSQL is probably not in the standard location. The location of PostGreSQL is very dependent on which method was used to install it. To correct the problem, replace LSB with the path to the path to your PostGreSQL installation. Often this is /usr/local/pgsql.

        Another possibility is that you may need to set the LD_LIBRARY_PATH environmental variable. You may still get warnings, but sometimes this will fix things enough to work.

        [root nspostgres]# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
                       

        You can use the ldd command to verify that all libraries are linked in: - ldd nspostgres.so -

        If you run into problems with libpq.a do the following (and repeat the step above)

        [root nspostgres]# ranlib /usr/local/pgsql/lib/libpq.a

        If you run into problems with the linker, edit the Makefile. Add -lnsdb to the MODLIBS var.

        MODLIBS = -L$(PGLIB) -lpq -lnsdb
      4. Install nssha1

        [root nsrewrite]# cd ../nssha1
        -[root nssha1]# make

        If the make fails you will have to edit nssha1.c. Comment out the following 2 lines (lines 139-140):

        // typedef unsigned int u_int32_t;
        -// typedef unsigned char u_int8_t;

        Now install nssha1:

        [root nssha1]# make install
      5. Install tDOM

        [root nssha1]# cd ../tDOM-0.7.8/unix

        Edit the CONFIG file. Uncomment the instructions meant for AOLserver 4, but edit it to look like this:

        ../configure --enable-threads --disable-tdomalloc
        -          --prefix=/usr/local/aolserver40r5 --with-tcl=/usr/local/lib

        Now you can compile and configure tDOM

        [root unix]# sh CONFIG
        +                ldd /usr/local/src/aolserver40r8/nspostgres/nspostgres.so
        +              

        If you run into problems with libpq.a do the following (and repeat the step above)

        [root nspostgres]# ranlib /usr/local/pgsql/lib/libpq.a

        If you run into problems with the linker, edit the Makefile. Add -lnsdb to the MODLIBS var.

        MODLIBS = -L$(PGLIB) -lpq -lnsdb
      6. Install nssha1

        [root nspostgres]# cd ../nssha1

        Now install nssha1:

        [root nssha1]# make install AOLSERVER=/usr/local/aolserver40r10

        If the make fails you will have to edit nssha1.c. Comment out the following 2 lines (lines 139-140):

        // typedef unsigned int u_int32_t;
        +// typedef unsigned char u_int8_t;
      7. Install tDOM

        [root nssha1]# cd ../tDOM-0.7.8/unix

        Edit the CONFIG file. Uncomment the instructions meant for AOLserver 4, but edit it to look like this:

        ../configure --enable-threads --disable-tdomalloc
        +          --prefix=/usr/local/aolserver40r10 --with-tcl=/usr/local/lib

        Now you can compile and configure tDOM

        [root unix]# sh CONFIG
         [root unix]# make install

    5. Add a database-specific wrapper script.�This script sets database environment variables before starting AOLserver; this allows the AOLserver instance can communicate with the database. There is one script each for Oracle and PostgreSQL. They don't conflict, so if you plan - to use both databases, install both.

      • Oracle

        [root aolserver]# cd /usr/local/aolserver40r5/bin
        +	  to use both databases, install both.
        +      Note that this section requires you to have the OpenACS, which
        +      you can get through CVS, through a tarball, or by other
        +      means. You can come back to this section after you acquire the
        +      OpenACS code, but don't forget to come back. (Note to
        +      maintainers: this should be moved to the next page and
        +      integrated into the text there)
        +    

        • Oracle

          [root aolserver]# cd /usr/local/aolserver40r8/bin
           [root bin]# cp /tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
           [root bin]# chmod 750 nsd-oracle
           [root bin]#
          -cd /usr/local/aolserver40r5/bin
          -cp /tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
          -chmod 750 nsd-oracle
        • PostgreSQL

          [root aolserver]# cd /usr/local/aolserver40r5/bin
          -[root bin]# cp /tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
          +cd /usr/local/aolserver40r10/bin
          +cp /var/tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
          +chmod 750 nsd-oracle
        • PostgreSQL

          [root aolserver]# cd /usr/local/aolserver40r10/bin
          +[root bin]# cp /var/tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
           [root bin]# chmod 755 nsd-postgres
           [root bin]#
          -cd /usr/local/aolserver40r5/bin
          -cp /tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
          +cd /usr/local/aolserver40r10/bin
          +cp /var/tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
           chmod 755 nsd-postgres

        You may need to edit these scripts if you are not using /usr/local/aolserver as the directory of Aolserver4.

      • Change startup script (optional).�If you want to run AOLserver on a port below 1024 (normally, for a webserver you will use 80), you will have to change the /var/lib/aolserver/service0/etc/daemontools/run script according to the documentation found there (namely: Add the -b yourip:yourport switch)

      • Test AOLserver.

    ($Id$)
View comments on this page at openacs.org