Index: openacs-4/packages/acs-core-docs/www/aolserver.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/aolserver.html,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/aolserver.html 28 Feb 2003 05:36:03 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/aolserver.html 24 Jun 2003 03:58:11 -0000 1.10 @@ -1,275 +1,155 @@ -Install AOLserver 3.3+ad13

Install AOLserver 3.3+ad13

+Install AOLserver 3.3oacs1

Install AOLserver 3.3oacs1

by Vinod Kurup
- OpenACS docs are written by the named authors, but may be edited + OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

Download the Distribution

- Mat Kovach is graciously maintaining an AOLServer distribution that - includes all the patches and modules needed to run OpenACS 4.6. These - instructions will describe how to install using his source - distribution. He also has binaries for SuSE 7.3 and OpenBSD 2.8 (and - perhaps more to come), currently located at uptime.openacs.org. -

- It's also possible to download all the pieces and patches yourself: -

- - .... or just Download Mat's - AOLServer distribution to - /tmp - -

-joeuser:~$ cd /tmp
-joeuser:/tmp$ wget -c http://uptime.openacs.org/aolserver-openacs/aolserver3.3ad13-oacs1-beta-src.tar.gz
-joeuser:/tmp$ cd

- +

This page assumes you have downloaded aolserver to to +/tmp/aolserver3.3oacs1.tar.gz. If not, +get it. It also assumes you are following the 5.0.0-P or 5.0.0-O Reference Platform installation, using Red Hat 8.0. Places where other systems are different are noted.

  1. As root, untar - aolserver3.3ad13-oacs1-beta-src.tar.gz - into /usr/local/src + aolserver3.3oacs1.tar.gz + into /usr/local/src. -

    -joeuser:~$ su -
    -Password: **********
    -root:~# cd /usr/local/src
    -root:/usr/local/src# tar xzf /tmp/aolserver3.3ad13-oacs1-beta-src.tar.gz
    -root:/usr/local/src# chown -R root.root aolserver

Set up your user account

- - AOLserver needs to be started as the root user if you want to use - port 80. Once it starts, though, it will drop the root privileges and - run as another user, which you must specify on the command line. It's - important that this user has as few privileges as possible. Why? - Because if an intruder somehow breaks in through AOLserver, you don't - want him to have any ability to do damage to the rest of your - server. At the same time, AOLserver needs to have write access to - some files on your system in order for OpenACS to function - properly. So, we'll run AOLserver as the - nobody user and the - web group. We'll add your regular - user account to the web group and - make sure that OpenACS files are group readable and writable. - -

  • - Run these commands: -

    -root:/usr/local/src# cd
    -root:~# groupadd web
    -root:~# adduser joeuser web
    -root:~# exit

- - Next, we'll set up our environment variables. Add the following lines - to your /home/joeuser/.bash_profile: - -

-joeuser:~$ emacs .bash_profile

- - Add the first set of lines, if you're using Oracle. The 2nd set of - lines, if you're using PostgreSQL. Oracle Note: - These environment variables are specific for a local Oracle - installation communicating via IPC. If you are connecting to a remote - Oracle installation, you'll need to adjust these appropriately. Also, - make sure that the '8.1.7' matches your Oracle version. - -

-# For Oracle
-export ORACLE_BASE=/ora8/m01/app/oracle
-export ORACLE_HOME=$ORACLE_BASE/product/8.1.7
-export PATH=$PATH:$ORACLE_HOME/bin
-export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
-export ORACLE_SID=ora8
-export ORACLE_TERM=vt100
-export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
-   
-# For PostgreSQL
-export PATH=$PATH:/usr/local/pgsql/bin
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib

- - Be absolutely certain that you have entered these lines correctly and - that you have saved the file - a slight error in these lines can lead - to many inscrutable error messages. Logout and log back in so these - settings will take effect. Use the - echo command to be sure that the - environment variables have been properly assigned. - -

-joeuser:~$ exit
-LOGIN: joeuser
-Password: *********
-joeuser:~$ echo $PATH
-...some other directory paths...:/usr/local/pgsql/bin
-joeuser:~$ echo $LD_LIBRARY_PATH
-:/usr/local/pgsql/lib

- - Note: The result should be different if you're using Oracle. - /ora8/m01/app/oracle/product/8.1.7 - should have been in $PATH. - -

