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 4.6.3-P or 4.6.3-O Reference Platform installation, using Red Hat 8.0. Places where other systems are different are noted.
As root, untar aolserver3.3oacs1.tar.gz into /usr/local/src.
[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. [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.
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. Verify that gmake is installed:
[root@yourserver aolserver]# gmake -v GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for i386-redhat-linux-gnu Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Report bugs to <bug-make@gnu.org>. [root@yourserver aolserver]#
If you don't get similar results, including an equal or higher version number to 3.79.1, install gmake or check your aliases.
Set an environment variable that the nspostgres driver Makefile needs to compile correctly and run conf, which compiles AOLserver and the default modules and installs them.
[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-4.6.2/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-4.6.2/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-4.6.2/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-4.6.2/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres chmod 755 nsd-postgres
OPTIONAL - install nsopenssl. This AOLserver module is required if you want people to connect to your site via https. These commands compile nsopenssl and install it, along with a tcl helper script to handle https connections. You will also need ssl certificates. Because those should be different for each server service, you won't need those instructions until later. You will need the nsopenssl tarball in /tmp.
[root@yourserver bin]# cd /usr/local/src/aolserver [root@yourserver aolserver]# tar xzf /tmp/nsopenssl-2.1.tar.gz [root@yourserver aolserver]# cd nsopenssl-2.1 [root@yourserver nsopenssl-2.1]# make OPENSSL=/usr/local/ssl gcc -I/usr/local/ssl/include -I../aolserver/include -D_REENTRANT=1 -DNDEBUG=1 -g -fPIC -Wall -Wno-unused -mcpu=i686 -DHAVE_CMMSG=1 -DUSE_FIONREAD=1 -DHAVE_COND_EINTR=1 -c -o nsopenssl.o nsopenssl.c (many lines omitted) gcc -shared -nostartfiles -o nsopenssl.so nsopenssl.o config.o init.o ssl.o thread.o tclcmds.o -L/usr/local/ssl/lib -lssl -lcrypto [root@yourserver nsopenssl-2.1]# cp nsopenssl.so /usr/local/aolserver/bin [root@yourserver nsopenssl-2.1]# cp https.tcl /usr/local/aolserver/modules/tcl/ [root@yourserver nsopenssl-2.1]#cd /usr/local/src/aolserver tar xzf /tmp/nsopenssl-2.1.tar.gz cd nsopenssl-2.1 make OPENSSL=/usr/local/ssl cp nsopenssl.so /usr/local/aolserver/bin cp https.tcl /usr/local/aolserver/modules/tcl/
OPTIONAL - install OpenFTS. If you want full text search, and you are running PostGreSQL, install this module to support FTS. You will need the openfts tarball in /tmp.
Install Tsearch. This is a PostGreSQL module that OpenFTS requires.
[root@yourserver root]# su - postgres [postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.2.3/contrib/tsearch/ [postgres@yourserver tsearch]$ make sed 's,MODULE_PATHNAME,$libdir/tsearch,g' tsearch.sql.in >tsearch.sql /usr/bin/flex -8 -Ptsearch_yy -o'parser.c' parser.l (many lines omitted) rm -f libtsearch.so ln -s libtsearch.so.0.0 libtsearch.so [postgres@yourserver tsearch]$ make install mkdir /usr/local/pgsql/share/contrib mkdir /usr/local/pgsql/doc/contrib (2 lines omitted) /bin/sh ../../config/install-sh -c -m 755 libtsearch.so.0.0 /usr/local/pgsql/lib/tsearch.so [postgres@yourserver tsearch]$ exit logout [root@yourserver root]#su - postgres cd /usr/local/src/postgresql-7.2.3/contrib/tsearch make make install exit
Unpack the OpenFTS tarball and compile and install the driver.
[root@yourserver root]# cd /usr/local/src [root@yourserver src]# tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz [root@yourserver src]# cd /usr/local/src/Search-OpenFTS-tcl-0.3.2/ [root@yourserver Search-OpenFTS-tcl-0.3.2]# ./configure --with-aolserver-src=/usr/local/src/aolserver/aolserver --with-tcl=/usr/lib/ checking prefix... /usr/local checking for gcc... gcc (many lines omitted) configure: creating ./config.status config.status: creating Makefile.global [root@yourserver Search-OpenFTS-tcl-0.3.2]# make (cd parser; make all) make[1]: Entering directory `/usr/local/src/Search-OpenFTS-tcl-0.3.2/parser' (many lines omitted) packages provided were {Lingua::Stem::Snowball 0.3.2} processed fts_base_snowball.tcl [root@yourserver Search-OpenFTS-tcl-0.3.2]# cd aolserver [root@yourserver aolserver]# make gcc -c -fPIC -DPACKAGE=\"OPENFTS\" -DVERSION=\"0.3.2\" -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STR (many lines omitted) n_stem.o italian_stem.o norwegian_stem.o portuguese_stem.o russian_stem.o nsfts.o -o nsfts.so [root@yourserver aolserver]# cp nsfts.so /usr/local/aolserver/bin/ [root@yourserver aolserver]#cd /usr/local/src tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz cd /usr/local/src/Search-OpenFTS-tcl-0.3.2/ ./configure --with-aolserver-src=/usr/local/src/aolserver/aolserver --with-tcl=/usr/lib/ make cd aolserver make cp nsfts.so /usr/local/aolserver/bin
Build some supplemental modules.
[root@yourserver aolserver]# cd .. [root@yourserver Search-OpenFTS-tcl-0.3.2]# cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.2.3/contrib [root@yourserver Search-OpenFTS-tcl-0.3.2]# cd /usr/local/src/postgresql-7.2.3/contrib/pgsql_contrib_openfts [root@yourserver pgsql_contrib_openfts]# make sed 's,MODULE_PATHNAME,$libdir/openfts,g' openfts.sql.in >openfts.sql gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I. -I../../src/include -c -o openfts.o openfts.c gcc -shared -o openfts.so openfts.o rm openfts.o [root@yourserver pgsql_contrib_openfts]# su postgres [postgres@yourserver pgsql_contrib_openfts]$ make install /bin/sh ../../config/install-sh -c -m 644 openfts.sql /usr/local/pgsql/share/contrib /bin/sh ../../config/install-sh -c -m 755 openfts.so /usr/local/pgsql/lib /bin/sh ../../config/install-sh -c -m 644 ./README.openfts /usr/local/pgsql/doc/contrib [postgres@yourserver pgsql_contrib_openfts]$ exit [root@yourserver pgsql_contrib_openfts]#cd .. cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.2.3/contrib cd /usr/local/src/postgresql-7.2.3/contrib/pgsql_contrib_openfts make su postgres make install exit
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.
[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.
Test to see if AOLserver is working by starting Mozilla or 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@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. 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]#
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.
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
If you can find these lines, try entering the URL the server is listening on. If you cannot find these lines, there must be an error somewhere in the file. Search for lines beginning with the word Error instead of Notice.
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. 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
OPTIONAL - install Analog web file analyser. You should have the source tarball in /tmp. Unpack, compile, and install analog.
[root@yourserver aolserver]# cd /usr/local/src [root@yourserver src]# tar xzf /tmp/analog-5.31.tar.gz [root@yourserver src]# cd analog-5.31 [root@yourserver analog-5.31]# make cd src && make make[1]: Entering directory `/usr/local/src/analog-5.31/src' (many lines omitted) ***IMPORTANT: You must read the licence before using analog *** make[1]: Leaving directory `/usr/local/src/analog-5.31/src' [root@yourserver analog-5.31]# cd .. [root@yourserver src]# mv analog-5.31 /usr/share/ [root@yourserver src]#cd /usr/local/src tar xzf /tmp/analog-5.31.tar.gz cd analog-5.31 make cd .. mv analog-5.31 /usr/share/