- I OpenACS For Everyone
- I.1 High level information: What is OpenACS?
- I.1.1 Overview
- I.1.2 OpenACS Release Notes
- I.2 OpenACS: robust web development framework
- I.2.1 Introduction
- I.2.2 Basic infrastructure
- I.2.3 Advanced infrastructure
- I.2.4 Domain level tools
- I.1 High level information: What is OpenACS?
- II Administrator's Guide
- II.2 Installation Overview
- II.2.1 Basic Steps
- II.2.2 Prerequisite Software
- II.3 Complete Installation
- II.3.1 Install a Unix-like system and supporting software
- II.3.2 Install Oracle 10g XE on debian
- II.3.2.1 Install Oracle 8.1.7
- II.3.3 Install PostgreSQL
- II.3.4 Install AOLserver 4
- II.3.5 Quick Install of OpenACS
- II.3.5.1 Complex Install OpenACS 5.3
- II.3.6 OpenACS Installation Guide for Windows2000
- II.3.7 OpenACS Installation Guide for Mac OS X
- II.4 Configuring a new OpenACS Site
- II.4.1 Installing OpenACS packages
- II.4.2 Mounting OpenACS packages
- II.4.3 Configuring an OpenACS package
- II.4.4 Setting Permissions on an OpenACS package
- II.4.5 How Do I?
- II.4.6 Configure OpenACS look and feel with templates
- II.5 Upgrading
- II.5.1 Overview
- II.5.2 Upgrading 4.5 or higher to 4.6.3
- II.5.3 Upgrading OpenACS 4.6.3 to 5.0
- II.5.4 Upgrading an OpenACS 5.0.0 or greater installation
- II.5.5 Upgrading the OpenACS files
- II.5.6 Upgrading Platform components
- II.6 Production Environments
- II.6.1 Starting and Stopping an OpenACS instance.
- II.6.2 AOLserver keepalive with inittab
- II.6.3 Running multiple services on one machine
- II.6.4 High Availability/High Performance Configurations
- II.6.5 Staged Deployment for Production Networks
- II.6.6 Installing SSL Support for an OpenACS service
- II.6.7 Set up Log Analysis Reports
- II.6.8 External uptime validation
- II.6.9 Diagnosing Performance Problems
- II.7 Database Management
- II.7.1 Running a PostgreSQL database on another server
- II.7.2 Deleting a tablespace
- II.7.3 Vacuum Postgres nightly
- II.8 Backup and Recovery
- II.8.1 Backup Strategy
- II.8.2 Manual backup and recovery
- II.8.3 Automated Backup
- II.8.4 Using CVS for backup-recovery
- II.A Install Red Hat 8/9
- II.B Install additional supporting software
- II.B.1 Unpack the OpenACS tarball
- II.B.2 Initialize CVS (OPTIONAL)
- II.B.3 Add PSGML commands to emacs init file (OPTIONAL)
- II.B.4 Install Daemontools (OPTIONAL)
- II.B.5 Install qmail (OPTIONAL)
- II.B.6 Install Analog web file analyzer
- II.B.7 Install nspam
- II.B.8 Install Full Text Search
- II.B.9 Install Full Text Search using Tsearch2
- II.B.10 Install Full Text Search using OpenFTS (deprecated see tsearch2)
- II.B.11 Install nsopenssl
- II.B.12 Install tclwebtest.
- II.B.13 Install PHP for use in AOLserver
- II.B.14 Install Squirrelmail for use as a webmail system for OpenACS
- II.B.15 Install PAM Radius for use as external authentication
- II.B.16 Install LDAP for use as external authentication
- II.B.17 Install AOLserver 3.3oacs1
- II.C Credits
- II.C.1 Where did this document come from?
- II.C.2 Linux Install Guides
- II.C.3 Security Information
- II.C.4 Resources
- II.2 Installation Overview
- III For OpenACS Package Developers
- III.9 Development Tutorial
- III.9.1 Creating an Application Package
- III.9.2 Setting Up Database Objects
- III.9.3 Creating Web Pages
- III.9.4 Debugging and Automated Testing
- III.10 Advanced Topics
- III.10.1 Write the Requirements and Design Specs
- III.10.2 Add the new package to CVS
- III.10.3 OpenACS Edit This Page Templates
- III.10.4 Adding Comments
- III.10.5 Admin Pages
- III.10.6 Categories
- III.10.7 Profile your code
- III.10.8 Prepare the package for distribution.
- III.10.9 Distributing upgrades of your package
- III.10.10 Notifications
- III.10.11 Hierarchical data
- III.10.12 Using .vuh files for pretty urls
- III.10.13 Laying out a page with CSS instead of tables
- III.10.14 Sending HTML email from your application
- III.10.15 Basic Caching
- III.10.16 Scheduled Procedures
- III.10.17 Enabling WYSIWYG
- III.10.18 Adding in parameters for your package
- III.10.19 Writing upgrade scripts
- III.10.20 Connect to a second database
- III.10.21 Future Topics
- III.11 Development Reference
- III.11.1 OpenACS Packages
- III.11.2 OpenACS Data Models and the Object System
- III.11.3 The Request Processor
- III.11.4 The OpenACS Database Access API
- III.11.5 Using Templates in OpenACS
- III.11.6 Groups, Context, Permissions
- III.11.7 Writing OpenACS Application Pages
- III.11.8 Parties in OpenACS
- III.11.9 OpenACS Permissions Tediously Explained
- III.11.10 Object Identity
- III.11.11 Programming with AOLserver
- III.11.12 Using Form Builder: building html forms dynamically
- III.12 Engineering Standards
- III.12.1 OpenACS Style Guide
- III.12.2 Release Version Numbering
- III.12.3 Constraint naming standard
- III.12.4 ACS File Naming and Formatting Standards
- III.12.5 PL/SQL Standards
- III.12.6 Variables
- III.12.7 Automated Testing
- III.13 CVS Guidelines
- III.13.1 Using CVS with OpenACS
- III.13.2 OpenACS CVS Concepts
- III.13.3 Contributing code back to OpenACS
- III.13.4 Additional Resources for CVS
- III.14 Documentation Standards
- III.14.1 OpenACS Documentation Guide
- III.14.2 Using PSGML mode in Emacs
- III.14.3 Using nXML mode in Emacs
- III.14.4 Detailed Design Documentation Template
- III.14.5 System/Application Requirements Template
- III.15 TCLWebtest
- III.16 Internationalization
- III.16.1 Internationalization and Localization Overview
- III.16.2 How Internationalization/Localization works in OpenACS
- III.16.4 Design Notes
- III.16.5 Translator's Guide
- III.D Using CVS with an OpenACS Site
- III.9 Development Tutorial
- IV For OpenACS Platform Developers
- IV.17 Kernel Documentation
- IV.17.1 Overview
- IV.17.2 Object Model Requirements
- IV.17.3 Object Model Design
- IV.17.4 Permissions Requirements
- IV.17.5 Permissions Design
- IV.17.6 Groups Requirements
- IV.17.7 Groups Design
- IV.17.8 Subsites Requirements
- IV.17.9 Subsites Design Document
- IV.17.10 Package Manager Requirements
- IV.17.11 Package Manager Design
- IV.17.12 Database Access API
- IV.17.13 OpenACS Internationalization Requirements
- IV.17.14 Security Requirements
- IV.17.15 Security Design
- IV.17.16 Security Notes
- IV.17.17 Request Processor Requirements
- IV.17.18 Request Processor Design
- IV.17.19 Documenting Tcl Files: Page Contracts and Libraries
- IV.17.20 Bootstrapping OpenACS
- IV.17.21 External Authentication Requirements
- IV.18 Releasing OpenACS
- IV.18.1 OpenACS Core and .LRN
- IV.18.2 How to Update the OpenACS.org repository
- IV.18.3 How to package and release an OpenACS Package
- IV.18.4 How to Update the translations
- IV.17 Kernel Documentation
- V Tcl for Web Nerds
- V.1 Tcl for Web Nerds Introduction
- V.2 Basic String Operations
- V.3 List Operations
- V.4 Pattern matching
- V.5 Array Operations
- V.6 Numbers
- V.7 Control Structure
- V.8 Scope, Upvar and Uplevel
- V.9 File Operations
- V.10 Eval
- V.11 Exec
- V.12 Tcl for Web Use
- V.13 OpenACS conventions for TCL
- V.14 Solutions
- VI SQL for Web Nerds
- VI.1 SQL Tutorial
- VI.1.1 SQL Tutorial
- VI.1.2 Answers
- VI.2 SQL for Web Nerds Introduction
- VI.3 Data modeling
- VI.3.1 The Discussion Forum -- philg's personal odyssey
- VI.3.2 Data Types (Oracle)
- VI.3.4 Tables
- VI.3.5 Constraints
- VI.4 Simple queries
- VI.5 More complex queries
- VI.6 Transactions
- VI.7 Triggers
- VI.8 Views
- VI.9 Style
- VI.10 Escaping to the procedural world
- VI.11 Trees
- VI.1 SQL Tutorial
II.B.17 Install AOLserver 3.3oacs1
We recommend the use of AOLserver 4.0.1 or later. These instructions are retained as a resource.
Debian users: we do not recommend installing Debian packages for Aolserver or Postgres. Several people have reported problems while trying to install using apt-get instead of from source. If you have the time to debug these and submit what you did, that's great, but if not, you should stick to installing from source.
-
Unpack the Aolserver tarball.Download the aolserver tarball and unpack it.
[root root]#
cd /usr/local/src
[root src]#wget --passive http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz
--15:38:08-- http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz => `aolserver3.3oacs1.tar.gz' Resolving uptime.openacs.org... done. Connecting to uptime.openacs.org[207.166.200.199]:80... connected. HTTP request sent, awaiting response... 200 OK Length: 3,858,074 [application/x-compressed] 100%[====================================>] 3,858,074 66.56K/s ETA 00:00 15:39:05 (66.56 KB/s) - `aolserver3.3oacs1.tar.gz' saved [3858074/3858074] [root src]#tar xzf aolserver3.3oacs1.tar.gz
[root src]#This section also relies on some OpenACS files, which you can get with the section called "Unpack the OpenACS tarball".
-
Compile AOLserver.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 root]#cd /usr/local/src/aolserver
[root aolserver]#./conf-clean
cat: BUILD-MODULES: No such file or directory Done. [root aolserver]#mkdir -p /usr/local/aolserveIf you are using Oracle, edit
conf-db
and changepostgresql
tooracle
, or to the wordboth
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 aolserver]#
echo "/usr/local/aolserver" > conf-inst
[root aolserver]#conf-make
should contain the name of the GNU Make command on your system. It defaults togmake
. Debian users:
.ln -s /usr/bin/make /usr/bin/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, see warning above, but if you do use apt-get for AOLserver 3.3+ad13 and postgresql from apt-get may need to make these symlinks:
ln -s /usr/include/postgresql/ /usr/include/pgsql
andln -s /usr/lib/postgresql /usr/local/pgsql
)[root 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 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 aolserver]#
cd /usr/local/aolserver/bin
[root bin]#cp /var/tmp/openacs-5.2.3rc1/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
[root bin]#chmod 750 nsd-oracle
[root bin]# -
stgreSQL
[root aolserver]#
cd /usr/local/aolserver/bin
[root bin]#cp /var/tmp/openacs-5.2.3rc1/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
[root bin]#chmod 755 nsd-postgres
[root bin]#
-
-
Install tDOM.Download the tDOM tarball, unpack it, adjust the configuration file to match our patched distribution of aolserver, and compile it.
[root root]#
cd /usr/local/src
[root src]#wget --passive http://www.tdom.org/tDOM-0.7.8.tar.gz
--16:40:58-- http://www.tdom.org/tDOM-0.7.8.tar.gz => `tDOM-0.7.8.tar.gz' Resolving www.tdom.org... done. Connecting to www.tdom.org[212.14.81.4]:80... connected. HTTP request sent, awaiting response... 200 OK Length: 826,613 [application/x-compressed] 100%[====================================>] 826,613 138.06K/s ETA 00:00 16:41:04 (138.06 KB/s) - `tDOM-0.7.8.tar.gz' saved [826613/826613] [root src]#tar xzf tDOM-0.7.8.tar.gz
[root src]#cd tDOM-0.7.8/unix
[root unix]#Edit the file CONFIG and change this section:
# ---------------------------------------------------- # aolsrc="/usr/src/aolserver-3.4" # ../configure --enable-threads --disable-tdomalloc # --with-aolserver=$aolsrc # --with-tcl=$aolsrc/tcl8.3.4/unix
to
# ---------------------------------------------------- aolsrc="/usr/local/src/aolserver/aolserver" ../configure --enable-threads --disable-tdomalloc --with-aolserver=$aolsrc --with-tcl=$aolsrc/tcl8.3.2/unix
And configure and compile:
[root unix]#
sh CONFIG
creating cache ./config.cache checking for memmove... yes (many lines omitted) creating Makefile creating tdomConfig.sh [root unix]#make
gcc -pipe -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DTCL_THREADS=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 (many lines omitted) -Wl,-rpath,/usr/local/lib -o tcldomsh; fi [root unix]#cp libtdom0.7.8.so /usr/local/aolserver/bin/
[root unix]#cd /usr/local/aolserver/bin/
[root bin]#ln -s libtdom0.7.8.so libtdom.so
[root bin]# -
Install nsopenssl (OPTIONAL)
-
Install Full Text Search with OpenFTS (OPTIONAL)
-
Install nspam (OPTIONAL)
-
Test AOLserver.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 theweb
group permission to write to/usr/local/aolserver/log
and/usr/local/aolserver/servers
.[root root]#
cd /usr/local/aolserver
[root aolserver]#chown -R root.web log servers
[root aolserver]#chmod -R g+w log servers
[root 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 aolserver]#Note: AOLserver4.x does not include a default start page, so we create one for this test. Type
echo "Welcome to AOLserver" > /usr/local/aolserver40r8/servers/server1/pages/index.html
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 aolserver]#
./bin/nsd -t sample-config.tcl -u nobody -g web
[root 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
orLynx
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 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 aolserver]#
killall nsd
[root aolserver]#The
killall
command will kill all processes with the namensd
, 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. -
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.4051][-nssock-] Notice: nssock: listening on http://localhost.localdomain:8000 (127.0.0.1:8000) [01/Jun/2000:12:11:20][5914.4051][-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 ofNotice
.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
-
Install Analog web file analyzer. (OPTIONAL)