Install libxml2 & headers

- - In order for nsxml to compile, you need libxml2 - (available from http://xmlsoft.org). On Debian, - this can be installed by doing apt-get install - libxml2-dev. Users of other distributions can - download rpms from rpmfind.net. You'll - need the libxml2 and - libxml2-devel packages. -

Compile and install AOLserver

  • Prepare the distribution. You need to be root.

    -joeuser:~$ su -p
    -Password: ********
    -root:~# mkdir -p /usr/local/aolserver
    -root:~# cd /usr/local/src/aolserver
    -root:/usr/local/src/aolserver# ./conf-clean
    +    

    [root@yourserver root]# cd /usr/local/src
    +[root@yourserver src]# tar xzf /tmp/aolserver3.3oacs1.tar.gz
    +[root@yourserver src]#
    +
    cd /usr/local/src
    +tar xzf /tmp/aolserver3.3oacs1.tar.gz
  • Compile and install AOLserver. First, prepare the installation directory and the source code. The message about BUILD-MODULES can be ignored.

    root@yourserver root]# mkdir -p /usr/local/aolserver
    +[root@yourserver root]# cd /usr/local/src/aolserver
    +[root@yourserver aolserver]# ./conf-clean
     cat: BUILD-MODULES: No such file or directory
    -Done.
  • - - Put the name of the driver(s) that you want into - conf-db. This can be - "postgresql", - "oracle", or the word - "both" if you want both drivers - installed. - -

    -root:/usr/local/src/aolserver# echo "postgresql" > conf-db
  • - - conf-inst should contain the - location where AOLserver is to be installed. This defaults to - /usr/local/aolserver, so we - don't need to change it. - -

  • - - conf-make should contain the +Done. +[root@yourserver aolserver]#

    mkdir -p /usr/local/aolserver
    +cd /usr/local/src/aolserver
    +./conf-clean

    + If you are using Oracle, edit + conf-db and change + postgresql to + oracle, or to the word + both if you want both drivers + installed. In order to get nsoracle to compile, you may + need to su - oracle, and then su (without the -) root to set + the environment variables properly. +

    conf-inst should contain the + location where AOLserver is to be installed. Overwrite the + tarball's default value with our default value, /usr/local/aolserver:

    [root@yourserver aolserver]# echo "/usr/local/aolserver" > conf-inst
    +[root@yourserver aolserver]#

    conf-make should contain the name of the GNU Make command on your system. It defaults to - gmake. You may need to change - this to make. -

    -root:/usr/local/src/aolserver# echo "make" > conf-make
  • - If you're going to be installing the Postgresql driver, you'll - have to adjust the makefile first. This will hopefully be cleaned - up in future versions of this distribution. -

    -root:/usr/local/src/aolserver# emacs pgdriver/makefile

    - Edit the lines containing PGLIB and PGINC so they look like this: -

    -PGINC=/usr/local/pgsql/include
    -
    -PGLIB=/usr/local/pgsql/lib
  • Compile and install AOLserver and modules

    -root:/usr/local/src/aolserver# ./conf

    - - This takes about 5 minutes. All of the results are logged to - files in - /usr/local/src/aolserver/log. Make - sure to check these files to see if any errors occurred. - -

Set File Permissions

- - In order to test AOLserver, we'll run it using the sample-config.tcl - file provided in the AOLserver distribution. We need to adjust - permissions a little since AOLserver needs to be able to write its - logs properly. - -

-root:/usr/local/src/aolserver# cd /usr/local/aolserver
-root:/usr/local/aolserver# chown -R root.web log servers
-root:/usr/local/aolserver# chmod -R g+w log servers
-root:/usr/local/aolserver# ls -l
-  drwxr-sr-x    8 root     staff        1024 Nov 12 01:35 .
-  drwxrwsr-x   12 root     staff        1024 Nov 12 01:25 ..
-  drwxr-xr-x    2 root     staff        1024 Nov 12 01:36 bin
-  drwxr-xr-x    2 root     staff        1024 Jun 11  2001 include
-  drwxr-xr-x    3 root     staff        1024 Nov 12 01:36 lib
-  drwxrwxr-x    2 root     web          1024 Nov 12 01:45 log
-  drwxr-xr-x    3 root     staff        1024 Nov 12 01:35 modules
-  -rw-r--r--    1 root     staff        7320 Mar 31  2001 sample-config.tcl
-  drwxrwxr-x    3 root     web          1024 Nov 12 01:35 servers
-

Test AOLserver

  • - - Now, we'll run a quick test to ensure AOLserver is running + gmake.

    Set an environment variable that the nspostgres driver + Makefile needs to compile correctly and run + conf, which compiles + AOLserver, the default modules, and the database driver, and + installs them.

    (Debian Users working with AOLserver 3.3+ad13 and + postgresql from apt-get may need to + make these symlinks: ln -s + /usr/include/postgresql/ /usr/include/pgsql + and ln -s /usr/lib/postgresql /usr/local/pgsql)

    [root@yourserver aolserver]# export POSTGRES=/usr/local/pgsql; ./conf
    +Building in /usr/local/aolserver
    +with the following modules:
    +aolserver
    +nscache
    +nsrewrite
    +nssha1
    +nsxml
    +pgdriver
    +==================================================================
    +Starting Build Sat Mar  8 10:28:26 PST 2003
    +Running gmake in aolserver/; output in log/aolserver.log
    +(several minute delay here)
    +Running gmake in nscache/; output in log/nscache.log
    +Running gmake in nsrewrite/; output in log/nsrewrite.log
    +Running gmake in nssha1/; output in log/nssha1.log
    +Running gmake in nsxml/; output in log/nsxml.log
    +Running gmake in nspostgres/; output in log/nspostgres.log
    +Creating  ...
    +==================================================================
    +Done Building Sat Mar  8 10:31:35 PST 2003
    +[root@yourserver aolserver]# 

    + This takes about 5 minutes. It builds aolserver, several modules, and the database driver. (Upgraders, note that the postgres database driver has changed from postgres.so to nspostgres.so). All of the results are logged to files in /usr/local/src/aolserver/log. If you run into problems running AOLserver, check these files for build errors.

  • 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@yourserver aolserver]# cd /usr/local/aolserver/bin
      +[root@yourserver bin]# cp /tmp/openacs-5.0.0/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
      +[root@yourserver bin]# chmod 750 nsd-oracle
      +[root@yourserver bin]#
      +
      cd /usr/local/aolserver/bin
      +cp /tmp/openacs-5.0.0/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
      +chmod 750 nsd-oracle
    • PostGreSQL

      [root@yourserver aolserver]# cd /usr/local/aolserver/bin
      +[root@yourserver bin]# cp /tmp/openacs-5.0.0/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
      +[root@yourserver bin]# chmod 755 nsd-postgres
      +[root@yourserver bin]#
      +
      cd /usr/local/aolserver/bin
      +cp /tmp/openacs-5.0.0/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
      +chmod 755 nsd-postgres
  • Install nsopenssl + (OPTIONAL)

  • Install Full Text Search with OpenFTS (OPTIONAL)

  • In order to test AOLserver, we'll run it using the + sample-config.tcl file provided in the AOLserver distribution, + under the nobody user and web + group. The sample-config.tcl configuration writes to the + default log locations, so we need to give it permission to do so + or it will fail. Grant the web + group permission to write to + /usr/local/aolserver/log and + /usr/local/aolserver/servers.

    [root@yourserver root]# cd /usr/local/aolserver
    +[root@yourserver aolserver]# chown -R root.web log servers
    +[root@yourserver aolserver]# chmod -R g+w log servers
    +[root@yourserver aolserver]# ls -l
    +total 32
    +drwxr-sr-x    2 root     root         4096 Mar  8 12:57 bin
    +drwxr-xr-x    3 root     root         4096 Mar  8 10:34 include
    +drwxr-sr-x    3 root     root         4096 Mar  8 10:34 lib
    +drwxrwsr-x    2 root     web          4096 Mar  8 10:31 log
    +drwxr-sr-x    3 root     root         4096 Mar  8 10:31 modules
    +-rw-r--r--    1 root     root         7320 Mar 31  2001 sample-config.tcl
    +drwxrwsr-x    3 root     web          4096 Mar  8 10:31 servers
    +[root@yourserver aolserver]#
    +
    +cd /usr/local/aolserver
    +chown -R root.web log servers
    +chmod -R g+w log servers
    +ls -l

    Now, we'll run a quick test to ensure AOLserver is running correctly. We'll use the sample config file provided with AOLserver. This file will attempt to guess your IP address and hostname. It will then start up the server at port 8000 of that - IP address. + IP address.

    [root@yourserver aolserver]# ./bin/nsd -t sample-config.tcl -u nobody -g web
    +[root@yourserver aolserver]# [08/Mar/2003:15:07:18][31175.8192][-main-] Notice: config.tcl: starting to read config file...
    +[08/Mar/2003:15:07:18][31175.8192][-main-] Warning: config.tcl: nsssl not loaded -- key/cert files do not exist.
    +[08/Mar/2003:15:07:18][31175.8192][-main-] Warning: config.tcl: nscp not loaded
    +-- user/password is not set.
    +[08/Mar/2003:15:07:18][31175.8192][-main-] Notice: config.tcl: finished reading
    +config file.

    The first warning, about nsssl, can be ignored. We won't be using nsssl; we'll be using nsopenssl instead, and we haven't fully configured it yet. The nscp warning refers to the fact that, without a user and password in the config file, the administrative panel of AOLserver won't load. We don't plan to use it and can ignore that error as well. Any other warning or error is unexpected and probably a problem.

    -

    -root:/usr/local/aolserver# ./bin/nsd -t sample-config.tcl -u nobody -g web

    - - As the AOLserver daemon starts up, you should see a few normal - warnings (listed below), which are safe to ignore. - -

    -Warning: nsd.tcl: nsssl not loaded -- key/cert files do not exist.
    -Warning: nsd.tcl: nscp not loaded -- user/password is not set.

    - - The first warning means that the server is missing files for - running ssl, a necessary module - for encrypted HTTPS. See Scott Goodwin's excellent - documentation if you want to set up SSL. The second - warning means that the AOLserver control panel, a special module - for administering AOLserver, could not be loaded. If you're - interested in configuring nscp, please see the AOLserver - documentation. - -

  • - Test to see if AOLserver is working by starting Mozilla or - Lynx, and surfing over to your - web page: + Lynx on the same + computer and surfing over to your web page. If + you browse from another computer and the sample config file + didn't guess your hostname or ip correctly, you'll get a + false negative test. -

    -root:~# lynx localhost:8000

    +

    [root@yourserver aolserver]# lynx localhost:8000

    You should see a "Welcome to AOLserver" page. If this doesn't work, try going to http://127.0.0.1:8000/. If this - still doesn't work, check out the Troubleshooting AOLServer section below. + still doesn't work, check out the Troubleshooting AOLserver section below. Note that you will not be able to browse to the web page from another machine, because AOLserver is only listening to the local address. -

  • +

    Shutdown the test server:

    [root@yourserver aolserver]# killall nsd
    +[root@yourserver aolserver]#

    - Shutdown the test server: - -

    -root:~# killall nsd

    - The killall command will kill all processes with the name nsd, but clearly this is not a good tool to use for managing your - services in general. We cover this topic in the Keep AOLServer alive section. + services in general. We cover this topic in the Keep AOLServer alive section. -

Troubleshooting the AOLserver Install

- - If you can't view the welcome page, it's likely there's a +

  • Troubleshooting.

    If you can't view the welcome page, it's likely there's a problem with your server configuration. Start by viewing your AOLserver log, which is in /usr/local/aolserver/log/server.log. You should also try to find lines of the form: -

    +    

     [01/Jun/2000:12:11:20][5914.2051][-nssock-] Notice: nssock: listening on http://localhost.localdomain:8000 (127.0.0.1:8000)
     [01/Jun/2000:12:11:20][5914.2051][-nssock-] Notice: accepting connections

    @@ -284,15 +164,18 @@ The sample-config.tcl file grabs your address and hostname from your OS settings. -

    +    

     set hostname        [ns_info hostname]
     set address         [ns_info address]

    If you get an error that nssock can't get the requested address, you can set these manually. If you type 0.0.0.0, AOLserver will try to - listen on all available addresses. + listen on all available addresses. Note: + ns_info address doesn't appear + to be supported in current versions of AOLserver. -

    +    

     set hostname        [ns_info hostname]
     #set address         [ns_info address]
    -set address 0.0.0.0
  • ($Id$)
    View comments on this page at openacs.org
    +set address 0.0.0.0
  • Install + Analog web file analyzer. (OPTIONAL)

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