Index: openacs-4/packages/acs-core-docs/www/files/acs-pgbackup-init.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/acs-pgbackup-init.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/files/acs-pgbackup-init.txt 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,65 @@ +# Back up the database, scheduled to be run nightly. As written, it +# keeps a month's worth of daily backups, cycling over the same files +# which are suffixed with the day of the month on which the backup is +# created. +# Original version by Don Baccus (dhogaza@pacifier.com> +# Modified for openacs4 by Vinod Kurup +# 18 Jan 2002 +# This version: ftp only. + +proc acs_pgbackup {} { + # Set these to the appropriate values for your installation. + set pg_bin "/usr/local/pgsql/bin" + set bak "/usr/local/aolserver/backup" + set servername "birdnotes" + set ftp_user "my-ftp-username" + set ftp_password "my-ftp-password" + set ftp_dir "my-ftp-path" + set ftp_server "my.ftpserver.com" + + set day [clock format [clock seconds] -format %d] + set data "${servername}_${day}.dmp" + + ns_log Notice "Backup of [ad_system_name] starting." + ns_log Notice "pg_dump beginning..." + if [catch {append msg [exec "$pg_bin/pg_dump" $servername ">$bak/$data"]} errmsg] { + ns_log Error "pg_dump failed: $errmsg" + ns_sendmail [ad_system_owner] [ad_system_owner] "[ad_system_name] : pg_dump failed..." "$errmsg" + return + } + append msg "\n" + ns_log Notice "gzip of data beginning..." + if [catch {append msg [exec "gzip" "-f" "$bak/$data"]} errmsg] { + ns_log Error "gzip of data failed: $errmsg" + ns_sendmail [ad_system_owner] [ad_system_owner] "[ad_system_name] : gzip of data failed..." "$errmsg" + return + } + append msg "\n" + ns_log Notice "ftp data beginning..." + set fd [open "$bak/ftp_data.tmp" w] + + puts $fd "user $ftp_user ${ftp_password}\nbinary\nput $bak/$data.gz ${ftp_dir}/$data.gz\nquit\n" + close $fd + if [catch {append msg [exec "ftp" "-n" $ftp_server "<$bak/ftp_data.tmp"]} errmsg] { + ns_log Error "ftp data failed: $errmsg" + ns_sendmail [ad_system_owner] [ad_system_owner] "[ad_system_name] : ftp data failed..." "$errmsg" + return + } + append msg "\n" + + # Replicate the above code to make remote copies to other systems + ns_log Notice "vacuum beginning..." + if [catch {append msg [exec "$pg_bin/vacuumdb" "-q" "-z" "$servername"]} errmsg] { + ns_log Error "vacuum failed: $errmsg" + ns_sendmail [ad_system_owner] [ad_system_owner] "[ad_system_name] : vacuum failed..." "$errmsg" + } + ns_log Notice "Backup succeeded." + append msg "Backups succeeded" + ns_sendmail [ad_system_owner] [ad_system_owner] "[ad_system_name] : backup succeeded" "$msg" +} + +if { ! [nsv_exists acs_pgbackup scheduled_p] } { + ns_schedule_daily 0 0 acs_pgbackup + nsv_set acs_pgbackup scheduled_p 1 + ns_log Notice "Backup has been scheduled." +} Index: openacs-4/packages/acs-core-docs/www/files/nsd-oracle.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/nsd-oracle.txt,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-core-docs/www/files/nsd-oracle.txt 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/files/nsd-oracle.txt 1 Feb 2002 17:09:12 -0000 1.2 @@ -8,4 +8,4 @@ export ORACLE_TERM='vt100' export ORAENV_ASK=NO export NLS_DATE_FORMAT="YYYY-MM-DD" -exec /home/aol30/bin/nsd $* +exec /usr/local/aolserver/bin/nsd $* Index: openacs-4/packages/acs-core-docs/www/files/nsd-postgres.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/nsd-postgres.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/files/nsd-postgres.txt 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,6 @@ +#!/bin/sh + +export PATH=$PATH:/usr/local/pgsql/bin +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib + +exec /usr/local/aolserver/bin/nsd $* Index: openacs-4/packages/acs-core-docs/www/files/openacs-start.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/openacs-start.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/files/openacs-start.html 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,29 @@ + + +OpenACS Installation: Welcome + + +

OpenACS Installation: Welcome

+
+ + + +Thank you for installing the OpenACS Community System, +a suite of fully-integrated enterprise-class solutions +for collaborative commerce. +This is the OpenACS Installer which performs all the steps necessary +to get the OpenACS Community System running on your server.

+Please read the Release Notes before proceeding to better understand what is contained in this release. + +

Your database driver is correctly installed and configured. +

The next step is to install the OpenACS kernel data model. Click the Next +button to proceed. + +

+
+
gatekeepers@openacs.org
+ + + + + Index: openacs-4/packages/acs-core-docs/www/files/openacs4.tcl.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/openacs4.tcl.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/files/openacs4.tcl.txt 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,315 @@ +ns_log notice "nsd.tcl: starting to read config file..." + +# which database do you want? postgres or oracle +set database postgres + +if {$database == "oracle"} { + set db_password "mysitepassword" +} + +set httpport 8000 +set httpsport 8443 + +# The hostname and address should be set to actual values. +set hostname [ns_info hostname] +set address [ns_info address] + +set server "birdnotes" +set db_name $server +set servername "Birdnotes.net Community" + +set serverroot "/web/${server}" + +# if debug is false, all debugging will be turned off +set debug true + +# you shouldn't need to adjust much below here +# for a standard install + +# +# AOLserver's home and binary directories. Autoconfigurable. +# +set homedir [file dirname [ns_info config]] +set bindir [file dirname [ns_info nsd]] + +# +# Where are your pages going to live ? +# +set pageroot ${serverroot}/www +set directoryfile index.tcl,index.adp,index.html,index.htm + +# +# nsssl: Only loads if keyfile.pem and certfile.pem exist. +# If you are using SSL, make sure you have these dirs and files (refer +# to the AOLserver docs) + +set sslkeyfile ${homedir}/servers/${server}/modules/nsssl/keyfile.pem +set sslcertfile ${homedir}/servers/${server}/modules/nsssl/certfile.pem + +# +# Global server parameters +# + +ns_section ns/parameters +ns_param serverlog ${homedir}/log/${server}-error.log +ns_param home $homedir +ns_param maxkeepalive 0 +ns_param logroll on +ns_param maxbackup 5 +ns_param debug $debug + +# +# Thread library (nsthread) parameters +# +ns_section ns/threads +ns_param mutexmeter true ;# measure lock contention +ns_param stacksize [expr 128*1024] + +# +# MIME types. +# +# Note: AOLserver already has an exhaustive list of MIME types, but in +# case something is missing you can add it here. +# + +ns_section ns/mimetypes +ns_param Default text/plain +ns_param NoExtension text/plain +ns_param .pcd image/x-photo-cd +ns_param .prc application/x-pilot +ns_param .xls application/vnd.ms-excel + +# +# Tcl Configuration +# +ns_section ns/server/${server}/tcl +ns_param library ${serverroot}/tcl +ns_param autoclose on +ns_param debug $debug + + +############################################################ +# +# Server-level configuration +# +# There is only one server in AOLserver, but this is helpful when multiple +# servers share the same configuration file. This file assumes that only +# one server is in use so it is set at the top in the "server" Tcl variable +# Other host-specific values are set up above as Tcl variables, too. +# +ns_section ns/servers +ns_param $server $servername + +# +# Server parameters +# +ns_section ns/server/${server} +ns_param directoryfile $directoryfile +ns_param pageroot $pageroot +ns_param maxconnections 5 +ns_param maxdropped 0 +ns_param maxthreads 5 +ns_param minthreads 5 +ns_param threadtimeout 120 +ns_param globalstats false ;# Enable built-in statistics +ns_param urlstats false ;# Enable URL statistics +ns_param maxurlstats 1000 ;# Max number of URL's to do stats on +#ns_param directoryadp $pageroot/dirlist.adp ;# Choose one or the other +#ns_param directoryproc _ns_dirlist ;# ...but not both! +#ns_param directorylisting fancy ;# Can be simple or fancy + +# +# ADP (AOLserver Dynamic Page) configuration +# +ns_section ns/server/${server}/adp +ns_param map /*.adp ;# Extensions to parse as ADP's +#ns_param map "/*.html" ;# Any extension can be mapped +ns_param enableexpire false ;# Set "Expires: now" on all ADP's +ns_param enabledebug $debug ;# Allow Tclpro debugging with "?debug" +ns_param defaultparser fancy + +ns_section ns/server/${server}/adp/parsers +ns_param fancy ".adp" + +# +# Socket driver module (HTTP) -- nssock +# +ns_section ns/server/${server}/module/nssock +ns_param timeout 120 +ns_param address $address +ns_param hostname $hostname +ns_param port $httpport + +# +# Socket driver module (HTTPS) -- nsssl +# +# nsssl does not load unless sslkeyfile/sslcertfile exist (above). +# +ns_section ns/server/${server}/module/nsssl +ns_param port $httpsport +ns_param hostname $hostname +ns_param address $address +ns_param keyfile $sslkeyfile +ns_param certfile $sslcertfile + +# +# Database drivers +# The database driver is specified here. PostgreSQL driver being loaded. +# Make sure you have the driver compiled and put it in {aolserverdir}/bin +# +ns_section "ns/db/drivers" +if { $database == "oracle" } { + ns_param ora8 ${bindir}/ora8.so +} else { + ns_param postgres ${bindir}/postgres.so ;# Load PostgreSQL driver +} + +# +# Database Pools: This is how AOLserver ``talks'' to the RDBMS. You need +# three for OpenACS: main, log, subquery. Make sure to replace ``yourdb'' +# and ``yourpassword'' with the actual values for your db name and the +# password for it. + +# AOLserver can have different pools connecting to different databases +# and even different different database servers. +# +ns_section ns/db/pools +ns_param main "Main Pool" +ns_param log "Log Pool" +ns_param subquery "Subquery Pool" + +ns_section ns/db/pool/main +ns_param maxidle 1000000000 +ns_param maxopen 1000000000 +ns_param connections 5 +ns_param verbose $debug +ns_param extendedtableinfo true +ns_param logsqlerrors $debug +if { $database == "oracle" } { + ns_param driver ora8 + ns_param datasource {} + ns_param user $db_name + ns_param password $db_password +} else { + ns_param driver postgres + ns_param datasource localhost::${db_name} + ns_param user nsadmin + ns_param password "" +} + +ns_section ns/db/pool/log +ns_param maxidle 1000000000 +ns_param maxopen 1000000000 +ns_param connections 5 +ns_param verbose $debug +ns_param extendedtableinfo true +ns_param logsqlerrors $debug +if { $database == "oracle" } { + ns_param driver ora8 + ns_param datasource {} + ns_param user $db_name + ns_param password $db_password +} else { + ns_param driver postgres + ns_param datasource localhost::${db_name} + ns_param user nsadmin + ns_param password "" +} + +ns_section ns/db/pool/subquery +ns_param maxidle 1000000000 +ns_param maxopen 1000000000 +ns_param connections 5 +ns_param verbose $debug +ns_param extendedtableinfo true +ns_param logsqlerrors $debug +if { $database == "oracle" } { + ns_param driver ora8 + ns_param datasource {} + ns_param user $db_name + ns_param password $db_password +} else { + ns_param driver postgres + ns_param datasource localhost::${db_name} + ns_param user nsadmin + ns_param password "" +} + +ns_section ns/server/${server}/db +ns_param pools "*" +ns_param defaultpool main + +ns_section ns/server/${server}/redirects +ns_param 404 "global/file-not-found.html" +ns_param 403 "global/forbidden.html" + +# +# Access log -- nslog +# +ns_section ns/server/${server}/module/nslog +ns_param file ${homedir}/log/${server}.log +ns_param enablehostnamelookup false +ns_param logcombined true +#ns_param logrefer false +#ns_param loguseragent false +ns_param maxbackup 5 +ns_param rollday * +ns_param rollfmt %Y-%m-%d-%H:%M +ns_param rollhour 0 +ns_param rollonsignal true +ns_param rolllog true + +# +# nsjava - aolserver module that embeds a java virtual machine. Needed to +# support webmail. See http://nsjava.sourceforge.net for further +# details. This may need to be updated for OpenACS4 webmail +# + +ns_section ns/server/${server}/module/nsjava +ns_param enablejava off ;# Set to on to enable nsjava. +ns_param verbosejvm off ;# Same as command line -debug. +ns_param loglevel Notice +ns_param destroyjvm off ;# Destroy jvm on shutdown. +ns_param disablejitcompiler off +ns_param classpath /usr/local/jdk/jdk118_v1/lib/classes.zip:${bindir}/nsjava.jar:${pageroot}/webmail/java/activation.jar:${pageroot}/webmail/java/mail.jar:${pageroot}/webmail/java + +# +# CGI interface -- nscgi, if you have legacy stuff. Tcl or ADP files inside +# AOLserver are vastly superior to CGIs. I haven't tested these params but they +# should be right. +# +#ns_section "ns/server/${server}/module/nscgi" +# ns_param map "GET /cgi-bin/ /web/$server/cgi-bin" +# ns_param map "POST /cgi-bin/ /web/$server/cgi-bin" +# ns_param Interps CGIinterps + +#ns_section "ns/interps/CGIinterps" +# ns_param .pl "/usr/bin/perl" + +# +# Modules to load +# +ns_section ns/server/${server}/modules +ns_param nssock ${bindir}/nssock.so +ns_param nslog ${bindir}/nslog.so +ns_param nssha1 ${bindir}/nssha1.so +ns_param nscache ${bindir}/nscache.so +ns_param nsrewrite ${bindir}/nsrewrite.so +ns_param nsxml ${bindir}/nsxml.so +#ns_param nsfts ${bindir}/nsfts.so +#ns_param nsperm ${bindir}/nsperm.so +#ns_param nscgi ${bindir}/nscgi.so +#ns_param nsjava ${bindir}/libnsjava.so + +# +## nsssl: loads only if requisite files already exist (see top of this +# file). +# +if { [file exists $sslcertfile] && [file exists $sslkeyfile] } { + ns_param nsssl ${bindir}/nsssle.so +} else { + ns_log warning "nsd.tcl: nsssl not loaded because key/cert files do not exist." +} + +ns_log notice "nsd.tcl: finished reading config file." + Index: openacs-4/packages/acs-core-docs/www/files/postgresql.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/postgresql.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/files/postgresql.txt 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,92 @@ +#! /bin/sh + +# chkconfig: 2345 98 02 +# description: PostgreSQL RDBMS + +# This is an example of a start/stop script for SysV-style init, such +# as is used on Linux systems. You should edit some of the variables +# and maybe the 'echo' commands. +# +# Place this file at /etc/init.d/postgresql (or +# /etc/rc.d/init.d/postgresql) and make symlinks to +# /etc/rc.d/rc0.d/K02postgresql +# /etc/rc.d/rc1.d/K02postgresql +# /etc/rc.d/rc2.d/K02postgresql +# /etc/rc.d/rc3.d/S98postgresql +# /etc/rc.d/rc4.d/S98postgresql +# /etc/rc.d/rc5.d/S98postgresql +# Or, if you have chkconfig, simply: +# chkconfig --add postgresql +# +# Proper init scripts on Linux systems normally require setting lock +# and pid files under /var/run as well as reacting to network +# settings, so you should treat this with care. + +# Original author: Ryan Kirkpatrick + +# $Header: /cvsroot/pgsql/contrib/start-scripts/linux,v 1.3 2001/07/30 + +## EDIT FROM HERE + +# Installation prefix +prefix=/usr/local/pgsql + +# Data directory +PGDATA="/usr/local/pgsql/data" + +# Who to run pg_ctl as, should be "postgres". +PGUSER=postgres + +# Where to keep a log file +PGLOG="$PGDATA/server.log" + +## STOP EDITING HERE + +# Check for echo -n vs echo \c +if echo '\c' | grep -s c >/dev/null 2>&1 ; then + ECHO_N="echo -n" + ECHO_C="" +else + ECHO_N="echo" + ECHO_C='\c' +fi + +# The path that is to be used for the script +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +# What to use to start up the postmaster +DAEMON="$prefix/bin/pg_ctl" + +set -e + +# Only start if we can find pg_ctl. +test -f $DAEMON || exit 0 + +# Parse command line parameters. +case $1 in + start) + $ECHO_N "Starting PostgreSQL: "$ECHO_C + su - $PGUSER -c "$DAEMON start -D '$PGDATA' -s -l $PGLOG" + echo "ok" + ;; + stop) + echo -n "Stopping PostgreSQL: " + su - $PGUSER -c "$DAEMON stop -D '$PGDATA' -s -m fast" + echo "ok" + ;; + restart) + echo -n "Restarting PostgreSQL: " + su - $PGUSER -c "$DAEMON restart -D '$PGDATA' -s -m fast" + echo "ok" + ;; + status) + su - $PGUSER -c "$DAEMON status -D '$PGDATA'" + ;; + *) + # Print help + echo "Usage: $0 {start|stop|restart|status}" 1>&2 + exit 1 + ;; +esac + +exit 0 Index: openacs-4/packages/acs-core-docs/www/files/restart-aolserver.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/restart-aolserver.txt,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-core-docs/www/files/restart-aolserver.txt 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/files/restart-aolserver.txt 1 Feb 2002 17:09:12 -0000 1.2 @@ -1,5 +1,6 @@ #!/usr/bin/perl -## Restarts an AOLserver. Takes as its only argument the name of the server to kill. +## Restarts an AOLserver. +## Takes as its only argument the name of the server to kill. ## bquinn 6/16/2000 with help from {ryanlee, doug}@arsdigita ## This is a perl script because it needs to run setuid root, ## and perl has fewer security gotchas than most shells. @@ -18,7 +19,7 @@ my $server = shift; $server =~ /^([\w-]*)$/; my $service_name = $1; -my $PIDFILE = "/home/aol30/log/nspid.$service_name"; +my $PIDFILE = "/usr/local/aolserver/log/nspid.$service_name"; my $pid; $< = $>; # set realuid to effective uid (root) Index: openacs-4/packages/acs-core-docs/www/files/svgroup.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/svgroup.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/files/svgroup.txt 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,19 @@ +#! /bin/sh +if test $# -lt 2 ; then + echo svgroup groupname directories ... >&2 + echo for example: >&2 + echo svgroup wheel /service/\* >&2 + exit 2 +fi +g="$1" ; shift +for i in $* ; do + chgrp $g $i/supervise/control + chmod g+w $i/supervise/control + chgrp $g $i/supervise/ok + chmod g+w $i/supervise/ok + # just in case + chgrp $g $i/supervise/status + chmod g+r $i/supervise/status + chgrp $g $i/supervise + chmod g+x $i/supervise +done Index: openacs-4/packages/acs-core-docs/www/xml/index.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/index.xml,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/xml/index.xml 24 Dec 2001 19:31:42 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/xml/index.xml 1 Feb 2002 17:09:12 -0000 1.3 @@ -47,13 +47,13 @@ - - - + + + - - + + @@ -97,50 +97,15 @@ Installing on Unix/Linux - - Overview - - This document is a guide to installing OpenACS). - It is targeted for first time users who may not be - familiar with Oracle and AOLServer, but who are familiar with UNIX - - with an emphasis on Linux. However, for the purposes of running the - OpenACS, Linux is not substantially different from other UNIX systems, - such as Solaris or HP-UX. - + &install-overview; + &operating-system; + &oracle; + &postgres; + &aolserver; + &openacs; + &nextsteps; + &credits; - - Assuming you have a computer with a network connection, before - starting installation of OpenACS please refer to the following: - - - - If it's a PC and you're going to use Linux, then read everything. - If it's a UNIX box, skip the Linux chapter and read everything else. - If it's a Windows box, read How to install OpenACS on Windows - instead. - If you already have Oracle up and running, then skip to the - AOLserver 3.x chapter and read from there. - - - - - If you are interested in learning more about OpenACS first, then - please read Chapter Three: Scalable - Systems for Online Communities from Philip & Alex's Guide to - Web Publishing, and this document on Using the - ArsDigita Community System. - - - - &getstarted; - &requirements; - &redhat; - &oracle; - &aolserver; - &acs; - &acc-tests; - &credits; - Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml 1 Feb 2002 17:09:12 -0000 1.2 @@ -1,409 +1,406 @@ - -Installing AOlserver 3.1 + + Install AOLserver - -Setup User Accounts and Paths. + + Download the Distribution + + Mat Kovach is graciously maintaining an AOLServer distribution that + includes all the patches and modules needed to run OpenACS 4. 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. + - You will need a special user account for running the ACS. We recommend - that you call this user nsadmin. This user will have a - special home directory for storing AOLserver, - /home/aol31 and a special group for the server files, - web as well. You will also need to create directories - for AOLserver, /usr/local/aolserver, and for web - services, /web to reside in. You must execute this step - as root. + + It's also possible to download all the pieces and patches yourself: + - - - Open up a terminal and run these commands: - -$ su - -; Enter ROOT password when prompted -# groupadd nsadmin -# groupadd web -# mkdir /home/aol31 -# useradd -g nsadmin -G dba,web -d /home/aol31 nsadmin -# passwd nsadmin -; Set password for nsadmin - -# mkdir /web -# mkdir /usr/local/aolserver -# chown nsadmin.web /home/aol31 -# chown nsadmin.web /web -# chown nsadmin.web /usr/local/aolserver -# chmod 775 /home/aol31 -# chmod 775 /web -# chmod 775 /usr/local/aolserver + + + AOLServer is available at aolserver.com + -# exit - - - + + ArsDigita's AOLServer distribution (including + internationalization patches, nscache, nsrewrite, nssha1 and the + oracle driver) is available at arsdigita.com + - - At this point, you should customize the nsadmin - login scripts. Login as nsadmin and add the - following lines to your ~nsadmin/.bash_profile - -export ORACLE_BASE=/ora8/m01/app/oracle -export ORACLE_HOME=$ORACLE_BASE/product/8.1.6 -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 - - + + The OpenACS PostgreSQL driver is available from OpenACS + - 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. - - + + nsxml is available at http://acs-misc.sourceforge.net. + - + + The patch that makes exec work + on BSD is available at sourceforge.net + - + + The patch that makes ns_uuencode + work for binary files is available at sourceforge.net + - -Download the Distribution + + The patch that makes AOLServer respect the + -g flag is available at sourceforge.net + + - Login as nsadmin and save files to the - /tmp directory. + - - - Download the AOLserver distribution and the Oracle driver (needed for - db connectivity and the ACS). You must download the source - distribution of AOLserver in order to compile the Oracle driver. + Download Mat's + AOLServer distribution to + /tmp - - AOLserver 3.1 - Source Distribution - Do not download a binary! + - Oracle Driver - 2.x - + +joeuser:~$ cd /tmp +joeuser:/tmp$ wget -c http://uptime.openacs.org/aolserver-openacs/aolserver3.3ad13-oacs1-beta-src.tar.gz +joeuser:/tmp$ cd + - We recommend saving these archives in the /tmp - directory on your server. - + - - Uncompress the downloaded components; you may need to substitute - different files names and account for directory names different from - the ones below -- these were the files as of 9/2000 : + As root, untar + aolserver3.3ad13-oacs1-beta-src.tar.gz + into /usr/local/src - - -$ cd /tmp {or wherever the archives are} -$ tar -xzf aolserver-src-3.1ad8.tar.gz -$ tar -xzf oracle-driver-2.3.tar.gz - - - + + + +joeuser:~$ su - +Password: ********** +root:~$ cd /usr/local/src +root:/usr/local/src# tar xzf /tmp/aolserver3.3ad13-oacs1-beta-src.tar.gz + + - - You should now have two directory trees in the current directory: - aolserver/ and oracle-driver-2.3/. - Move the oracle directory under the aolserver directory to make - compiling the Oracle driver easier: - -$ mv oracle-driver-2.3 aolserver - - - - + + Create the nsadmin user - + + You will need a special user account for running AOLServer. This user + will be called nsadmin and belong + top the special group web. + nsadmin's home directory will + be /usr/local/aolserver.You must + execute these steps as root. + - -Compile AOLserver - - - This step should be completed as the nsadmin user. You will compile - the AOLserver distribution and prepare for installation. - - Login as nsadmin and cd into the aolserver/ - directory where you untarred the source. You should be able to - compile directly from that location: - -$ su - nsadmin -; Enter nsadmin password -$ cd /tmp/aolserver -$ make all - - - - + Run these commands: + - + +root:/usr/local/src# cd +root:~# groupadd nsadmin +root:~# groupadd web +root:~# useradd -g nsadmin -G web -d /usr/local/aolserver nsadmin +root:~# passwd nsadmin +; Set password for nsadmin + +root:~# mkdir -p /web /usr/local/aolserver +root:~# chown -R nsadmin.web /usr/local/aolserver /web /usr/local/src/aolserver +root:~# chmod 775 /usr/local/aolserver /web +root:~# exit + + - -Compile the Oracle Driver + + + + Set up nsadmin's environment variables - Now you need to compile the Oracle driver to enable database - connectivity. + + At this point, you should customize the + nsadmin login scripts. Login as + nsadmin and add the following + lines to your + /usr/local/aolserver/.bash_profile: + - - - Change directories to the - aolserver/oracle-driver-2.3 directory and start the - compilation: + +joeuser:~$ su - nsadmin +Password: *********** +nsadmin:~$ emacs .bash_profile + - - -$ cd /tmp/aolserver/oracle-driver-2.3 -$ make all + + 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 Postgres +export PATH=$PATH:/usr/local/pgsql/bin +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib + - The following compiler warning may be ignored: - -ld: warning: type and size of dynamic symbol `sskgslgf' are not defined - + + 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. + - If the compilation failed, make sure the environment variables - above actually point to where you installed the AOLserver source - code. If you followed our instructions, this should not be a problem. - You can check the directories by doing: - -$ ls /tmp/aolserver/include - - + +nsadmin:~$ exit +joeuser:~$ su - nsadmin +Password: ********* +nsadmin:~$ echo $PATH +...some other directory paths...:/usr/local/pgsql/bin +nsadmin:~$ echo $LD_LIBRARY_PATH +:/usr/local/pgsql/lib + - If you don't see any files, then you have the wrong - directories. Verify your installation of Oracle and AOLserver and try - again. - - If compilation was successful, you should now have two new files - in /tmp/aolserver/oracle-driver-2.3, ora8.so and - ora8cass.so. - + + 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 - + - -Install AOLserver 3.1 + 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 ftp.gnome.org. You'll + need the libxml2 and + libxml2-devel packages. + + + + Compile and install AOLserver - You are now ready to install AOLserver. - - - Change directories to your AOLserver source distribution and run - make install to install the files: - - -$ cd /tmp/aolserver -$ make install - - - - The above will copy the compiled AOLserver files to - /usr/local/aolserver - - - + Prepare the distribution - - You should now have a /usr/local/aolserver/bin - directory. Copy the previously compiled Oracle drivers into it: - -$ cp /tmp/aolserver/oracle-driver-2.3/ora8.so /usr/local/aolserver/bin -$ cp /tmp/aolserver/oracle-driver-2.3/ora8cass.so /usr/local/aolserver/bin - - - + +nsadmin:~$ cd /usr/local/src/aolserver +nsadmin:/usr/local/src/aolserver$ ./conf-clean +cat: BUILD-MODULES: No such file or directory +Done. + + - - The latest version of the ArsDigita Community System requires Tcl - 8.3. Although this version of Tcl is included with AOLserver 3.1, it - is not activated by default. There is a symbolic link pointing from - nsd to nsd76 in - /tmp/aolserver/bin. Change this to point to - nsd8x: - -$ cd /usr/local/aolserver/bin -$ rm nsd -$ ln -s ./nsd8x ./nsd - - - + - - You will now test to ensure AOLserver is running correctly. You - should be able to cd into your aolserver directory and simply start - the server: - -Login as nsadmin. (it helps to be in X at this point) -$ cd /usr/local/aolserver -$ ./bin/nsd -t nsd.tcl - - + Put the name of the driver(s) that you want into + conf-db. This can be + postgresql, + oracle, or + both. + - As the AOLserver daemon starts up, you should see a few normal - warnings (listed below), which are safe to ignore. The first warning - means that the server is missing files for running - ssl, a necessary module for encrypted HTTPS. 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 and using either of these - modules, please see the AOLserver - documentation. - -Warning: nsd.tcl: nsssl not loaded -- key/cert files do not exist. -Warning: nsd.tcl: nscp not loaded -- user/password is not set. - - - + +nsadmin:/usr/local/src/aolserver$ echo "postgresql" > conf-db + + - - Test to see if AOLserver is working by starting Netscape - or Lynx, and surfing over to your web page: - -$ 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/. - + 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 anything. - - Shutdown the test server: - -$ 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 ACS documentation. - - + - On to installing the ArsDigita Community - System! - + 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. + - + +nsadmin:/usr/local/src/aolserver$ echo "make" > conf-make + + - -Troubleshooting the AOLserver Install + Compile and install AOLserver and modules + +nsadmin:/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. + + + - 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. + + Test AOLserver - + + + You will now 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 + set up the server at port 8000 of that IP address. + - -Defaults + +nsadmin:/usr/local/src/aolserver$ cd +nsadmin:~$ ./bin/nsd -t sample-config.tcl + + + As the AOLserver daemon starts up, you should see a few normal + warnings (listed below), which are safe to ignore. + - We used the following defaults while installing AOLserver: + +Warning: nsd.tcl: nsssl not loaded -- key/cert files do not exist. +Warning: nsd.tcl: nscp not loaded -- user/password is not set. + - - - - - - Variable + + 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. + - Value + - Reason - + + Test to see if AOLserver is working by starting + Mozilla or + Lynx, and surfing over to your + web page: + - - AOLserver Username + +nsadmin:~$ lynx localhost:8000 + - nsadmin + 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 section below. + - AOLserver used to be NaviServer and this was the - standard username for the server. - + + Shutdown the test server: + +nsadmin:~$ killall nsd + - - AOLserver Directory + + 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 section. + + + - /usr/local/aolserver + + + + Troubleshooting the AOLserver Install - When you use "make install" AOLserver 3.1 - will be installed here. Note that this is different from previous - versions of AOLserver; the change conforms to Red Hat Package Manager - (RPM) specifications. - + 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 + - - nsadmin Home Directory + 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. - /home/aol31 + The sample-config.tcl file grabs + your address and hostname from your OS settings. - The various files needed and generated by running - AOLserver 3.1 processes should be located here, such as server .ini - and log files. This is described in depth in the next page of the - install guide. - + +set hostname [ns_info hostname] +set address [ns_info address] + - - AOLserver Groups + If you get an error that nssock can't get the requested address, + you can set these manually: - nsadmin,web,dba + +#set hostname [ns_info hostname] +set hostname 127.0.0.1 +#set address [ns_info address] +set address 127.0.0.1 + - You should have a UNIX group for the server files, - nsadmin, and a group for the web content, web. Note that in order to - connect to Oracle using svrmgrl, your user must be - part of the dba group and this capability is needed - to install the ACS. - + + If you get an error that nssock can't assign the requested port, + then that port may already be taken by another service. Try specifying + a different port in the config file. + + - - AOLserver Source Directory - - /tmp/aolserver - - This is simply a convenient place to uncompress the - source. - - - - ORACLE_HOME - - /ora8/m01/app/oracle/product/8.1.6 - - This is the default Oracle installation - directory. - - - - - -($Id$) + ($Id$) - - Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/credits.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/credits.xml,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/credits.xml 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/credits.xml 1 Feb 2002 17:09:12 -0000 1.2 @@ -1,37 +1,57 @@ - Credits - - Long before Bryan Quinn had anything to do with this guide, Adam - Farkas and Brian Stein conceived of the idea. Working with Bryan Quinn - for the first version were Doug Hoffman, Ravi Jasuja, Hiro Iwashima, Ryan - Lee, and Jonathan Goler. Many ArsDigita employees contributed - documentation, criticized the document, and tested every line. Among them - were Audrey Mcloghlin, Doug Harris, Zvi Boshernitzan, Michael Yoon, Cesar - Brea, Dennis Gregorovic, David Fullagar, and Chris Spears. + Credits - A few members of the photo.net community were brave enough to test the - documentation while it was still under development and contributed very - valuable suggestions and bug reports. Among them were Kevin Tupper, - Michael Duffy, Simon Carstensen, and Dave Bauer. + Vinod Kurup put + together the January 2002 version of this guide from many sources of + information. - This document was assembled in part from previous documentation due to - the efforts of Tracy Adams, Greg Haverkamp, Philip Greenspun, and Jin - Choi. It was duly influenced by documents by Sean Yamamoto, David Cohen, - and Chris Rasch. + + + ArsDigita ACS 4.0 Installation Guide + - Several improvements were suggested that will be incorporated RSN - (hold bquinn to it) by Richard Li and Jon Griffin. + + OpenACS 3.x Installation Guide + - This documentation resulted from the collected efforts of employees at - ArsDigita and ACS users world-wide. If it is useful, it is because of the - distributed work of many enabled by the Internet. All mistakes and - shortcomings are due to the slow typing of Bryan Quinn. + + Gilbert Wong's FreeBSD + installation guide + -All questions and comments regarding -this guide should be sent to acs@arsdigita.com. - + + My own Brief OpenACS4 + installation guide + -($Id$) + + + Acknowledgments for versions of the above documents go (in no + particular order) to Bryan Quinn, Adam Farkas, Brian Stein, Doug + Hoffman, Ravi Jasuja, Hiro Iwashima, Ryan Lee, Jonathan Goler, Audrey + Mcloghlin, Doug Harris, Zvi Boshernitzan, Michael Yoon, Cesar Brea, + Dennis Gregorovic, David Fullagar, Chris Spears, Kevin Tupper, Michael + Duffy, Simon Carstensen, Dave Bauer, Tracy Adams, Greg Haverkamp, + Philip Greenspun, Jin Choi, Sean Yamamoto, David Cohen, Chris Rasch, + Richard Li, Jon Griffin, Roberto Mello, Gilbert Wong, Don Baccus, Ben + Adida, Michael Cleverly, Janne Blonqvist, Jonathan Ellis, Janine Sisk, + Jade Rubick, Chris Hardy, Jonathan Marsden, Vinod Kurup, Charles Hall, + Tom Jackson and Karl Lehenbauer. + + + Several people have helped with this document, including Torben + Brosten, Don Baccus, Roberto Mello, Talli Somekh, Dave Bauer, Jim + Lynch, Jon Griffin and Daryl Biberdorf. + + + + All questions and comments regarding + this guide should be sent to vinod@kurup.com. + + + ($Id$) + Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/next-steps.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/Attic/next-steps.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/next-steps.xml 1 Feb 2002 17:14:07 -0000 1.1 @@ -0,0 +1,534 @@ + + Next Steps + + + Backup Strategy + + Here are some tips from Don Baccus regarding backup strategy: + + + The need for making backups should be self-explanatory. There are + several strategies you can use. My own strategy for minimizing the + odds that I'll lose all my data is quite simple: + + + + + The database is stored on a mirrored (RAID 1) disk. + + + + The machine has battery backup. + + + + Backups are made nightly onto a third disk on another controller + + + + FTP is used to copy the resulting backup to two separate remote + servers in two locations + + + + + Rather than making remote copies, you might choose to dump to tape or + writeable CD media. Whatever strategy you use, it is important to + routinely check dumps to make sure they can be reloaded. The strategy + outlined above means that in the case of catastrophic failure, I'll + lose at most one day's data. + + By mirroring disks and using a battery backup, preferably one that + can trigger an automatic and controlled shutdown of the system when + the battery runs low, you greatly lower the odds of ever having to + use your nightly backup. Despite this, it is important to take + backups seriously if the data stored at your site is valuable to you + or your users. + + + + + Set Up Nightly Oracle Exports + + + While you're working with Oracle, you should configure it to do + automatic exports. An export is a separate backup copy of the + database. This copy includes all of the database's state at the + time that the export was initiated. If your database is corrupted, + you can restore from one of these backups. You should do this step as + root. + + + + + Download the backup script. Save the file export-oracle.txt as + /tmp/export-oracle.txt. + + + + Login as root. The following commands will install the export script: + + +nsadmin:~$ su - +Password: *********** +root:~# cp /tmp/export-oracle.txt /usr/sbin/export-oracle +root:~# chmod 700 /usr/sbin/export-oracle + + + + + Setup the export directory; this is the directory where backups will + be stored. We recommend the directory + /ora8/m02/oracle-exports. + + +root:~# mkdir /ora8/m02/oracle-exports +root:~# chown oracle.dba /ora8/m02/oracle-exports +root:~# chmod 770 /ora8/m02/oracle-exports + + + + + Now edit + /usr/sbin/export-oracle and + change the SERVICE_NAME and + DATABASE_PASSWORD fields to + their correct values. If you want to use a directory other than + /ora8/m02/oracle-exports, you + also need to change the + exportdir setting. + + + Test the export procedure by running the command: + + + +root:~# /usr/sbin/export-oracle +mv: /ora8/m02/oracle-exports/oraexport-service_name.dmp.gz: No such file or directory + +Export: Release 8.1.6.1.0 - Production on Sun Jun 11 18:07:45 2000 + +(c) Copyright 1999 Oracle Corporation. All rights reserved. + + +Connected to: Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production +With the Partitioning option +JServer Release 8.1.6.0.0 - Production +Export done in US7ASCII character set and US7ASCII NCHAR character set +. exporting pre-schema procedural objects and actions +. exporting foreign function library names for user SERVICE_NAME +. exporting object type definitions for user SERVICE_NAME +About to export SERVICE_NAME's objects ... +. exporting database links +. exporting sequence numbers +. exporting cluster definitions +. about to export SERVICE_NAME's tables via Conventional Path ... +. exporting synonyms +. exporting views +. exporting stored procedures +. exporting operators +. exporting referential integrity constraints +. exporting triggers +. exporting indextypes +. exporting bitmap, functional and extensible indexes +. exporting posttables actions +. exporting snapshots +. exporting snapshot logs +. exporting job queues +. exporting refresh groups and children +. exporting dimensions +. exporting post-schema procedural objects and actions +. exporting statistics +Export terminated successfully without warnings. + + + + If you don't have any warnings, proceed to automate the + backups. + + + + Automating backups is accomplished using the UNIX + crontab facility. + + While still root, run the following + command. You can replace the EDITOR="emacs + -nw" portion with whatever editor your + prefer, such as + EDITOR=vi. + +root:~# export EDITOR="emacs -nw" +root:~# crontab -e + + + Now add the following line on a line by itself + + +0 23 * * * /usr/sbin/export-oracle + + + + Save the file, exit the editor. Verify that the addition + succeeded by checking the output of the following command. + + +root:~# crontab -l | grep export-oracle +0 23 * * * /usr/sbin/export-oracle +root:~# exit +; Logout + + + If you see the line, go ahead and log out. + + + + + + Set up nightly Postgres exports + + + Dowload this script + to /tmp. At the top of the script + are several variables that you'll need to customize: + + + + + bak - location where you want + local backups to be saved + + + + servername - name of your server + (and database instance) + + + + ftp_user - username on your ftp + account + + + + ftp_password - password on your + ftp account + + + + ftp_dir - path on the remote + server where your backups will be uploaded + + + + ftp_server - your ftp server + + + + + + Next, we'll save this file to our server's + tcl directory so that it will be + loaded on startup. It will automatically be run every night at + midnight. Note that this script only backs up the database - not the + OpenACS scripts and file content. + + + +nsadmin:~$ cp /tmp/acs-pgbackup-init.txt /web/birdnotes/tcl/acs-pgbackup-init.tcl +nsadmin:~$ restart-aolserver birdnotes + + + + That's it! The script will email you with each successful backup (or + if it fails, it will send you an email with the reason) + + + + + Vacuum Postgres nightly + + The "vacuum" command must be run periodically to reclaim space. The + "vacuum analyze" form additionally collects statistics on the + disbursion of columns in the database, which the optimizer uses when + it calculates just how to execute queries. The availability of this + data can make a tremendous difference in the execution speed of + queries. This command can also be run from cron, but it probably makes + more sense to run this command as part of your nightly backup + procedure - if "vacuum" is going to screw up the database, you'd + prefer it to happen immediately after (not before!) you've made a + backup! The "vacuum" command is very reliable, but conservatism is + the key to good system management. So, if you're using the export + procedure described above, you don't need to do this extra step. + + + Edit your crontab: + +nsadmin:~$ crontab -e + + + We'll set vacuum up to run nightly at 1 AM. Add the following + line: + +0 1 * * * /usr/local/pgsql/bin/vacuumdb birdnotes + + + + + How to add a second server on a different port + + Starting another server is simply a matter of configuring another + aolserver instance, creating another database and pointing this + aolserver instance at a fresh copy of the OpenACS-4 code. We'll call + our new server birdnotes-dev + + + + Download another copy of openacs4.tcl.txt + into /tmp. + + +nsadmin:~$ cp /tmp/openacs4.tcl.txt ./birdnotes-dev.tcl +nsadmin:~$ chmod 660 birdnotes-dev.tcl +nsadmin:~$ emacs birdnotes-dev.tcl + + + Just like in , + you'll need to set the server parameters appropriately. Be sure to + choose a different port than your original server and to set + server to + birdnotes-dev. + + + + + Create a new database instance called + birdnotes-dev. Follow the instructions in + or . + + + + + + You can either copy your current OpenACS installation: + + + +nsadmin:~$ cd /web +nsadmin:~$ cp -r birdnotes birdnotes-dev + + + + Or Download the OpenACS + 4 software into /tmp again. + + + +nsadmin:~$ cd /web +nsadmin:/web$ tar xzvf /tmp/alpha2.tgz +nsadmin:/web$ mv openacs-4 birdnotes-dev + + + + + + Start your new server! + + +nsadmin:/web$ cd +nsadmin:~$ /usr/local/aolserver/bin/nsd-postgres -t /usr/local/aolserver/birdnotes-dev.tcl + + + + Visit the site with a web browser (using the port that you set + above). You should see the OpenACS installer. Once you install + the OpenACS datamodel, you'll also need to add your new aolserver + instance to /etc/inittab (or + daemontools) so it restarts automatically. + + + + + + Set up site-wide search + + OpenACS uses the OpenFTS package to + implement site-wide-search. You'll need to have the Tcl development + libraries and headers installed. (Debian users: + apt-get install tcl8.3-dev + + + + + As root, download the + Search-OpenFTS driver. + + + +nsadmin:~$ su - +Password: ********** +root:~# cd /tmp +root:/tmp# wget http://prdownloads.sourceforge.net/openfts/Search-OpenFTS-tcl-0.2.tar.gz +root:~# cd /usr/local/src +root:/usr/local/src# tar xzf /tmp/Search-OpenFTS-tcl-0.2.tar.gz +root:/usr/local/src# chown -R nsadmin.web Search-OpenFTS-tcl-0.2 +root:/usr/local/src# exit + + + + + Configure it. Note that you may need to set + --with-tcl=(your Tcl library + location). For Debian, add this to the end of the + ./configure command: + --with-tcl=/usr/lib/tcl8.3 + + + +nsadmin:~$ cd /usr/local/src/Search-OpenFTS-tcl-0.2 +nsadmin:/usr/local/src/Search-OpenFTS-tcl-0.2$ ./configure --with-aolserver-src=/usr/local/src/aolserver/aolserver + + + + + In order to compile on Debian, I had to edit my + Makefile.global. Add + -I/usr/include/tcl8.3 to the + line where INC is defined, so it looks like this: + + + +INC = ../include -I/usr/include/tcl8.3 + + + Then compile it: + + +nsadmin:/usr/local/src/Search-OpenFTS-tcl-0.2$ make +nsadmin:/usr/local/src/Search-OpenFTS-tcl-0.2$ cd aolserver +nsadmin:/usr/local/src/Search-OpenFTS-tcl-0.2/aolserver$ make + + + + + Install it. You need to do this step as root since some of the + libraries will be installed alongside your TCL libraries and some + alongside your PostgreSQL libraries. + + + +nsadmin:/usr/local/src/Search-OpenFTS-tcl-0.2/aolserver$ su - +Password: *********** +root:~# cd /usr/local/src/Search-OpenFTS-tcl-0.2 +root:/usr/local/src/Search-OpenFTS-tcl-0.2# make install +root:/usr/local/src/Search-OpenFTS-tcl-0.2# exit +nsadmin:/usr/local/src/Search-OpenFTS-tcl-0.2/aolserver$ cp nsfts.so /usr/local/aolserver/bin/ + + + + + + Add the following line to your aolserver config file (in our + example: + /usr/local/aolserver/birdnotes.tcl) + in the "ns_section ns/server/${server}/modules" section: + + + + ns_param nsfts ${bindir}/nsfts.so + + + + + Load the openFTS code into your database: + + + +nsadmin:/usr/local/src/Search-OpenFTS-tcl-0.2/aolserver$ cd +nsadmin:~$ psql -f /web/birdnotes/packages/openfts-driver/sql/postgresql/load.sql birdnotes +nsadmin:~$ restart-aolserver birdnotes + + + + + Open a browser and go to your server + (http://yourserver:port). Click on the "Package Manager" link in + the "Quick Links" section on the right side of the page. + + + + Click on the "Install packages" link and follow the instructions + to install the Note package and the OpenFTS Driver 4.2 package. + + + + Restart your server. + + +nsadmin:~$ restart-aolserver birdnotes + + + + + Give the server a few minutes to restart and then go back to your + server's front page and click on "Site Map" from the "Quick + Links" + + + + Create a "new sub folder" under "Main Site". Call the url + "openfts". + + + Click "mount" to mount the OpenFTS driver at the url + "openfts" (despite what the system says about these packages not + being meant to be mounted) + + + + Create another folder under "Main Site" at the url + "search". Create a "new application". Call the application + "Search" and choose the "Search" package from the drop-down list. + + + + Create a third folder under "Main Site" at the url + "notes". Create a "new application". Call the application "Notes" + and choose the "Note" package from the drop-down list. + + + + Restart the server. + + + + Return to your home page. Near the bottom of the page, Click on + the "OpenFTS Driver" link. Then click on + "Administration". Finally, click on "Initialize OpenFTS + Engine". Accept the defaults and continue. + + + + Click on the "Main Site" link to get back to the home page. Now, + click on the "ACS Service Contract" link near the bottom of the + home page. + + + + Click on the link to "install" the FtsEngineDriver. Also, click + the link to install the Note content provider. + + + + Restart the server. You can try inserting some notes and then + going to the search page to search for stuff. Note that the + content may not get indexed immediately, so give it a few + minutes. + + + + + ($Id: next-steps.xml,v 1.1 2002/02/01 17:14:07 vinodk Exp $) + Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml 1 Feb 2002 17:14:07 -0000 1.1 @@ -0,0 +1,922 @@ + +Install OpenACS 4 + + + Downloading OpenACS + + + Download the OpenACS 4 software + to the /tmp directory: + + + + Login as nsadmin and untar the + downloaded components into /web + directory. The alpha-2 tarball is currently named + alpha2.tgz. Replace + alpha2.tgz in the commands below + with whatever the current tarball is named. + + + +joeuser:~$ su - nsadmin +Password: *********** +nsadmin:~$ cd /web +nsadmin:/web$ tar xzf /tmp/alpha2.tgz + + + + + You should now have an + openacs-4/ directory tree in + /web. Rename this directory to + whatever you want your web service to be identified as. The name + of your web service is referred to as the + service_name. Since you can run multiple + separate web services under AOLserver, this identification is + used internally by AOLserver to differentiate your services from + one another. A service name should be a single word, + letters and numbers only. If the name of + your site is one word, that would be a good choice. For example + "birdnotes" might be the service name for the birdnotes.net + community. We'll use birdnotes as an example + in these docs. + + + +nsadmin:/web$ ls -l +total 4 +drwxr-xr-x 8 nsadmin nsadmin 4096 Nov 27 09:32 openacs-4 +nsadmin:/web$ mv openacs-4 birdnotes +nsadmin:/web$ ls -l +total 4 +drwxr-xr-x 8 nsadmin nsadmin 4096 Dec 20 14:37 birdnotes + + + + + + + + Skip ahead if you want to + + + + Prepare Oracle for OpenACS + + You should be logged on as + nsadmin for this step and you should + make sure that nsadmin is in the + dba group. + + + + Verify nsadmin membership by typing + groups when you login: + + +nsadmin:~$ groups +nsadmin dba web + + + If you do not see these groups, take the following action: + + +nsadmin:~$ su - +Password: ************ +root:~# usermod -g nsadmin -G dba,web nsadmin + + + If you get an error about an undefined group, then add that group + manually: + + +root:~# groupadd dba +root:~# groupadd nsadmin +root:~# groupadd web + + + Make sure to logout as root when + you are finished with this step and log back in as + nsadmin. + + + + Connect to Oracle using + svrmgrl and login: + + +nsadmin:~$ svrmgrl + +SVRMGR> connect internal +Connected. + + + + + Determine where the system tablespaces are stored: + + +SVRMGR> select file_name from dba_data_files; + + Example results: + + +/ora8/m01/app/oracle/oradata/ora8/system01.dbf +/ora8/m01/app/oracle/oradata/ora8/tools01.dbf +/ora8/m01/app/oracle/oradata/ora8/rbs01.dbf +/ora8/m01/app/oracle/oradata/ora8/temp01.dbf +/ora8/m01/app/oracle/oradata/ora8/users01.dbf +/ora8/m01/app/oracle/oradata/ora8/indx01.dbf +/ora8/m01/app/oracle/oradata/ora8/drsys01.dbf + + + + + Using the above output, you should determine where + to store your tablespace. As a general rule, you'll want to + store your tablespace on a mount point under the + /ora8 directory that is separate + from the Oracle system data files. By default, the Oracle system + is on m01, so we will use + m02. This enables your Oracle + system and database files to be on separate disks for optimized + performance. For more information on such a configuration, see + Chapter + 12 of Philip's + book. For this example, we'll use + /ora8/m02/oradata/ora8/. + + + + Create the directory for the datafile; to do this, + exit from svrmgrl and login as + root for this step: + + +SVRMGR> exit +nsadmin:~$ su - +Password: ************ +root:~# mkdir -p /ora8/m02/oradata/ora8/ +root:~# chown nsadmin.web /ora8/m02/oradata/ora8 +root:~# chmod 775 /ora8/m02/oradata/ora8 +root:~# exit +nsadmin:~$ + + + + + As nsadmin, create a tablespace for + the service. It is important that the tablespace can + autoextend. This allows the + tablespace's storage capacity to grow as the size of the data + grows. We set the pctincrease to be a very low value so that our + extents won't grow geometrically. We do not set it to 0 at + the tablespace level because this would affect Oracle's + ability to automatically coalesce free space in the + tablespace. + +nsadmin:~$ svrmgrl + +SVRMGR> connect internal; +SVRMGR> create tablespace birdnotes datafile '/ora8/m02/oradata/ora8/birdnotes01.dbf' size 50m autoextend on default storage (pctincrease 1); + + + + + Create a database user for this service. Give the + user access to the tablespace and rights to connect. We'll use + birdnotespassword as our password. + + + Write down what you specify as + service_name + (i.e. birdnotes) and + database_password + (i.e. birdnotespassword) + . You will need this information for configuring + exports and AOLserver. + + +SVRMGR> create user birdnotes identified by birdnotespassword default tablespace birdnotes +temporary tablespace temp quota unlimited on birdnotes; +SVRMGR> grant connect, resource, ctxapp, javasyspriv, query rewrite to birdnotes; +SVRMGR> revoke unlimited tablespace from birdnotes; +SVRMGR> alter user birdnotes quota unlimited on birdnotes; +SVRMGR> exit; + + + + Your table space is now ready. In case you are trying to delete a + previous OpenACS installation, consult these commands in below. + + + + Make sure that you can login to Oracle using your + service_name account: + + +nsadmin:~$ sqlplus birdnotes/birdnotespassword +SQL> select sysdate from dual; + +SYSDATE +---------- +2001-12-20 + +SQL> exit + + + + You should see today's date in a format 'YYYY-MM-DD.' + If you can't login, try redoing step 1 again. If the date is + in the wrong format, make sure you followed the steps outlined in + + + + + Next we'll set up AOLserver so that it has the proper environment + variables set before launching. Download this nsd-oracle script into + /tmp/nsd-oracle.txt : + + + +nsadmin:~$ cp /tmp/nsd-oracle.txt ./bin/nsd-oracle +nsadmin:~$ chmod 700 ./bin/nsd-oracle + + + + + + + Prepare Postgres for OpenACS + + Preparing Postgres is just a little bit simpler than preparing + Oracle. We simply need to create a database with the name of our + service-name + (i.e. birdnotes) + + +nsadmin:/web$ createdb birdnotes +CREATE DATABASE + + + Next we'll set up AOLserver so that it has the proper environment + variables set before launching. Download this nsd-postgres script into + /tmp/nsd-postgres.txt : + + +nsadmin:/web$ cd +nsadmin:~$ cp /tmp/nsd-postgres.txt ./bin/nsd-postgres +nsadmin:~$ chmod 700 ./bin/nsd-postgres + + + + + + Configuring AOLserver + + + The AOLserver architecture lets you run an arbitrary number of + virtual servers. A virtual server is an HTTP service running on a + specific port, e.g. port 80. In order for the OpenACS to work, you + need to configure a virtual server. Because the process is involved, + we have prepared a sample virtual server configuration file. + + + + + Download openacs4.tcl.txt + into /tmp. + + + + Modify it for your needs and save it in + /usr/local/aolserver/birdnotes.tcl + (Of course change birdnotes to + whatever you're using as your service-name + + + + +nsadmin:~$ cp /tmp/openacs4.tcl.txt ./birdnotes.tcl +nsadmin:~$ chmod 660 birdnotes.tcl +nsadmin:~$ emacs birdnotes.tcl + + + + Specifically, you'll have set the following variables + + + + + server - This is the name of + the directory where your code resides. In our example above, we + used birdnotes. + + + db_name - In almost all cases, + this can be kept as a reference to $server. If for some reason, + the tablespace you are using is different than your servername, + then you can set it here. You should have a good reason for doing + this. + + + + servername - This is just a + *pretty* name for your server. For example, we might call ours + "Birdnotes.net Community" + + + httpport - If you want your + server on a different port, enter it here + + + + + AOLServer is very configurable. These settings should get you + started, but for more options, read the AOLServer + docs. + + + + Kill any current running AOLserver processes and start a new + one. (Note, if you are using Oracle, rather than postgres, replace + nsd-postgres with + nsd-oracle): + +nsadmin:~$ killall nsd +; Should probably see: +nsd: no process killed +nsadmin:~$ /usr/local/aolserver/bin/nsd-postgres -t /usr/local/aolserver/birdnotes.tcl + + + + Attempt to connect to the service from a web browser as you did + in the section. You should + specify a URL like: + + +http://ip_name:ip_port/ + + + + You should see a page that looks like this - if so, go on to . + + + + If you don't see the login page, view your error log + (/usr/local/aolserver/logs/birdnotes-error.log) + to make sure the service is starting without any problems. If you + need to make changes, don't forget to kill any running + servers. + + + +nsadmin:~$ killall nsd + + + + + + Using the OpenACS Installer + + + Now that you've got AOLserver up and running, let's install OpenACS + 4. + + + + + You should see a page from the webserver titled + OpenACS Installation: + Welcome. You will be warned if your version of + the database driver is out of date, if AOLserver cannot connect + to the database, if any modules are missing or out-of-date, or if + there are any problems with filesystem permissions on the server + side. But if everything is fine, you can click + Next to proceed to load the + OpenACS Kernel data model. + + + + The next page shows the results of loading the OpenACS Kernel + data model - be prepared to wait a few minutes as it works. You + should see a string of "No errors." as the tables are + created. You'll see the line: + + + +Loading package .info files ... this will take a few minutes + + + + This will really take a few minutes. Have faith! Finally, + another Next button will appear at + the bottom - click it. + + + + + The following page shows the results of loading the package data + models. You should see positive results for each of the + previously selected packages, but watch out for any + errors. Eventually, the page will display "Generating secret + tokens" and then "Done"- click + Next. + + + + You should see a page, "OpenACS Installation: Create + Administrator" with form fields to define the OpenACS site + administrator. Fill out the fields as appropriate, and click + Create User. + + + + You should see a page, "OpenACS Installation: Set System + Information" allowing you to name your service. Fill out the + fields as appropriate, and click Set System + Information + + + + You'll see the final Installer page, "OpenACS + Installation: Complete." It will tell you that the server is + being restarted; note that unless you already set up a way for + AOLServer to restart itself (ie. inittab or daemontools), + you'll need to manually restart your service. + + + +nsadmin:~$ /usr/local/aolserver/bin/nsd-postgres -t /usr/local/aolserver/birdnotes.tcl + + + + + Give the server a few minutes to start up. Then + reload the final page above. You should see the front page, with + an area to login near the upper right. Congratulations, OpenACS + 4 is now up and running! + + + + + + + Keep AOLserver alive + + + Now, we'll describe how to start AOLserver automatically on boot, + or whenever else the service dies. + + + + There are 2 ways of doing this - via inittab or via daemontools. The + second way is by far the better way. Using daemontools gives you much + finer control over your servers and avoids the hassle of messing with + /etc/inittab. But, we'll describe + the inittab way as this may be easier for some users. I encourage + everyone to follow the links provided which describe how to . + + + Important: You need to set up + either inittab or daemontools, not both! + + + Editing inittab + + + This step should be completed as root. This can break every service + on your machine, so proceed with caution. + + + + + There are 2 general steps to getting this working. + + + + Install a script called + restart-aolserver. This + script doesn't actually restart AOLserver - it just kills + it. + + + + Ask the OS to restart our service whenever it's not + running. We do this by adding a line to + /etc/inittab. + + + + + Calling restart-aolserver + kills our service. The OS notices that our service is not + running, so it automatically restarts it. Thus, calling + restart-aolserver effectively + restarts our service. + + + + Copy this file into + /tmp/restart-aolserver.txt. + + + + This script needs to be SUID-root, which means + that the script will run as root. This is necessary to ensure + that the AOLserver processes are killed regardless of who owns + them. However the script should be executable by the + web group to ensure that the + users updating the web page can use the script, but that + general system users cannot run the script. You also need to + have Perl installed and also a symbolic link to it in + /usr/local/bin. + + +nsadmin:~$ su - +Password: *********** +root:~# cp /tmp/restart-aolserver.txt /usr/local/bin/restart-aolserver +root:~# chown root.web /usr/local/bin/restart-aolserver +root:~# chmod 4750 /usr/local/bin/restart-aolserver +root:~# ln -s /usr/bin/perl /usr/local/bin/perl +root:~# exit + + + + + Test the restart-aolserver + script. We'll first kill all running servers to clean the + slate. Then, we'll start one server and use + restart-aolserver to kill + it. If it works, then there should be no more servers + running. You should see the following lines. + + +nsadmin:~$ killall nsd +nsd: no process killed +nsadmin:~$ /usr/local/aolserver/bin/nsd-postgres -it /usr/local/aolserver/birdnotes.tcl +nsadmin:~$ restart-aolserver birdnotes +Killing 23727 +nsadmin:~$ killall nsd +nsd: no process killed + + + + The number 23727 indicates the process id(s) (PIDs) of the + processes being killed. It is important that no processes are killed by the second + call to killall. If there are + processes being killed, it means that the script is not + working. + + + Assuming that the restart-aolserver + script worked, login as root and open + /etc/inittab for + editing. + +nsadmin:~$ su - +Password: ************ +root:~# emacs -nw /etc/inittab + + + + + Copy this line into the bottom of the file as a template, + making sure that the first field + nss1 is unique. + + +nss1:2345:respawn:/usr/local/aolserver/bin/nsd-postgres -i -u nsadmin -g web -t /usr/local/aolserver/birdnotes.tcl + + + + + Important: Make sure there is a newline at the + end of the file. If there is not a newline at the end of the + file, the system may suffer catastrophic + failures. + + + + Still as root, enter the following command to re-initialize + /etc/inittab. + + +root:~# killall nsd +nsd: no process killed +root:~# /sbin/init q + + + + + See if it worked by running the + restart-aolserver script + again. + + +root:~# restart-aolserver birdnotes +Killing 23750 + + + + + + If processes were killed, congratulations, your server is now + automated for startup and shutdown. + + + + + Install daemontools + + + + Installation instructions: + + + + Debian + + + +root:~# apt-get install daemontools-installer +root:~# build-daemontools +root:~# # answer 'yes' when asked to create symlink from /service to /var/lib/svscan + + + + + + Red Hat + RPMs for RH 6.2 and RPM 7.1 are available + http://untroubled.org/rpms/daemontools. I + have not tested these, so I have no idea whether they work + properly. + + + + + Other distributions + + + You can download the source directly from the author's site + at http://cr.yp.to/daemontools/install.html. + + + + + + + + + Create a file called run inside + /web/birdnotes: + + + +nsadmin:~$ cd /web/birdnotes +nsadmin:/web/birdnotes$ emacs run + + + + Copy this text into that file: + + + +#!/bin/sh + +exec /usr/local/aolserver/bin/nsd-postgres -it /usr/local/aolserver/birdnotes.tcl -u nsadmin -g web + + + + As root, change the ownership of this file: + + + +nsadmin:/web/birdnotes$ su - +Password: *********** +root:~# chown root.root /web/birdnotes/run +root:~# chmod 700 /web/birdnotes/run + + + + Now, we'll link our web root to the + /service directory. This causes + daemontools to monitor this directory. It should find your + run script and run it as soon as + you hit return. + + + +root:~# killall nsd +root:~# ln -s /web/birdnotes /service +root:~# ps -A | grep nsd +19359 pts/3 00:00:08 nsd +19361 pts/3 00:00:00 nsd +19362 pts/3 00:00:00 nsd +19363 pts/3 00:00:00 nsd +19364 pts/3 00:00:00 nsd + + + + At this point, you should be able to use the + restart-aolserver script described + in . Daemontools, however, + allows you much more precision control. + + + + + svc -d /web/birdnotes - Bring + the server down + + + + svc -u /web/birdnotes - Start + the server up. Also, restart it whenever it stops. + + + + svc -o /web/birdnotes - Start + the server up once. Do not restart it if it stops. + + + + svc -t /web/birdnotes - Stop + and immediately restart the server + + + + + svc -k /web/birdnotes - Sends + the server a KILL signal. This is like KILL -9. AOLserver exits + immediately. If svc -t fails to fully kill AOLserver, use this + option. + + + + + + At this point, these commands will work only for the + root user. We can give a group + permission to run these commands as well. Download this script to + /tmp. + + + +root:~# cp /tmp/svgroup.txt /usr/local/bin/svgroup +root:~# chmod 755 /usr/local/bin/svgroup +root:~# svgroup web /service/birdnotes + + + + This command will give the web + group permission to use svc commands + on the birdnotes server. + + + + Try it out. You may want to tail -f + /usr/local/aolserver/log/birdnotes-error.log in + another window, so you can see what happens when you type these + commands. + + + +root:~# exit +nsadmin:~$ # first, bring the server down +nsadmin:~$ svc -d /web/birdnotes +nsadmin:~$ # now, start the server up +nsadmin:~$ svc -u /web/birdnotes +nsadmin:~$ # wait for server to come up, then restart it +nsadmin:~$ svc -t /web/birdnotes + + + + Most of this information comes from Tom Jackson's AOLServer+Daemontools + Mini-HOWTO. + + + + + + Running AOLserver on Port 80 + + If you want to run the service on port 80 (the default HTTP port), + you need to set the port to 80 in your + service_name.tcl file in + /usr/local/aolserver. + + + + Moreover, you will need to start the service as + root. If you follow the instructions + above for automating + startup, this will be taken care of, but if you ever start the + server from the command line, be sure to su + - first. + + + + Port 80 is a privileged port. Only certain users + can claim it. When you start nsd as + root, it obtains the port, and then changes to run as whatever user + you specify in the server configuration file. This ensures a high + level of security, as the server, once started, is not running as + root. This mean that if someone was + able to exploit your web server to execute a command on your server, + they would not be able to gain root + access. + + + + Deleting a tablespace + + Skip down for instructions on . + + + + Deleting an Oracle tablespace + + + Should it become necessary to rebuild a tablespace from scratch, + you can use the drop user command + in SVRMGRL with the cascade + option. This command will drop the user and every database object + the user owns. + + +SVRMGR> drop user birdnotes cascade; + + + + If this does not work because svrmgrl "cannot drop a user that + is currently connected", make sure to kill the AOLserver using + this user. If it still does not work, do: + + +SVRMGR> select username, sid, serial# from v$session where username='birdnotes'; + + + and then + +SVRMGR> alter system kill session 'sid,serial#'; + + + + where sid and serial# are + replaced with the corresponding values for the open session. + + Use with caution! + + + If you feel the need to delete everything + related to the service, you can also issue the following: + +SVRMGR> drop tablespace birdnotes including contents cascade constraints; + + + + + Deleting a Postgres tablespace + + + Dropping a Postgres tablespace is easy. You have to stop any + AOLserver instances that are using the database that you wish to + drop. If you're using daemontools, this is simple, just use the + 'down' flag (-d). If you're using inittab, you have to comment out + your server in /etc/inittab, + reread the inittab with /sbin/init + q, and then restart-aolserver + birdnotes. + + Then, to drop the db, just do: + +nsadmin:~$ dropdb birdnotes +DROP DATABASE + + + + + ($Id: openacs.xml,v 1.1 2002/02/01 17:14:07 vinodk Exp $) + + Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/oracle.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/oracle.xml,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/oracle.xml 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/oracle.xml 1 Feb 2002 17:09:12 -0000 1.2 @@ -1,642 +1,680 @@ - -Installing Oracle 8.1.6 + + Install Oracle 8.1.7 -NOTE: -This document was written based on Oracle, version 8.1.6. -However, the same approach should lead to a successful installation of -Oracle 8.1.7. If you encounter any incompatibilities, please -let us know + Skip this page if you're not interested in Oracle - -Acquire Oracle 8.1.6 Enterprise Edition + NOTE: This document + was originally written based on Oracle, version 8.1.6. However, the + same approach should lead to a successful installation of Oracle + 8.1.7. If you encounter any incompatibilities, please let us know + -You can obtain the software through a variety of methods: + NOTE: We've not yet tested + OpenACS 4 under Oracle 9i - -Order a CD from the Oracle Store. -There is a link under the heading Buying Tips that says "Learn -how to trial Oracle software." Click this for instructions on how to -make your order. The cost is currently $39.95 with delivery estimated between -3-4 business days. + NOTE: This document assumes that + you'll be installing Oracle on the same box as AOLServer. For more + details on a remote Oracle installation, see Daryl Biberdorf's document. + + + Acquire Oracle 8.1.7 Enterprise Edition - + + You can obtain the software through a variety of methods (You'll need + to become a member of technet.oracle.com, which is + free): + -Request a free demonstration CD. At the -Oracle Downloads page, click on the appropriate version of Oracle 8.1.6 -Release 2 for your OS. You should see a "Try Online" link. After -filling out some information forms, you should be able to order a version of -the CD. This takes about 2-3 weeks for delivery. + + + Order a CD from the Oracle + Store. The cost is currently $39.95 for a 30-day + evaluation copy with delivery estimated between 3-4 business + days. + + + Download the software from the + Oracle Downloads page. + - + + + Oracle 8.1.7 now comes with a Java RunTime + Environment built-in to the distribution, so you no longer + have to download and install it separately. + -You can download Oracle from the Technet ftp site. The Linux version is -at ftp://ftp.oracle.com/pub/www/otn/linux/oracle8i/oracle8161_tar.gz -Note that the Oracle tarball that you will download is huge (> -250MB). - - - - -Oracle 8.1.6 now comes with a Java RunTime Environment built-in to the -distribution, so you no longer have to download and install it separately. - - - - -After the download is complete, untar the file to a convenient location. -To do this, you will need to login and cd to the directory where the archive -is. - - + + After the download is complete, untar the file + to a convenient location. To do this, you will need to login + and cd to the directory where the archive is. + + $ cd /directory/where/oracle/is -$ tar -xzvf oracle8161_tar.gz - - - - - - +$ tar -xvf oracle81701.tar + + + + + + It used to be possible to get a free CD by mail, but + I can no longer find the link for that option. + + - -Things to Keep in Mind + + Things to Keep in Mind + + Throughout these instructions, we will refer to a number of + configurable settings and advise certain defaults. With the exception + of passwords, we advise you to follow these defaults unless you know + what you are doing. Subsequent documents will expect that you used + the defaults, so a change made here will necessitate further changes + later. For a guide to the defaults, please see . + -Throughout these instructions, we will refer to a number of configurable -settings and advise certain defaults. With the exception of passwords, we -advise you to follow these defaults unless you know what you are doing. -Subsequent documents will expect that you used the defaults, so a change made -here will necessitate further changes later. For a guide to the defaults, -please see . + + + Pre-Installation Tasks + + Though Oracle 8.1.7 has an automated installer, we still need to + perform several manual, administrative tasks before we can launch + it. You must perform all of these steps as the + root user. We recommend entering the + X window system as a normal user and then doing a su + -. This command gives you full root access. + - + - -Pre-Installation Tasks + + Login as a non-root user and start X by typing + startx + + +joeuser:~$ startx + + + + Open a terminal window type and login as root -Though Oracle 8.1.6 has an automated installer, we still need to perform -several manual, administrative tasks before we can launch it. You must -perform all of these steps as the root user. We recommend -entering the X window system as a user other than root and -then doing a su -. This command gives you full root access. + +joeuser:~$ su - +Password: *********** +root:~# + + + + Create and setup the oracle + group and oracle account + - -Login in as a non-root user + + We need to create a user oracle, + which is used to install the product, as well as starting and + stopping the database. + + +root:~# groupadd dba +root:~# groupadd oinstall +root:~# groupadd oracle +root:~# useradd -g dba -G oinstall,oracle -m oracle +root:~# passwd oracle + - + + You will be prompted for the New Password and Confirmation of + that password. + + -Start X by typing startx + Setup the installation location for Oracle. While + Oracle can reside in a variety of places in the file system, + OpenACS has adopted /ora8 as the + base directory. + + + Note: the Oracle install needs about 1 GB free + on /ora8 to install + successfully. + - + +root:~# mkdir /ora8 +root:/ora8# cd /ora8 +root:/ora8# mkdir -p m01 m02 m03/oradata/ora8 +root:/ora8# chown -R oracle.dba /ora8 +root:/ora8# exit + + -Open a terminal window type and login as root + + Set up the oracle user's + environment + - -$ su - -; Enter the root password when prompted. -# - - - + + + Log in as the user + oracle by typing the + following: + -Create and setup the oracle group and -oracle account + +joeuser:~$ su - oracle +Password: ******** + + -We need to create a user oracle, which is used to install -the product, as well as starting and stopping the database. + + Use a text editor to edit the + .bash_profile file in the + oracle account home + directory. + - -# groupadd dba -# groupadd oinstall -# groupadd oracle -# useradd -g dba -G oinstall,oracle -m oracle - - + +oracle:~$ emacs .bash_profile + - -Now change the oracle account password - + + You may get this error trying to start emacs: + - - -# passwd oracle - - - -You will be prompted for the New Password and Confirmation of that -password. - - -Setup the installation location for Oracle - -While Oracle can reside in a variety of places in the file system, -ArsDigita has adopted '/ora8' as the base directory. - -Note: the Oracle install needs about 1 GB free on -'/ora8' to install successfully. - - -# mkdir /ora8 -# cd /ora8 -# mkdir -p m01 m02 m03/oradata/ora8 -# chown -R oracle.dba /ora8 -# exit ; Logs out. - - - - -Set up the oracle user environment - - - - -Log in as the user oracle - -In the same terminal window, type the following. - - -$ su - oracle -; Enter oracle's password - - - - -Use a text editor to edit the .bash_profile file in the -oracle account home directory. - - -$ emacs ~oracle/.bash_profile - - - -You may get this error trying to start emacs: - - + Xlib: connection to ":0.0" refused by server Xlib: Client is not authorized to connect to Server emacs: Cannot connect to X server :0. Check the DISPLAY environment variable or use `-d'. Also use the `xhost' program to verify that it is set to permit connections from your machine. - - + - -If so, do the following. - + + If so, open a new terminal window and do the following: + - -Open a new terminal window. -$ xhost +localhost -Now, back in the oracle terminal -$ export DISPLAY=localhost:0.0 -$ emacs ~oracle/.bash_profile - - - -Try this procedure anytime you get an Xlib connection refused error. + +joeuser:~$ xhost +localhost + + + Now, back in the oracle terminal: + - + +oracle:~$ export DISPLAY=localhost:0.0 +oracle:~$ emacs .bash_profile + -Add the following lines to ~oracle/.bash_profile: + + Try this procedure anytime you get an Xlib connection refused + error. + + + Add the following lines (substituting your + Oracle version number as needed) to + .bash_profile: + - - + export ORACLE_BASE=/ora8/m01/app/oracle -export ORACLE_HOME=$ORACLE_BASE/product/8.1.6 +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 umask 022 - - + -Save the file by typing CTRL-X CTRL-S and then exit by typing -CTRL-X CTRL-C. Alternatively, use the menus. - - + + Save the file by typing CTRL-X + CTRL-S and then exit by typing + CTRL-X + CTRL-C. Alternatively, use the + menus. + + + - -Make sure that you do not add any lines like the following - + + Make sure that you do not add any lines like the + following + - + # NLS_LANG=american # export NLS_LANG - - + -These lines will change the Oracle date settings and will break the -ArsDigita Community System (ACS) because ACS depends on the ANSI date format, -YYYY-MM-DD dates. - + + These lines will change the Oracle date settings and will break + OpenACS since OpenACS depends on the ANSI date format, YYYY-MM-DD + dates. + + -Log out as oracle + + Log out as oracle + + + +oracle:~$ exit + + - -$ exit - - + + Log back in as oracle and double + check that your environment variables are as intended. The + env command lists all of the + variables that are set in your environment, and + grep shows you just the lines + you want (those with ORA in it). + -Log back in as oracle and double check that your environment variables -are as intended - + +oracle:~$ su - oracle +oracle:~$ env | grep ORA + + + If it worked, you should see: + - -$ su - oracle -$ env | grep ORA - - - - -If it worked, you should see: - - + ORACLE_SID=ora8 ORACLE_BASE=/ora8/m01/app/oracle ORACLE_TERM=vt100 -ORACLE_HOME=/ora8/m01/app/oracle/product/8.1.6 -ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data - - +ORACLE_HOME=/ora8/m01/app/oracle/product/8.1.7 +ORA_NLS33=/ora8/m01/app/oracle/product/8.1.7/ocommon/nls/admin/data + -If not, try adding the files to ~oracle/.bashrc instead of -.bash_profile. Then logout and log back in again. Also, be -certain you are doing su - and not just su. The -- means that .bashrc and .bash_profile -will be evaluated. + + If not, try adding the files to + ~/.bashrc instead of + .bash_profile. Then logout and + log back in again. Also, be certain you are doing + su - oracle and not just + su oracle. The + - means that + .bashrc and + .bash_profile will be + evaluated. + -Make sure that /bin, /usr/bin, and -/usr/local/bin are in your path by typing: + + Make sure that /bin, + /usr/bin, and + /usr/local/bin are in your path + by typing: + - -$ echo $PATH -/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/oracle/bin:/ora8/m01/app/oracle/product/8.1.6/bin - - + +oracle:~$ echo $PATH +/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/oracle/bin:/ora8/m01/app/oracle/product/8.1.7/bin + -If they are not, then add them to the .bash_profile by changing the PATH -statement above to -PATH=$PATH:/usr/local/bin:$ORACLE_HOME/bin - - + + If they are not, then add them to the + .bash_profile by changing the + PATH statement above to + PATH=$PATH:/usr/local/bin:$ORACLE_HOME/bin + + + + + + Installing Oracle 8.1.7 Server - - -Installing Oracle 8.1.6 Server + + + Log in as oracle and + start X if not already running. Start a new terminal: + + +joeuser:~$ xhost +localhost +joeuser:~$ su - oracle +Password: ********** +oracle:~$ export DISPLAY=localhost:0.0 + + - -Log in as the user oracle and start X if not already -running - + + Find the runInstaller script + + + + If you are installing Oracle from a CD-ROM, it is located in + the install/linux path from + the cd-rom mount point + - -Start a new terminal -$ xhost +localhost -$ su - oracle -Enter oracle password -$ export DISPLAY=localhost:0.0 - - - + +oracle:~$ su - root +root:~# mount -t iso9660 /dev/cdrom /mnt/cdrom +root:~# exit +oracle:~$ cd /mnt/cdrom + + -Find the 'runInstaller' script + + If you are installing from the tarball, the install script is + located in the Oracle8iR2 + directory that was created when you expanded the archive. + + +oracle:~$ cd /where/oracle/Disk1 + + + + + Check to make sure the file is there. + - -If you are installing Oracle from a CD-ROM, it is located in the -'install/linux' path from the cd-rom mount point - - - - -$ su - root -# mount -t iso9660 /dev/cdrom /mnt/cdrom -# exit -$ cd /mnt/cdrom - - - - -If you are installing from the tarball, the install script is located in -the 'Oracle8iR2' directory that was created when you expanded the -archive. - - - - -$ cd /where/oracle/archive/is/Oracle8iR2 - - - - - -Check to make sure the file is there. - - -$ ls + +oracle:/where/oracle/Disk1$ ls doc index.htm install runInstaller stage starterdb - - - -If you don't see runInstaller you are in the wrong -directory. + - - + + If you don't see + runInstaller, you are in the + wrong directory. + + -Run the installer - + + Run the installer + + +oracle:/where/oracle/Disk1$ ./runInstaller + - -$ ./runInstaller - - + + A window will open that welcomes you to the 'Oracle Universal + Installer' (OUI). Click on + "Next" + + - -A window will open that welcomes you to the 'Oracle Universal -Installer' (OUI). Click on "Next" + + The "File Locations" screen in the OUI: + + + + "Source" path should have been + prefilled with "(wherever you mounted the + CDROM)/stage/products.jar" + - - - + + "destination" path says + "/ora8/m01/app/oracle/product/8.1.7" + -The "File Locations" screen in the OUI: - + + If the destination is not correct it is because your + environment variables are not set properly. Make sure you + logged on as oracle using + su - oracle. If so, edit the + ~/.bash_profile as you + did in + + + + Click "Next" (a pop up window will display Loading + Product information). + + + - -"Source" path should have been prefilled with "(wherever -you mounted the CDROM)/stage/products.jar" + + The "Unix Group Name" screen in the OUI: + + + + The Unix Group name needs to be set to + 'oinstall' ( we made + this Unix group earlier ). + - + + Click "Next" + -"destination" path says -"/ora8/m01/app/oracle/product/8.1.6" + + A popup window appears instantly, requesting you + to run a script as root: + -If the destination is not correct it is because your environment variables -are not set properly. Make sure you logged on as oracle -using su - oracle. If so, edit the -~oracle/.bash_profile as you did in + + + Debian users need to link + /bin/awk to + /usr/bin/awk before + running the script below + - + +joueser:~$ su - +root:~# ln -s /usr/bin/awk /bin/awk + + + -Click "Next" (a pop up window will display Loading Product -information). + + Open a new terminal window, then type: + - - - - - - -The "Unix Group Name" screen in the OUI: - - - - -The Unix Group name needs to be set to 'oinstall' ( we made this -Unix group earlier ). - - - - -Click "Next" - - - - -A popup window appears instantly, requesting you to run a script a root: - - - - -Open a new terminal window, then type: - - - - -$ su -# cd /ora8/m01/app/oracle/product/8.1.6 -# ./orainstRoot.sh + +joeuser:~$ su - +root:~# cd /ora8/m01/app/oracle/product/8.1.7 +root:~# ./orainstRoot.sh ; You should see: Creating Oracle Inventory pointer file (/etc/oraInst.loc) -Changing groupname of /ora8/m01/app/oracle/oraInventory to oinstall. -# exit -$ exit - - - +Changing groupname of /ora8/m01/app/oracle/oraInventory to oinstall. +root:~# mkdir -p /usr/local/java +root:~# exit +joeuser:~$ exit + + -Click "Retry" + + Click "Retry" + + + - - - + + The "Available Products" screen in the OUI: + -The "Available Products" screen in the OUI: - + + + Select "Oracle 8i Enterprise Edition 8.1.7.1.0" + + Click "Next" + + - -Select "Oracle 8i Enterprise Edition 8.1.6.1.0" + + The "Installation Types" screen + + + + Select the "Custom" installation type. + - + Click "Next" + + -Click "Next" + + The "Available Product Components" screen + + + + In addition to the defaults, make sure that "Oracle SQLJ + 8.1.6.0," "Oracle Protocol Support 8.1.6.1.0," and + "Linux Documentation 8.1.6.0.0" are also checked (they + were not in release 8.1.5). + - - - + + Click "Next" + -The "Installation Types" screen - + + A progress bar will appear for about 1 minute. + + + + + The "Component Locations" screen in the OUI + - -Select the "Custom" installation type. + + + Click on the "Java Runtime Environment 1.1.8" It + should have the path + "/ora8/m01/app/oracle/jre/1.1.8" + + + Click "Next" + - + + A progress bar will appear for about 1 minute. + + + -Click "Next" + + The "Privileged Operation System Groups" screen in the + OUI + + + + Enter "dba" for "Database Administrator + (OSDBA) Group" + - - - + + Enter "dba" for the "Database Operator + (OSOPER) Group" + -The "Available Product Components" screen - + + Click "Next" + + + A progress bar will appear for about 1 minute. + + + - -In addition to the defaults, make sure that "Oracle SQLJ -8.1.6.0," "Oracle Protocol Support 8.1.6.1.0," and "Linux -Documentation 8.1.6.0.0" are also checked (they were not in release -8.1.5). + + The "Create a Database" screen in the OUI + + + + Select "No" as we will do this later, after some + important configuration changes. + - + + Click "Next" + + + -Click "Next" + + The "Summary" screen in the OUI + + + + Check the "Space Requirements" section to verify + you have enough disk space for the install. + + + + Check that "(91 products)" is in the "New + Installations" section title. + - + + Click "Install" + -A progress bar will appear for about 1 minute. + + A progress bar will appear for about 20 - 30 minutes. Now is a + good time to take a break. + + + A "Setup Privileges" window will popup towards the + end of the installation asking you to run a script as + root + - - - + + Run the script. + -The "Component Locations" screen in the OUI - - - - -Click on the "Java Runtime Environment 1.1.8" It should have -the path "/ora8/m01/app/oracle/jre/1.1.8" - - - - -Click "Next" - - - - -A progress bar will appear for about 1 minute. - - - - - - -The "Privileged Operation System Groups" screen in the OUI - - - - -Enter "dba" for "Database Administrator (OSDBA) -Group" - - - - -Enter "dba" for the "Database Operator (OSOPER) -Group" - - - - -Click "Next" - - - - -A progress bar will appear for about 1 minute. - - - - - -The "Create a Database" screen in the OUI - - - - -Select "No" as we will do this later, after some important -configuration changes. - - - - -Click "Next" - - - - - - -The "Summary" screen in the OUI - - - - -Check the "Space Requirements" section to verify you have -enough disk space for the install. - - - - -Check that "(91 products)" is in the "New -Installations" section title. - - - - -Click "Install" - - - - -A progress bar will appear for about 20- 30 minutes. Now is a good time -to take a break. - - - - -A "Setup Privileges" window will popup towards the end of the -installation asking you to run a script as root - - - -Run the script. - - - - -$ su - -Enter root password -# /ora8/m01/app/oracle/product/8.1.6/root.sh + +joeuser:~$ su - +Password: ********* +root:~# /ora8/m01/app/oracle/product/8.1.7/root.sh ; You should see the following. Creating Oracle Inventory pointer file (/etc/oraInst.loc) Changing groupname of /ora8/m01/app/oracle/oraInventory to oinstall. -# /ora8/m01/app/oracle/product/8.1.6/root.sh +# /ora8/m01/app/oracle/product/8.1.7/root.sh Running Oracle8 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle - ORACLE_HOME= /ora8/m01/app/oracle/product/8.1.6 + ORACLE_HOME= /ora8/m01/app/oracle/product/8.1.7 ORACLE_SID= ora8 Enter the full pathname of the local bin directory: [/usr/local/bin]: @@ -654,548 +692,547 @@ Agent. These files may be found in the directories you use for storing other Net8 log and trace files. If such files exist, the OEM IA may not restart. + + - - - + + Do not follow the instructions on deleting trace + and log files, it is not necessary. + + -Do not follow the instructions on deleting trace and log files, it is not -necessary. + +root:~# exit +joeuser:~$ exit + + + + Go back to the pop-up window and click "OK" + - - + + The "Configuration Tools" screen in the OUI + - -# exit -$ exit - - + + + This window displays the config tools that will automatically + be launched. + + + -Go back to the pop-up window and click "OK" + + The "Welcome" screen in the "net 8 Configuration + Assistant" + + + + Make sure the "Perform Typical installation" is + not selected. + - + + Click "Next" + -The "Configuration Tools" screen in the OUI + + The "Directory Service Access" screen in the + "Net 8 Configuration Assistant" + - + + Select "No" + - -This window displays the config tools that will automatically be -launched. + + Click "Next" + + + - - - + + The "Listener Configuration, Listener Name" screen in + the "Net 8 Configuration Assistant" + -The "Welcome" screen in the "net 8 Configuration -Assistant" + + + Accept the default listener name of "LISTENER" + - + + Click "Next" + + + - -Make sure the "Perform Typical installation" is -not selected. + + The "Listener Configuration, Select + Protocols" screen in the "Net 8 Configuration + Assistant" + + + + The only choice in "Select protocols:" should be + "TCP/IP" + - + + Click "Next" + + + -Click "Next" + + The "Listener Configuration TCP/IP Protocol" screen in + the "Net 8 Configuration Assistant" + + + + Default Port should be 1521 and selected. + - - + + Click "Next" + + + - -The "Directory Service Access" screen in the "Net 8 -Configuration Assistant" + + The "Listener Configuration, More Listeners" screen in + the "Net 8 Configuration Assistant" + + + + Select "No" + - + + Click "Next" + + + -Select "No" + + The "Listener Configuration Done" screen in the + "Net 8 Configuration Assistant" + + + + Click "Next" + + + - + + The "Naming Methods Configuration" screen + in the "Net 8 Configuration Assistant" + -Click "Next" + + + Select "No" + + + Click "Next" + + + - - - + + The "Done" screen in the "Net 8 Configuration + Assistant" + -The "Listener Configuration, Listener Name" screen in the -"Net 8 Configuration Assistant" + + + Click "Finish" + + + - + + The "End of Installation" screen in the OUI + - -Accept the default listener name of "LISTENER" + + + Click "Exit" + + + Click "Yes" on the confirmation pop up window. + - + + The Oracle Universal Installer window should have disappeared! + + + + -Click "Next" + + Congratulations, you have just installed Oracle 8.1.7 Server! + However, you still need to create a database which can take about an + hour of non-interactive time, so don't quit yet. + + + + Creating the First Database + + + This step will take you through the steps of creating a customized + database. Be warned that this process takes about an hour on a + Pentium II with 128 MB of RAM. + - - - + + + Make sure you are running X. Open up a terminal and + su to oracle and then run the + dbassist program. + -The "Listener Configuration, Select Protocols" screen in the -"Net 8 Configuration Assistant" + +joeuser:~$ xhost +localhost +joeuser:~$ su - oracle +Password: ********* +oracle:~$ export DISPLAY=localhost:0.0 +oracle:~$ dbassist + - + - -The only choice in "Select protocols:" should be -"TCP/IP" + + The "Welcome" screen in the Oracle Database + Configuration Agent (ODCA) + + + + Select "Create a database" + - + + Click "Next" + + + -Click "Next" + + The "Select database type" screen in the ODCA + - - - + + + Select "Custom" + -The "Listener Configuration TCP/IP Protocol" screen in the -"Net 8 Configuration Assistant" + + Click "Next" + + + - + + The "Primary Database Type" window in ODCA + - -Default Port should be 1521 and selected. + + + Select "Multipurpose" + + + Click "Next" + + + - + + The "concurrent users" screen of the ODCA + -Click "Next" + + + Select "60" concurrent users. + + + Click "Next" + + - - - + -The "Listener Configuration, More Listeners" screen in the -"Net 8 Configuration Assistant" - + + Select "Dedicated Server + Mode", click + "Next" + + + Accept all of the options, and click + "Next" Oracle Visual + Information Retrieval may be grayed out. If so, you can ignore + it; just make sure that everything else is checked. + - -Select "No" + + For "Global Database Name", enter + "ora8"; for + "SID", also enter + "ora8" (it should do + this automatically). Click + "Next". + + + Accept the defaults for the next screen (control file + location). Click + "Next" + - + + Go to the "temporary" and + "rollback" tabs, and change the Size + (upper-right text box) to + 150MB. Click + "Next" + -Click "Next" + + Increase the redo log sizes to + 10000K each. Click + "Next" + - - - + + Use the default checkpoint interval & timeout. Click + "Next" + -The "Listener Configuration Done" screen in the "Net 8 -Configuration Assistant" - + + Increase "Processes" + to 100; + "Block Size" to + 4096 (better for small Linux + boxes; use 8192 for a big Solaris machine). + + + Accept the defaults for the Trace File Directory. Click + "Next" + - -Click "Next" + + Finally, select "Save information to a shell + script" and click + "Finish" (We're + going to examine the contents of this file before creating our + database.) + - - - + + Click the "Save" + button. Oracle will automatically save it to the correct + directory and with the correct file name. This will likely be + /ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib/sqlora8.sh + -The "Naming Methods Configuration" screen in the "Net 8 -Configuration Assistant" + + It will alert you that the script has been saved + successfully. + - + + Now we need to customize the database configuration a bit. While + still logged on as oracle, edit + the database initialization script (run when the db loads). The + scripts are kept in + $ORACLE_HOME/dbs and the name of + the script is usually + initSID.ora + where SID is the SID of your + database. Assuming your + $ORACLE_HOME matches our default + of + /ora8/m01/app/oracle/product/8.1.7, + the following will open the file for editing. + - -Select "No" + +oracle:~$ emacs /ora8/m01/app/oracle/product/8.1.7/dbs/initora8.ora + + + + Add the following line to the end: + - - -Click "Next" - - - - - -The "Done" screen in the "Net 8 Configuration -Assistant" - - - - -Click "Finish" - - - - - - -The "End of Installation" screen in the OUI - - - - -Click "Exit" - - - - -Click "Yes" on the confirmation pop up window. - - - - -The Oracle Universal Installer window should have disappeared! - - - - - - -Congratulations, you have just installed Oracle 8.1.6 Server! However, you -still need to create a database which can take about an hour of -non-interactive time, so don't quit yet. - - - - - -Creating the First Database - - -This step will take you through the steps of creating a customized -database. Be warned that this process takes about an hour on a Pentium II -with 128 MB of RAM. - - -Make sure you are running X. Open up a terminal and su to oracle and then -run the dbassist program. - - - -$ xhost +localhost -$ su - oracle -; Enter oracle password -$ export DISPLAY=localhost:0.0 -$ dbassist - - - - - - -The "Welcome" screen in the Oracle Database Configuration Agent -(ODCA) - - - - -Select "Create a database" - - - - -Click "Next" - - - - -The "Select database type" screen in the ODCA - - - - -Select "Custom" - - - - -Click "Next" - - - - - -The "Primary Database Type" window in ODCA - - - - -Select "Multipurpose" - - - - -Click "Next" - - - - - -The "concurrent users" screen of the ODCA - - - - -Select "60" concurrent users. - - - - -Click "Next" - - - - - -Select "Dedicated Server Mode", click -"Next" - - - - -Accept all of the options, and click "Next" -Oracle Visual Information Retrieval may be grayed out. If so, you can ignore -it; just make sure that everything else is checked. - - - - -For "Global Database Name", enter -"ora8"; for "SID", also enter -"ora8" (it should do this automatically). Click -"Next". - - - - -Accept the defaults for the next screen (control file location). Click -"Next" - - - - -Go to the "temporary" and -"rollback" tabs, and change the Size (upper-right -text box) to 150MB. Click "Next" - - - - -Increase the redo log sizes to 10000K each. Click -"Next" - - - - -Use the default checkpoint interval & timeout. Click -"Next" - - - - -Increase "Processes" to 100; -"Block Size" to 4096 (better for -small Linux boxes; aD uses 8192 on the big Solaris machines). - - - - -Accept the defaults for the Trace File Directory. Click -"Next" - - - - -Finally, select "Save information to a shell -script" and click "Finish" -(We're going to examine the contents of this file before creating our -database.) - - - - -Click the "Save" button. Oracle will -automatically save it to the correct directory and with the correct file -name. This will likely be -/ora8/m01/app/oracle/product/8.1.6/assistants/dbca/jlib/sqlora8.sh - - - - - -It will alert you that the script has been saved successfully. - - - - -Now we need to customize the database configuration a bit. While still -logged on as oracle, edit the database initialization script -(run when the db loads). The scripts are kept in -$ORACLE_HOME/dbs and the name of the script is usually -initSID.ora where SID is the SID of your -database. Assuming your $ORACLE_HOME matches our default of -/ora8/m01/app/oracle/product/8.1.6, the following will open the -file for editing. - - -$ emacs /ora8/m01/app/oracle/product/8.1.6/dbs/initora8.ora - - - -Add the following line to the end: - - - - + nls_date_format = "YYYY-MM-DD" - - + + -Now find the open_cursors line in the file. If you're -using emacs scroll up to the top of the buffer and do -CTRL-S and type open_cursors to find the line. The -default is 100. Change it to 500. - - + + Now find the open_cursors line + in the file. If you're using + emacs scroll up to the top of + the buffer and do CTRL-S and + type open_cursors to find the + line. The default is 100. Change + it to 500. + + + open_cursors = 500 - - + + -Save the file. In emacs, do CTRL-X CTRL-S to save followed -by CTRL-X CTRL-C to exit or use the menu. + + Save the file. In emacs, do CTRL-X + CTRL-S to save followed by + CTRL-X CTRL-C to exit or use + the menu. + + + At this point, you are ready to initiate database creation. We + recommend shutting down X to free up some RAM unless you have 256 + MB of RAM or more. You can do this quickly by doing a + CRTL-ALT-BACKSPACE, but make + sure you have saved any files you were editing. You should now be + returned to a text shell prompt. If you get sent to a graphical + login screen instead, switch to a virtual console by doing + CRTL-ALT-F1. Then login as + oracle. + - + + Change to the directory where the database creation script is and + run it: + -At this point, you are ready to initiate database creation. We recommend -shutting down X to free up some RAM unless you have 256 MB of RAM or more. -You can do this quickly by doing a CRTL-ALT-BACKSPACE, but make -sure you have saved any files you were editing. You should now be returned to -a text shell prompt. If you get sent to a graphical login screen instead, -switch to a virtual console by doing CRTL-ALT-F1. Then login as -oracle. + +oracle:~$ cd /ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib +oracle:/ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib$ ./sqlora8.sh + + + In some instances, Oracle will save the file to + /ora8/m01/app/oracle/product/8.1.7/assistants/dbca + Try running the script there if your first attempt does not + succeed. + - + + Your database will now be built. It will take > 1 hour - no + fooling. You will see lots of errors scroll by (like: + "ORA-01432: public synonym to be dropped does not + exist") Fear not, this is normal. + -Change to the directory where the database creation script is and run it: + + Eventually, you'll be returned to your shell prompt. In the + meantime, relax, you've earned it. + + + + + + Acceptance Test - -$ cd /ora8/m01/app/oracle/product/8.1.6/assistants/dbca/jlib -$ ./sqlora8.sh - - + + For this step, open up a terminal and + su to + oracle as usual. You should be + running X and Netscape (or other web browser) for this phase. + -In some instances, Oracle will save the file to -/ora8/m01/app/oracle/product/8.1.6/assistants/dbca Try running -the script there if your first attempt does not succeed. + + + You need to download the "Oracle Acceptance Test" file. + It's available here and at http://philip.greenspun.com/wtr/oracle/acceptance-sql.txt. + Save the file to /tmp + + + In the oracle shell, copy the file. + - + +oracle:~$ cp /tmp/acceptance-sql.txt /tmp/acceptance.sql + + -Your database will now be built. It will take > 1 hour - no fooling. -You will see lots of errors scroll by (like: "ORA-01432: public synonym -to be dropped does not exist") Fear not, this is normal. + + Once you've got the acceptance test file all set, stay in + your term and type the following: + - + +oracle:~$ sqlplus system/manager + -Eventually, you'll be returned to your shell prompt. In the meantime, -relax, you've earned it. + + SQL*Plus should startup. If you get an ORA-01034: + Oracle not Available error, it is because your + Oracle instance is not running. You can manually start it as + the oracle user. - - - - - - - - - -Acceptance Test - - -For this step, open up a terminal and su to oracle as usual. You should be -running X and Netscape for this phase. - - -You need to download the "Oracle Acceptance Test" file. -It's available here and at http://photo.net/wtr/oracle/acceptance-sql.txt. -Save the file to /tmp - - - -In the oracle shell, copy the file. - - - - -$ cp /tmp/acceptance-sql.txt /tmp/acceptance.sql - - - - -Once you've got the acceptance test file all set, stay in your term -and type the following: - - - - -$ sqlplus system/manager - - - -SQL*Plus should startup. If you get an ORA-01034: Oracle not -Available error, it is because your Oracle instance is not running. -You can manually start it as the oracle user. - - - -$ svrmgrl + +oracle:~$ svrmgrl SVRMGR> connect internal SVRMGR> startup - - - + + -Now that you're into SQL*Plus, change the default passwords for -system, sys, and ctxsys to "alexisahunk" (or to something -you'll remember): - - + + Now that you're into SQL*Plus, change the default passwords + for system, sys, and ctxsys to "alexisahunk" (or to + something you'll remember): + + + SQL> alter user system identified by alexisahunk; SQL> alter user sys identified by alexisahunk; SQL> alter user ctxsys identified by alexisahunk; - - + + -Verify that your date settings are correct. - - + + Verify that your date settings are correct. + + + SQL> select sysdate from dual; - - - -If you don't see a date that fits the format YYYY-MM-DD, -please read . + + + If you don't see a date that fits the format + YYYY-MM-DD, please read . + - + + At this point we are going to hammer your database with an + intense acceptance test. This usually takes around 30 minutes. + -At this point we are going to hammer your database with an intense -acceptance test. This usually takes around 30 minutes. - - + SQL> @ /tmp/acceptance.sql ; A bunch of lines will scroll by. You'll know if the test worked if @@ -1206,118 +1243,138 @@ 2000-06-10 SQL> - - + -Many people encounter an error regarding maximum key -length: + + Many people encounter an error regarding maximum + key length: + - + ERROR at line 1: ORA-01450: maximum key length (758) exceeded - - + -This error occurs if your database block size is wrong and is usually -suffered by people trying to load the ACS into a pre-existing database. -Unfortunately, the only solution is to create a new database with a block -size of at least 4096. For instructions on how to do this, -see above. You can set the -parameter using the dbassist program or by setting the -DB_BLOCK_SIZE parameter in your database's creation -script. + + This error occurs if your database block size is wrong and is + usually suffered by people trying to load OpenACS into a + pre-existing database. Unfortunately, the only solution is to + create a new database with a block size of at least + 4096. For instructions on how to + do this, see above. You + can set the parameter using the + dbassist program or by setting + the DB_BLOCK_SIZE parameter in + your database's creation script. + -If there were no errors, then consider yourself fortunate. Your Oracle -installation is working. + + If there were no errors, then consider yourself fortunate. Your + Oracle installation is working. + + + + + + Automating Startup & Shutdown - - + + You will want to automate the database startup and shutdown process. + It's probably best to have Oracle spring to life when you boot up + your machine. + + + + Oracle includes a script called + dbstart that can be used to + automatically start the database. Unfortunately, the script + shipped in the Linux distribution does not work out of the + box. The fix is simple. Follow these directions to apply + it. First, save dbstart to + /tmp. Then, as + oracle, do the following: + - + +oracle:~$ cp /tmp/dbstart.txt /ora8/m01/app/oracle/product/8.1.7/bin/dbstart +oracle:~$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/dbstart + + - -Automating Startup & Shutdown + + While you're logged in as + oracle, you should configure the + oratab file to load your + database at start. Edit the file + /etc/oratab: + -You will want to automate the database startup and shutdown process. -It's probably best to have Oracle spring to life when you boot up your -machine. + + You will see this line. - -Oracle includes a script called dbstart that can be used -to automatically start the database. Unfortunately, the script shipped in the -Linux distribution does not work out of the box. The fix is simple. Follow -these directions to apply it. First, save dbstart -to /tmp. Then login, and su to oracle. + +ora8:/ora8/m01/app/oracle/product/8.1.7:N + - -$ cp /tmp/dbstart.txt /ora8/m01/app/oracle/product/8.1.6/bin/dbstart -$ chmod 755 /ora8/m01/app/oracle/product/8.1.6/bin/dbstart - - - + + By the way, if you changed the service name or have multiple + databases, the format of this file is: + -While you're logged in as oracle, you should -configure the oratab file to load your database at start. -Edit the file /etc/oratab: + + service_name:$ORACLE_HOME:Y || N + (for autoload) + + + + Change the last letter from "N" to + "Y". This tells Oracle that you want the database + to start when the machine boots. It should look like this. + + +ora8:/ora8/m01/app/oracle/product/8.1.7:Y + - -You will see this line. + - -ora8:/ora8/m01/app/oracle/product/8.1.6:N - + + Save the file & quit the terminal. + + + -By the way, if you changed the service name or have multiple databases, -the format of this file is + + You need a script to automate startup and shutdown. Save oracle8i.txt in + /tmp. Then login as + root and install the + script. (Debian users: substitute + /etc/init.d for + /etc/rc.d/init.d throughout + this section) + -service_name:$ORACLE_HOME:Y || N (for -autoload) - + +oracle:~$ su - +root:~# cp /tmp/oracle8i.txt /etc/rc.d/init.d/oracle8i +root:~# chown root.root /etc/rc.d/init.d/oracle8i +root:~# chmod 700 /etc/rc.d/init.d/oracle8i + + -Change the last letter from "N" to "Y". This tells -Oracle that you want the database to start when the machine boots. It should -look like this. - + + Test the script by typing the following commands and checking the + output. (Debian Users: as root, do mkdir + /var/lock/subsys first) + - -ora8:/ora8/m01/app/oracle/product/8.1.6:Y - - - - - - -Save the file & quit the terminal. - - - - - - -You need a script to automate startup and shutdown. Save oracle8i.txt in /tmp. Then login as -root and install the script. - - - -$ su - -# cp /tmp/oracle8i.txt /etc/rc.d/init.d/oracle8i -# chown root.root /etc/rc.d/init.d/oracle8i -# chmod 700 /etc/rc.d/init.d/oracle8i - - - - -Test the script by typing the following commands and checking the output. - - - -# /etc/rc.d/init.d/oracle8i stop +root:~# /etc/rc.d/init.d/oracle8i stop Oracle 8i auto start/stop Shutting Oracle8i: Oracle Server Manager Release 3.1.6.0.0 - Production @@ -1336,7 +1393,7 @@ Server Manager complete. Database "ora8" shut down. -# /etc/rc.d/init.d/oracle8i start +root:~# /etc/rc.d/init.d/oracle8i start Oracle 8i auto start/stop Starting Oracle8i: SQL*Plus: Release 8.1.6.0.0 - Production on Sat Jun 10 17:56:02 2000 @@ -1356,59 +1413,93 @@ SQL> Disconnected Database "ora8" warm started. - - - + + -If it worked, then run these commands to make the startup and shutdown -automatic. + + If it worked, then run these commands to make the startup and + shutdown automatic. + - -# cd /etc/rc.d/init.d/ -# chkconfig --add oracle8i -# chkconfig --list oracle8i + + Red Hat users: + +root:~# cd /etc/rc.d/init.d/ +root:~# chkconfig --add oracle8i +root:~# chkconfig --list oracle8i ; You should see: oracle8i 0:off 1:off 2:off 3:on 4:on 5:on 6:off - - - + + -You also need some scripts to automate startup and shutdown of the -Oracle8i listener. The listener is a name server that allows your Oracle -programs to talk to local and remote databases using a standard naming -convention. It is required for Intermedia Text and full site search. + Debian users: + +root:~# update-rc.d oracle8i defaults + Adding system startup for /etc/init.d/oracle8i ... + /etc/rc0.d/K20oracle8i -> ../init.d/oracle8i + /etc/rc1.d/K20oracle8i -> ../init.d/oracle8i + /etc/rc6.d/K20oracle8i -> ../init.d/oracle8i + /etc/rc2.d/S20oracle8i -> ../init.d/oracle8i + /etc/rc3.d/S20oracle8i -> ../init.d/oracle8i + /etc/rc4.d/S20oracle8i -> ../init.d/oracle8i + /etc/rc5.d/S20oracle8i -> ../init.d/oracle8i + + + -Download these three scripts into /tmp + - -startlsnr.txt + + You also need some scripts to automate startup and shutdown of + the Oracle8i listener. The listener is a name server that allows + your Oracle programs to talk to local and remote databases using + a standard naming convention. It is required for Intermedia Text + and full site search. + -stoplsnr.txt + + Download these three scripts into + /tmp + -listener8i.txt - + + + startlsnr.txt + -Now issue the following commands (still as root). + + stoplsnr.txt + - -# su - oracle -# cp /tmp/startlsnr.txt /ora8/m01/app/oracle/product/8.1.6/bin/startlsnr -$ cp /tmp/stoplsnr.txt /ora8/m01/app/oracle/product/8.1.6/bin/stoplsnr -$ chmod 700 /ora8/m01/app/oracle/product/8.1.6/bin/startlsnr -$ chmod 700 /ora8/m01/app/oracle/product/8.1.6/bin/stoplsnr -$ exit -; You should now be back as root. -# cp /tmp/listener8i.txt /etc/rc.d/init.d/listener8i -# cd /etc/rc.d/init.d -# chmod 700 listener8i - - + + listener8i.txt + + -Test the listener automation by running the following commands and -checking the output. + + Now issue the following commands (still as + root). + - -# ./listener8i stop + +root:~# su - oracle +oracle:~$ cp /tmp/startlsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr +oracle:~$ cp /tmp/stoplsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr +oracle:~$ chmod 700 /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr +oracle:~$ chmod 700 /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr +oracle:~$ exit +root:~# cp /tmp/listener8i.txt /etc/rc.d/init.d/listener8i +root:~# cd /etc/rc.d/init.d +root:/etc/rc.d/init.d# chmod 700 listener8i + + + + Test the listener automation by running the following commands + and checking the output. + + + +root:/etc/rc.d/init.d# ./listener8i stop Oracle 8i listener start/stop Shutting down Listener for 8i: LSNRCTL for Linux: Version 8.1.6.0.0 - Production on 10-JUN-2000 18:28:49 @@ -1426,11 +1517,11 @@ (c) Copyright 1998, 1999, Oracle Corporation. All rights reserved. -Starting /ora8/m01/app/oracle/product/8.1.6/bin/tnslsnr: please wait... +Starting /ora8/m01/app/oracle/product/8.1.7/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 8.1.6.0.0 - Production -System parameter file is /ora8/m01/app/oracle/product/8.1.6/network/admin/listener.ora -Log messages written to /ora8/m01/app/oracle/product/8.1.6/network/log/listener.log +System parameter file is /ora8/m01/app/oracle/product/8.1.7/network/admin/listener.ora +Log messages written to /ora8/m01/app/oracle/product/8.1.7/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))) @@ -1444,242 +1535,295 @@ Trace Level off Security OFF SNMP OFF -Listener Parameter File /ora8/m01/app/oracle/product/8.1.6/network/admin/listener.ora -Listener Log File /ora8/m01/app/oracle/product/8.1.6/network/log/listener.log +Listener Parameter File /ora8/m01/app/oracle/product/8.1.7/network/admin/listener.ora +Listener Log File /ora8/m01/app/oracle/product/8.1.7/network/log/listener.log Services Summary... PLSExtProc has 1 service handler(s) ora8 has 1 service handler(s) The command completed successfully - - + -This test will verify that the listener is operating normally. Login into -the database using the listener naming convention. + + This test will verify that the listener is operating + normally. Login into the database using the listener naming + convention. + -sqlplus username/password/@SID + + sqlplus + username/password/@SID + + +root:~# su - oracle +oracle:~$ sqlplus system/alexisahunk@ora8 - - -# su - oracle -$ sqlplus system/alexisahunk@ora8 - SQL> select sysdate from dual; SYSDATE ---------- 2000-06-10 SQL> exit -$ exit -# - - +oracle:~$ exit +root:~# + -Now run chkconfig on the listener8i script. - - -# cd /etc/rc.d/init.d/ -# chkconfig --add listener8i -# chkconfig --list listener8i + + RedHat users: + + Now run chkconfig on the + listener8i script. + + +root:~# cd /etc/rc.d/init.d/ +root:/etc/rc.d/init.d# chkconfig --add listener8i +root:/etc/rc.d/init.d# chkconfig --list listener8i listener8i 0:off 1:off 2:off 3:on 4:on 5:on 6:off - - + + + Debian users: + + Now run update-rc.d on the + listener8i script. + + +root:~# update-rc.d listener8i defaults 21 19 + Adding system startup for /etc/init.d/listener8i ... + /etc/rc0.d/K19listener8i -> ../init.d/listener8i + /etc/rc1.d/K19listener8i -> ../init.d/listener8i + /etc/rc6.d/K19listener8i -> ../init.d/listener8i + /etc/rc2.d/S21listener8i -> ../init.d/listener8i + /etc/rc3.d/S21listener8i -> ../init.d/listener8i + /etc/rc4.d/S21listener8i -> ../init.d/listener8i + /etc/rc5.d/S21listener8i -> ../init.d/listener8i + + + + + + + Test the automation + - + + As a final test, reboot your computer and make sure Oracle comes + up. You can do this by typing + -Test the automation + +root:~# /sbin/shutdown -r -t 0 now + -As a final test, reboot your computer and make sure Oracle comes up. You -can do this by typing + + Log back in and ensure that Oracle started automatically. + - -# /sbin/shutdown -r -t 0 now - - + +joeuser:~$ su - oracle +oracle:~$ sqlplus system/alexisahunk@ora8 - -Log back in and ensure that Oracle started automatically. - - - -$ su - oracle -$ sqlplus system/alexisahunk@ora8 - SQL> exit - - - + + + -Congratulations, your installation of Oracle 8.1.6 is complete. + + Congratulations, your installation of Oracle 8.1.7 is + complete. + + + + Troubleshooting Oracle Dates + + Oracle has an internal representation for storing the data based on + the number of seconds elapsed since some date. However, for the + purposes of inputing dates into Oracle and getting them back out, + Oracle needs to be told to use a specific date format. By default, it + uses an Oracle-specific format which isn't copacetic. You want + Oracle to use the ANSI-compliant date format which is of form + 'YYYY-MM-DD'. + - + + To fix this, you should include the following line in + $ORACLE_HOME/dbs/initSID.ora + or for the default case, + $ORACLE_HOME/dbs/initora8.ora + - -Troubleshooting Oracle Dates - - -Oracle has an internal representation for storing the data based on the -number of seconds elapsed since some date. However, for the purposes of -inputing dates into Oracle and getting them back out, Oracle needs to be told -to use a specific date format. By default, it uses an Oracle-specific format -which isn't copacetic. You want Oracle to use the ANSI-compliant date -format which is of form 'YYYY-MM-DD'. - -To fix this, you should include the following line in -$ORACLE_HOME/dbs/initSID.ora or for -the default case, -$ORACLE_HOME/dbs/initora8.ora - - + nls_date_format = "YYYY-MM-DD" - + - -You test whether this solved the problem by firing up -sqlplus and typing: - + + You test whether this solved the problem by firing up + sqlplus and typing: + - + SQL> select sysdate from dual; - + -You should see back a date like 2000-06-02. If some of the -date is chopped off, i.e. like 2000-06-0, everything is still -fine. The problem here is that sqlplus is simply truncating -the output. You can fix this by typing: + + You should see back a date like + 2000-06-02. If some of the date is + chopped off, i.e. like 2000-06-0, + everything is still fine. The problem here is that + sqlplus is simply truncating the + output. You can fix this by typing: + - + SQL> column sysdate format a15 SQL> select sysdate from dual; - + -If the date does not conform to this format, double-check that you -included the necessary line in the init scripts. If it still isn't -working, make sure that you have restarted the database since adding the line -if you didn't do it prior to database creation. + + If the date does not conform to this format, double-check that you + included the necessary line in the init scripts. If it still + isn't working, make sure that you have restarted the database + since adding the line if you didn't do it prior to database + creation. + -If you're sure that you have restarted the database since adding the -line, check your initialization scripts. Make sure that the following line is -not included: + + If you're sure that you have restarted the database since adding + the line, check your initialization scripts. Make sure that the + following line is not included: + - + export nls_lang = american - + -Setting this environment variable will override the date setting. Either -delete this line and login again or add the following entry to your login -scripts after the nls_lang line: + + Setting this environment variable will override the date + setting. Either delete this line and login again or add the following + entry to your login scripts after the + nls_lang line: + - + export nls_date_format = 'YYYY-MM-DD' - + -Log back in again. If adding the nls_date_format line -doesn't help, you can ask for advice in our -web/db forum. + + Log back in again. If adding the + nls_date_format line doesn't + help, you can ask for advice in our OpenACS forum. + + + + Useful Procedures - + + + Dropping a tablespace + - -Useful Procedures + + + Run sqlplus as the dba: + + +oracle:~$ sqlplus system/changeme + + - -Dropping a tablespace + + To drop a user and all of the tables and data owned by that + user: + - - - -Run sqlplus as the dba: - - -$ sqlplus system/changeme - - - -To drop a user and all of the tables and data owned by that user: - - + SQL> drop user oracle_user_name cascade; - - + + -To drop the tablespace: This will delete everything in the tablespace -overriding any referential integrity constraints. Run this command only if -you want to clean out your database entirely. - - + + To drop the tablespace: This will delete everything in the + tablespace overriding any referential integrity + constraints. Run this command only if you want to clean out + your database entirely. + + SQL> drop tablespace table_space_name including contents cascade constraints; - - - - - + + + + + -For more information on Oracle, please consult the documentation. + + For more information on Oracle, please consult the documentation. + + + + Defaults + We used the following defaults while installing Oracle. - - - -Defaults - - -We used the following defaults while installing Oracle. - - - - - -Variable -Value -Reason - + + + + + Variable + Value + Reason + + - -ORACLE_HOME -/ora8/m01/app/oracle/product/8.1.6 -This is the default Oracle installation directory. - + + + ORACLE_HOME + /ora8/m01/app/oracle/product/8.1.7 + This is the default Oracle installation directory. + + + + ORACLE_SERVICE + ora8 + The service name is a domain-qualified identifier for + your Oracle server. + + + + ORACLE_SID + ora8 + This is an identifier for your Oracle server. + + + + ORACLE_OWNER + oracle + The user who owns all of the oracle files. + - -ORACLE_SERVICE -ora8 -The service name is a domain-qualified identifier for your Oracle -server. - + + ORACLE_GROUP + dba + The special oracle group. Users in the dba group are + authorized to do a connect + internal within + svrmgrl to gain full system + access to the Oracle system. + + + + + - -ORACLE_SID -ora8 -This is an identifier for your Oracle server. - + ($Id$) - -ORACLE_OWNER -oracle -The user who owns all of the oracle files. - - - -ORACLE_GROUP -dba -The special oracle group. Users in the dba group are authorized to do a -connect internal within svrmgrl to gain full system -access to the Oracle system. - - - - -($Id$) - - Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/os.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/os.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/os.xml 1 Feb 2002 17:14:07 -0000 1.1 @@ -0,0 +1,231 @@ + + Install an Operating System + + + We won't provide detailed instructions to install an operating system + since there are so many valid choices available and each OS has their + own installation procedures. + + + + Other OpenACS Guides + + + Members of the OpenACS community use a variety of UNIX, Linux, BSD + and even (shudder!) Windows systems. The remainder of this guide will + be specific to Linux. Users of other OS's may find some helpful + information here, but we recommend that you instead use one of these + OS specific guides to install OpenACS 4. + + + + + FreeBSD guide + + + + Mac OS X guide + + + This guide is currently valid for Mac OS 10.04, but it's being + updated for OS 10.1 as we speak. In the meantime, eager 10.1 + users can see this bboard + thread for some help. + + + + + + + This was written for ACS and has not yet been updated for + OpenACS. + + + + + + + + Linux Information + + + I'm currently using Debian GNU/Linux, so this guide may show that + bias. Installation on any Linux distribution should be similar and + we'll try to point out differences where they exist. + + + + When you do install your system, be sure to set up enough swap space + - at least 400 MB for Oracle, less for PostgreSQL. A rule of thumb is + to set aside a swap partition which is twice your RAM size. + + + + Some things that you will need: + + + + + + + Requirement + Reason + + + + + + recent kernel Currently version 2.2.19 or + greater is the standard requirement. Some people are using 2.4.x + (2.4.16) kernels. + + + + bash + Bash is the standard Linux shell. + We assume you are using bash for these instructions. If you're + not using bash, then you will need to substitute your shell's + conventions for setting environment variables when appropriate. + + + + + glib 2.1 (or greater) + You need recent versions of + these libraries for Oracle to work properly. + + + + perl (and perl-suid) + + A few parts of the ACS require perl to work correctly. + (Debian users: apt-get install + perl-suid) + + + + GNU Make (3.76.1 or better) + + PostgreSQL and AOLServer require gmake to compile. Note that + on some linux distributions, GNU Make is simply named + make and there is no + gmake, whereas on BSD + distributions, make and + gmake are different. + + + + + Tcl 8.3 development package (headers, libraries) + + The site-wide-search service, OpenFTS, requires these to + compile. (Debian users: apt-get install + tcl8.3-dev) + + + + + libxml2 + + OpenACS 4 stores queries in XML files, so libxml2 is used to + parse these files. (Debian users: apt-get + install libxml2-dev) + + + + + + + + + + Locations: + + + + + We'll compile stuff in + /usr/local/src + + + + PostgreSQL will go into /usr/local/pgsql + + + AOLServer will go into /usr/local/aolserver + + + The web root will go into /web + + + + + Historically, OpenACS documentation has described using + /home/nsadmin as the home for + aolserver. Either location is fine as long as you are consistent. + + + + + + Linux Install Guides + + Here's a list of some helpful documentation for various OS's + + + + + Painless Debian + GNU/Linux by Stephen van Egmond + + + Official + Debian Guide + + RedHat + + Mandrake + + SuSE + + + + + + + Security Information + + Once you get your OS installed, it's imperative that you secure your + installation. As Jon Griffin repeatedly warns us, "No distribution is + secure out of the box." Again, this topic is too big to cover properly + here, so see these links. + + + + + Jon Griffin's notes + + + + Linux Administrators Security Guide + + + + Installation + of a Secure Webserver + + + + Others? + + + + + + ($Id: os.xml,v 1.1 2002/02/01 17:14:07 vinodk Exp $) + + Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/overview.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/overview.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/overview.xml 1 Feb 2002 17:14:07 -0000 1.1 @@ -0,0 +1,359 @@ + + Overview + + + What is OpenACS? + + According to Philip Greenspun: + + + + The ArsDigita Community System it is a toolkit of software + that will help you build Web services with a collaborative dimension, + ranging from knowledge management within companies to B2C ecommerce + to product support and community among the customers. The software is + free and open-source and has been tested in heavy use since + 1995. + + + + So that's what the ArsDigita Community System (ACS) is... what's + OpenACS? OpenACS was born when Don Baccus, Ben Adida, et al decided + to port ACS from Oracle to PostgreSQL, thus making it a fully + open-source solution. + + + + OpenACS 4 is the next generation of the web toolkit. It's based on + ACS 4, but no longer follows ArsDigita development. Unlike both ACS + (which required Oracle) and OpenACS 3.x (which required PostgreSQL), + OpenACS 4 allows you to use either database. It's also built in such + a way to allow enterprising hackers to extend it to other + databases. Don Baccus leads the development and numerous developers + (and non-developers) contribute from around the world. + + + + + + Purpose of this document + + This document will describe how to install OpenACS 4 from scratch, + using the source code. We will assume that you have an OS installed, + but we'll discuss this more in the next section. For most of this + guide, we will assume that you are using Linux on a PC, but we'll + also point you to excellent step-by-step guides for other operating + systems. + + + + + Requirements + + You will need a PC (or equivalent) with at least these minimum + requirements: + + + Pentium processor + 128 MB RAM + (much more if you want Oracle) + 4 GB hard drive + + + + If you want to serve pages to people outside of your machine, you'll + need a network connection of some type. + + + + Note that these are minimum requirements to get a development system + up and running. For a production system, we recommend you read about + the ArsDigita + Server Architecture + + + + Running a reliable database-backed web server requires experience + with the server's environment, in this case UNIX. UNIX is not always + an intuitive environment and this guide cannot hope to explain every + nuance. You should be comfortable with the following tasks before + attempting an installation: + + + + + Adding users, groups, setting passwords + + + + Starting an X server and running an X program remotely + + + + Basic file management using cp, rm, + mv, and cd + + + + Compiling a program using a Makefile + + + + + If you've never done these things before, consider exploring UNIX in + greater depth before installing OpenACS. Some useful resources for + doing this are described in the + section. + + + + All of the software that you will need is free and open-source, + except for Oracle. You can obtain a free copy of Oracle for + development purposes. This is described in the section. + + + + + + Steps involved + + The basic steps to getting OpenACS up and running are: + + + + Install an OS + + + Install a webserver (AOLServer) + + + Install a database (Oracle or + PostgreSQL) + + Install a database + driver (allows the webserver to talk to the database) + Configure the webserver and + database Start the OpenACS + installer + + + + + + What if I get stuck? + + + We'll do our best to assure that following our instructions will get + you to the promised land. If something goes wrong, don't + panic. There's plenty of ways to get help. Here are some tips: + + + + + + Make sure that you keep track of what commands you are running + and their output. I like to do my installations in a shell inside + of emacs (M-x shell) so that I can save the output if needed. + + + + + + We'll point out where the error logs for the various pieces of + software are. Output from those logs will help us help you. Don't + worry if you feel overwhelmed by all the information in the error + logs. Over time, you'll find that they make more and more + sense. Soon, you'll actually look forward to errors so that you + can run to the log and diagnose the problem. + + + + + + Search the bboards at + openacs.org - you'll often find many people who have + struggled through the same spot that you're in. + + + + + + Ask questions at the irc channel on openprojects.net + (#openacs). They're knowledgeable and quite friendly if you can + keep them on topic. + + + + + + Post a question on the bboards. Make sure + you've done a search first. When you do post, be sure to include + your setup information (OS, etc) as well as the exact commands + that are failing with the accompanying error. If you want to post + stuff from your logs (please do!), be sure to enclose them in + <PRE></PRE> tags so that they don't get all jumbled + together. + + + + + + If you find errors in this document or if you have ideas about + making it better, please post them in our bug tracker - the + SDM. + + + + + + + Is there an easier way? + + After reading through this tome, you may ask yourself if there is a + better way. And there is! Jonathan Marsden has done all the dirty + work to create RPMs for OpenACS4. These RPMs will install AOLServer, + all the AOLServer modules, PostgreSQL and OpenACS4 simply by typing + one magic command. They're currently at http://www.xc.org, + but will eventually also be available at http://openacs.org/software. They're + quite new and Jonathan invites (and is quite responsive to) + feedback. Leave comments at this thread. + + + + + Where did this document come from? + + This document was created by Vinod Kurup, but it's really + just plagiarism from a number of documents that came before it. If + I've used something that you've written without proper credit, let me + know and I'll fix it right away. + + + These are a few of my sources: + + + ArsDigita installation guide + + + + OpenACS 3.x installation guide + + + + Gilbert Wong's FreeBSD + installation guide + + + + My own Brief OpenACS4 + installation guide + + + + + Please also see the section for more acknowledgements. + + + + + Resources + + + Here are some resources that OpenACS users have found useful. + + + + Books + + + + + Philip + and Alex's Guide to Web Publishing - A very readable + guide to database-backed community websites. + + + + + + UNIX + Power Tools - An excellent introduction to the + command line tools and basic programs of UNIX + + + + + + UNIX + System Administration Handbook (formerly the "red book" + - now the "purple" book) + + + + + + UNIX + System Administrator's Bible - (LePage and Iarerra 1998; + IDG) + + + + + + Running + Linux + + Learning + Gnu Emacs + + + + Linux + in a Nutshell + + + + + + + + Web Sites + + + + + The UNIX + Reference Desk + + + + + + The Linux Documentation + Project + + + + + + + + + ($Id: overview.xml,v 1.1 2002/02/01 17:14:07 vinodk Exp $) + + Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml 1 Feb 2002 17:14:07 -0000 1.1 @@ -0,0 +1,407 @@ + + Install PostgreSQL 7.1.3 + + + Skip this page if you're not interested in PostgreSQL. + + + + Download the PostgreSQL source + + Download PostgreSQL 7.1.3 from the mirror closest to you. The list of + mirrors is at http://www.postgresql.org. Download + it to /tmp. + + + + As root, unpack it into + /usr/local/src + + + +joeuser:~$ su - +Password: *********** +root:~# cd /usr/local/src +root:/usr/local/src# tar xzf /tmp/postgresql-7.1.3.tar.gz + + + + + + Create the Postgres user + + Still as root, create a user and + group (if you haven't done so before) for PostgreSQL. This is the + account that PostgreSQL will run as since it will not run as + root. Also give the postgres user a + password: + + + +root:~# groupadd web +root:~# useradd -g web -d /usr/local/pgsql postgres +root:~# passwd postgres + +root:~# mkdir -p /usr/local/pgsql +root:~# chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.1.3 +root:~# exit +logout +joeuser:~$ su - postgres +Password: *********** + + + + + Set up postgres's environment variables + + Edit /usr/local/pgsql/.bash_profile + so it looks like this: + + + +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib +PATH=$PATH:/usr/local/pgsql/bin + +export PATH LD_LIBRARY_PATH + + + + Logout and login again as postgres. Use the + echo command to make sure that + /usr/local/pgsql/bin is now in your + PATH + + + +postgres:~$ exit +logout +joeuser:~$ su - postgres +Password: ************ +postgres:~$ echo $PATH +/usr/local/bin:/usr/bin:/bin: ... :/usr/local/pgsql/bin + + + + + Compile and install PostgreSQL + + First, we run ./configure to set the + compilation options automatically. This is the point at which you can + configure PostgreSQL in various ways. For example, if you want to + enable Unicode support, add the flags + --enable-locale and + --enable-multibyte. If you want to + see what the other possibilities are, run ./configure + --help. + + + +postgres:~$ cd /usr/local/src/postgresql-7.1.3 +postgres:/usr/local/src/postgresql-7.1.3$ ./configure +postgres:/usr/local/src/postgresql-7.1.3$ make all + + + + Compilation will take a while (about 10 minutes). Once it's done, you + will see the following message: + + + +All of PostgreSQL is successfully made. Ready to install. + + + + Next, we'll install PostgreSQL. If all is successful, you'll see the + following Thank You message. + + + +postgres:/usr/local/src/postgresql-7.1.3$ make install +... +Thank you for choosing PostgreSQL, the most advanced open source database engine. + + + + + Prepare Postgres for OpenFTS + + + OpenFTS is the module that provides full text search to OpenACS 4. We + won't be installing it until later, but we'll set up a couple things + that are best done right now. + + + +postgres:/usr/local/src/postgresql-7.1.3$ make install-all-headers +postgres:/usr/local/src/postgresql-7.1.3$ cd contrib/intarray +postgres:/usr/local/src/postgresql-7.1.3/contrib/intarray$ make +postgres:/usr/local/src/postgresql-7.1.3/contrib/intarray$ make install + + + + + Start PostgreSQL + + The initdb command initializes + the database. pg_ctl is used to + start up PostgreSQL. + + + +postgres:/usr/local/src/postgresql-7.1.3/contrib/intarray$ cd +postgres:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data +postgres:~$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start +postmaster successfully started + + + + Postgres errors will be logged in + /usr/local/pgsql/data/server.log + + + + + Set up plpgsql and allow nsadmin access + + We have to install plpgsql into our PostgreSQL installation so that + we can use stored procedures. Fortunately, it's pretty easy. We'll + also create a database user named + nsadmin, so that aolserver can + access the database. (Don't worry that you don't have a + nsadmin user yet - we'll create that + in the next chapter.) + + + +postgres:~$ createlang plpgsql template1 +postgres:~$ # Test if we succeeded +postgres:~$ createlang -l template1 + Procedural languages + Name | Trusted? | Compiler +---------+----------+---------- + plpgsql | t | PL/pgSQL +(1 row) +postgres:~$ createuser nsadmin +Shall the new user be allowed to create databases? (y/n) y +Shall the new user be allowed to create more new users? (y/n) y +CREATE USER + + + + + + Test Postgres + + Create a database and try some simple commands. The output should be + as shown. + + +postgres:~$ createdb mytestdb +CREATE DATABASE +postgres:~$ psql mytestdb +Welcome to psql, the PostgreSQL interactive terminal. + +Type: \copyright for distribution terms + \h for help with SQL commands + \? for help on internal slash commands + \g or terminate with semicolon to execute query + \q to quit + +mytestdb=# select current_timestamp; + timestamp +------------------------ + 2001-12-20 14:24:30-05 +(1 row) + +mytestdb=# create function test1() returns integer as 'begin return 1; end;' language 'plpgsql'; +CREATE +mytestdb=# select test1(); + test1 +------- + 1 +(1 row) + +mytestdb=# \q +postgres:~$ dropdb mytestdb +DROP DATABASE + + + + + + Getting PostgreSQL to start on boot + + Download postgresql.txt to + /tmp. Then follow the instructions + specific to your distribution: + + + + Debian: + + +postgres:~$ su - +Password: *********** +root:~# cp /tmp/postgresql.txt /etc/init.d/postgresql +root:~# chown root.root /etc/init.d/postgresql +root:~# chmod 700 /etc/init.d/postgresql + + + Test the script + + +root:~# /etc/init.d/postgresql stop +Stopping PostgreSQL: ok + + + + If PostgreSQL successfully stopped, then use the following + command to make sure that the script is run appropriately at boot + and shutdown. + + + +root:~# update-rc.d postgresql defaults + Adding system startup for /etc/init.d/postgresql ... + /etc/rc0.d/K20postgresql -> ../init.d/postgresql + /etc/rc1.d/K20postgresql -> ../init.d/postgresql + /etc/rc6.d/K20postgresql -> ../init.d/postgresql + /etc/rc2.d/S20postgresql -> ../init.d/postgresql + /etc/rc3.d/S20postgresql -> ../init.d/postgresql + /etc/rc4.d/S20postgresql -> ../init.d/postgresql + /etc/rc5.d/S20postgresql -> ../init.d/postgresql +root:~# /etc/init.d/postgresql start +Starting PostgreSQL: ok +root:~# exit +postgres:~$ exit + + + + Red Hat: + + +postgres:~$ su - +Password: *********** +root:~# cp /tmp/postgresql.txt /etc/rc.d/init.d/postgresql +root:~# chown root.root /etc/rc.d/init.d/postgresql +root:~# chmod 700 /etc/rc.d/init.d/postgresql + + + Test the script + + +root:~# /etc/rc.d/init.d/postgresql stop +Stopping PostgreSQL: ok + + + If PostgreSQL successfully stopped, then use the following + command to make sure that the script is run appropriately at boot + and shutdown. + + + +root:~# chkconfig --add postgresql +root:~# chkconfig --list postgresql +; You should see: +postgresql 0:off 1:off 2:off 3:on 4:on 5:on 6:off +root:~# /etc/rc.d/init.d/postgresql start +Starting PostgreSQL: ok +root:~# exit +postgres:~$ exit + + + + SuSE: + + +postgres:~$ su - +Password: *********** +root:~# cp /tmp/postgresql.txt /etc/rc.d/init.d/postgresql +root:~# chown root.root /etc/rc.d/init.d/postgresql +root:~# chmod 700 /etc/rc.d/init.d/postgresql + + + Test the script + + +root:~# /etc/rc.d/init.d/postgresql stop +Stopping PostgreSQL: ok + + + + If PostgreSQL successfully stopped, then use the following + command to make sure that the script is run appropriately at boot + and shutdown. + + + +root:~# cd /etc/rc.d/init.d +root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/postgresql K20postgresql +root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/postgresql S20postgresql +root:/etc/rc.d/init.d# cp K20postgresql rc2.d +root:/etc/rc.d/init.d# cp S20postgresql rc2.d +root:/etc/rc.d/init.d# cp K20postgresql rc3.d +root:/etc/rc.d/init.d# cp S20postgresql rc3.d +root:/etc/rc.d/init.d# cp K20postgresql rc4.d +root:/etc/rc.d/init.d# cp S20postgresql rc4.d +root:/etc/rc.d/init.d# cp K20postgresql rc5.d +root:/etc/rc.d/init.d# cp S20postgresql rc5.d +root:/etc/rc.d/init.d# rm K20postgresql +root:/etc/rc.d/init.d# rm S20postgresql + + + + Test configuration + + + +root:/etc/rc.d/init.d # cd +root:~ # /etc/rc.d/init.d/rc2.d/S20postgresql start +Starting PostgreSQL: ok +root:~ # exit + + + + + + From now on, PostgreSQL should start automatically each time you boot + up and it should shutdown gracefully each time you shut down. (Note: + Debian defaults to starting all services on runlevels 2-5. Red Hat + defaults to starting services on 3-5. So, on Red Hat, PostgreSQL won't + start on runlevel 2 unless you alter the above commands a + little. This usually isn't a problem as Red Hat defaults to runlevel 3) + + + + + Learn more about Postgresql + + Here are some links: + + + + + Official Postgres Docs + + + + Migrating from 7.0 to 7.1 + + + + techdocs.postgresql.org + + + + PostgreSQL + Performance Tuning + + + + + + ($Id: postgres.xml,v 1.1 2002/02/01 17:14:07 vinodk Exp $) + + Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/files/acs-pgbackup-init.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/files/Attic/acs-pgbackup-init.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/files/acs-pgbackup-init.txt 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,65 @@ +# Back up the database, scheduled to be run nightly. As written, it +# keeps a month's worth of daily backups, cycling over the same files +# which are suffixed with the day of the month on which the backup is +# created. +# Original version by Don Baccus (dhogaza@pacifier.com> +# Modified for openacs4 by Vinod Kurup +# 18 Jan 2002 +# This version: ftp only. + +proc acs_pgbackup {} { + # Set these to the appropriate values for your installation. + set pg_bin "/usr/local/pgsql/bin" + set bak "/usr/local/aolserver/backup" + set servername "birdnotes" + set ftp_user "my-ftp-username" + set ftp_password "my-ftp-password" + set ftp_dir "my-ftp-path" + set ftp_server "my.ftpserver.com" + + set day [clock format [clock seconds] -format %d] + set data "${servername}_${day}.dmp" + + ns_log Notice "Backup of [ad_system_name] starting." + ns_log Notice "pg_dump beginning..." + if [catch {append msg [exec "$pg_bin/pg_dump" $servername ">$bak/$data"]} errmsg] { + ns_log Error "pg_dump failed: $errmsg" + ns_sendmail [ad_system_owner] [ad_system_owner] "[ad_system_name] : pg_dump failed..." "$errmsg" + return + } + append msg "\n" + ns_log Notice "gzip of data beginning..." + if [catch {append msg [exec "gzip" "-f" "$bak/$data"]} errmsg] { + ns_log Error "gzip of data failed: $errmsg" + ns_sendmail [ad_system_owner] [ad_system_owner] "[ad_system_name] : gzip of data failed..." "$errmsg" + return + } + append msg "\n" + ns_log Notice "ftp data beginning..." + set fd [open "$bak/ftp_data.tmp" w] + + puts $fd "user $ftp_user ${ftp_password}\nbinary\nput $bak/$data.gz ${ftp_dir}/$data.gz\nquit\n" + close $fd + if [catch {append msg [exec "ftp" "-n" $ftp_server "<$bak/ftp_data.tmp"]} errmsg] { + ns_log Error "ftp data failed: $errmsg" + ns_sendmail [ad_system_owner] [ad_system_owner] "[ad_system_name] : ftp data failed..." "$errmsg" + return + } + append msg "\n" + + # Replicate the above code to make remote copies to other systems + ns_log Notice "vacuum beginning..." + if [catch {append msg [exec "$pg_bin/vacuumdb" "-q" "-z" "$servername"]} errmsg] { + ns_log Error "vacuum failed: $errmsg" + ns_sendmail [ad_system_owner] [ad_system_owner] "[ad_system_name] : vacuum failed..." "$errmsg" + } + ns_log Notice "Backup succeeded." + append msg "Backups succeeded" + ns_sendmail [ad_system_owner] [ad_system_owner] "[ad_system_name] : backup succeeded" "$msg" +} + +if { ! [nsv_exists acs_pgbackup scheduled_p] } { + ns_schedule_daily 0 0 acs_pgbackup + nsv_set acs_pgbackup scheduled_p 1 + ns_log Notice "Backup has been scheduled." +} Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/files/nsd-oracle.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/files/Attic/nsd-oracle.txt,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/files/nsd-oracle.txt 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/files/nsd-oracle.txt 1 Feb 2002 17:09:12 -0000 1.2 @@ -8,4 +8,4 @@ export ORACLE_TERM='vt100' export ORAENV_ASK=NO export NLS_DATE_FORMAT="YYYY-MM-DD" -exec /home/aol30/bin/nsd $* +exec /usr/local/aolserver/bin/nsd $* Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/files/nsd-postgres.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/files/Attic/nsd-postgres.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/files/nsd-postgres.txt 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,6 @@ +#!/bin/sh + +export PATH=$PATH:/usr/local/pgsql/bin +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib + +exec /usr/local/aolserver/bin/nsd $* Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/files/openacs-start.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/files/Attic/openacs-start.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/files/openacs-start.html 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,29 @@ + + +OpenACS Installation: Welcome + + +

OpenACS Installation: Welcome

+
+ + + +Thank you for installing the OpenACS Community System, +a suite of fully-integrated enterprise-class solutions +for collaborative commerce. +This is the OpenACS Installer which performs all the steps necessary +to get the OpenACS Community System running on your server.

+Please read the Release Notes before proceeding to better understand what is contained in this release. + +

Your database driver is correctly installed and configured. +

The next step is to install the OpenACS kernel data model. Click the Next +button to proceed. + +

+
+
gatekeepers@openacs.org
+ + + + + Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/files/openacs4.tcl.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/files/Attic/openacs4.tcl.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/files/openacs4.tcl.txt 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,315 @@ +ns_log notice "nsd.tcl: starting to read config file..." + +# which database do you want? postgres or oracle +set database postgres + +if {$database == "oracle"} { + set db_password "mysitepassword" +} + +set httpport 8000 +set httpsport 8443 + +# The hostname and address should be set to actual values. +set hostname [ns_info hostname] +set address [ns_info address] + +set server "birdnotes" +set db_name $server +set servername "Birdnotes.net Community" + +set serverroot "/web/${server}" + +# if debug is false, all debugging will be turned off +set debug true + +# you shouldn't need to adjust much below here +# for a standard install + +# +# AOLserver's home and binary directories. Autoconfigurable. +# +set homedir [file dirname [ns_info config]] +set bindir [file dirname [ns_info nsd]] + +# +# Where are your pages going to live ? +# +set pageroot ${serverroot}/www +set directoryfile index.tcl,index.adp,index.html,index.htm + +# +# nsssl: Only loads if keyfile.pem and certfile.pem exist. +# If you are using SSL, make sure you have these dirs and files (refer +# to the AOLserver docs) + +set sslkeyfile ${homedir}/servers/${server}/modules/nsssl/keyfile.pem +set sslcertfile ${homedir}/servers/${server}/modules/nsssl/certfile.pem + +# +# Global server parameters +# + +ns_section ns/parameters +ns_param serverlog ${homedir}/log/${server}-error.log +ns_param home $homedir +ns_param maxkeepalive 0 +ns_param logroll on +ns_param maxbackup 5 +ns_param debug $debug + +# +# Thread library (nsthread) parameters +# +ns_section ns/threads +ns_param mutexmeter true ;# measure lock contention +ns_param stacksize [expr 128*1024] + +# +# MIME types. +# +# Note: AOLserver already has an exhaustive list of MIME types, but in +# case something is missing you can add it here. +# + +ns_section ns/mimetypes +ns_param Default text/plain +ns_param NoExtension text/plain +ns_param .pcd image/x-photo-cd +ns_param .prc application/x-pilot +ns_param .xls application/vnd.ms-excel + +# +# Tcl Configuration +# +ns_section ns/server/${server}/tcl +ns_param library ${serverroot}/tcl +ns_param autoclose on +ns_param debug $debug + + +############################################################ +# +# Server-level configuration +# +# There is only one server in AOLserver, but this is helpful when multiple +# servers share the same configuration file. This file assumes that only +# one server is in use so it is set at the top in the "server" Tcl variable +# Other host-specific values are set up above as Tcl variables, too. +# +ns_section ns/servers +ns_param $server $servername + +# +# Server parameters +# +ns_section ns/server/${server} +ns_param directoryfile $directoryfile +ns_param pageroot $pageroot +ns_param maxconnections 5 +ns_param maxdropped 0 +ns_param maxthreads 5 +ns_param minthreads 5 +ns_param threadtimeout 120 +ns_param globalstats false ;# Enable built-in statistics +ns_param urlstats false ;# Enable URL statistics +ns_param maxurlstats 1000 ;# Max number of URL's to do stats on +#ns_param directoryadp $pageroot/dirlist.adp ;# Choose one or the other +#ns_param directoryproc _ns_dirlist ;# ...but not both! +#ns_param directorylisting fancy ;# Can be simple or fancy + +# +# ADP (AOLserver Dynamic Page) configuration +# +ns_section ns/server/${server}/adp +ns_param map /*.adp ;# Extensions to parse as ADP's +#ns_param map "/*.html" ;# Any extension can be mapped +ns_param enableexpire false ;# Set "Expires: now" on all ADP's +ns_param enabledebug $debug ;# Allow Tclpro debugging with "?debug" +ns_param defaultparser fancy + +ns_section ns/server/${server}/adp/parsers +ns_param fancy ".adp" + +# +# Socket driver module (HTTP) -- nssock +# +ns_section ns/server/${server}/module/nssock +ns_param timeout 120 +ns_param address $address +ns_param hostname $hostname +ns_param port $httpport + +# +# Socket driver module (HTTPS) -- nsssl +# +# nsssl does not load unless sslkeyfile/sslcertfile exist (above). +# +ns_section ns/server/${server}/module/nsssl +ns_param port $httpsport +ns_param hostname $hostname +ns_param address $address +ns_param keyfile $sslkeyfile +ns_param certfile $sslcertfile + +# +# Database drivers +# The database driver is specified here. PostgreSQL driver being loaded. +# Make sure you have the driver compiled and put it in {aolserverdir}/bin +# +ns_section "ns/db/drivers" +if { $database == "oracle" } { + ns_param ora8 ${bindir}/ora8.so +} else { + ns_param postgres ${bindir}/postgres.so ;# Load PostgreSQL driver +} + +# +# Database Pools: This is how AOLserver ``talks'' to the RDBMS. You need +# three for OpenACS: main, log, subquery. Make sure to replace ``yourdb'' +# and ``yourpassword'' with the actual values for your db name and the +# password for it. + +# AOLserver can have different pools connecting to different databases +# and even different different database servers. +# +ns_section ns/db/pools +ns_param main "Main Pool" +ns_param log "Log Pool" +ns_param subquery "Subquery Pool" + +ns_section ns/db/pool/main +ns_param maxidle 1000000000 +ns_param maxopen 1000000000 +ns_param connections 5 +ns_param verbose $debug +ns_param extendedtableinfo true +ns_param logsqlerrors $debug +if { $database == "oracle" } { + ns_param driver ora8 + ns_param datasource {} + ns_param user $db_name + ns_param password $db_password +} else { + ns_param driver postgres + ns_param datasource localhost::${db_name} + ns_param user nsadmin + ns_param password "" +} + +ns_section ns/db/pool/log +ns_param maxidle 1000000000 +ns_param maxopen 1000000000 +ns_param connections 5 +ns_param verbose $debug +ns_param extendedtableinfo true +ns_param logsqlerrors $debug +if { $database == "oracle" } { + ns_param driver ora8 + ns_param datasource {} + ns_param user $db_name + ns_param password $db_password +} else { + ns_param driver postgres + ns_param datasource localhost::${db_name} + ns_param user nsadmin + ns_param password "" +} + +ns_section ns/db/pool/subquery +ns_param maxidle 1000000000 +ns_param maxopen 1000000000 +ns_param connections 5 +ns_param verbose $debug +ns_param extendedtableinfo true +ns_param logsqlerrors $debug +if { $database == "oracle" } { + ns_param driver ora8 + ns_param datasource {} + ns_param user $db_name + ns_param password $db_password +} else { + ns_param driver postgres + ns_param datasource localhost::${db_name} + ns_param user nsadmin + ns_param password "" +} + +ns_section ns/server/${server}/db +ns_param pools "*" +ns_param defaultpool main + +ns_section ns/server/${server}/redirects +ns_param 404 "global/file-not-found.html" +ns_param 403 "global/forbidden.html" + +# +# Access log -- nslog +# +ns_section ns/server/${server}/module/nslog +ns_param file ${homedir}/log/${server}.log +ns_param enablehostnamelookup false +ns_param logcombined true +#ns_param logrefer false +#ns_param loguseragent false +ns_param maxbackup 5 +ns_param rollday * +ns_param rollfmt %Y-%m-%d-%H:%M +ns_param rollhour 0 +ns_param rollonsignal true +ns_param rolllog true + +# +# nsjava - aolserver module that embeds a java virtual machine. Needed to +# support webmail. See http://nsjava.sourceforge.net for further +# details. This may need to be updated for OpenACS4 webmail +# + +ns_section ns/server/${server}/module/nsjava +ns_param enablejava off ;# Set to on to enable nsjava. +ns_param verbosejvm off ;# Same as command line -debug. +ns_param loglevel Notice +ns_param destroyjvm off ;# Destroy jvm on shutdown. +ns_param disablejitcompiler off +ns_param classpath /usr/local/jdk/jdk118_v1/lib/classes.zip:${bindir}/nsjava.jar:${pageroot}/webmail/java/activation.jar:${pageroot}/webmail/java/mail.jar:${pageroot}/webmail/java + +# +# CGI interface -- nscgi, if you have legacy stuff. Tcl or ADP files inside +# AOLserver are vastly superior to CGIs. I haven't tested these params but they +# should be right. +# +#ns_section "ns/server/${server}/module/nscgi" +# ns_param map "GET /cgi-bin/ /web/$server/cgi-bin" +# ns_param map "POST /cgi-bin/ /web/$server/cgi-bin" +# ns_param Interps CGIinterps + +#ns_section "ns/interps/CGIinterps" +# ns_param .pl "/usr/bin/perl" + +# +# Modules to load +# +ns_section ns/server/${server}/modules +ns_param nssock ${bindir}/nssock.so +ns_param nslog ${bindir}/nslog.so +ns_param nssha1 ${bindir}/nssha1.so +ns_param nscache ${bindir}/nscache.so +ns_param nsrewrite ${bindir}/nsrewrite.so +ns_param nsxml ${bindir}/nsxml.so +#ns_param nsfts ${bindir}/nsfts.so +#ns_param nsperm ${bindir}/nsperm.so +#ns_param nscgi ${bindir}/nscgi.so +#ns_param nsjava ${bindir}/libnsjava.so + +# +## nsssl: loads only if requisite files already exist (see top of this +# file). +# +if { [file exists $sslcertfile] && [file exists $sslkeyfile] } { + ns_param nsssl ${bindir}/nsssle.so +} else { + ns_log warning "nsd.tcl: nsssl not loaded because key/cert files do not exist." +} + +ns_log notice "nsd.tcl: finished reading config file." + Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/files/postgresql.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/files/Attic/postgresql.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/files/postgresql.txt 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,92 @@ +#! /bin/sh + +# chkconfig: 2345 98 02 +# description: PostgreSQL RDBMS + +# This is an example of a start/stop script for SysV-style init, such +# as is used on Linux systems. You should edit some of the variables +# and maybe the 'echo' commands. +# +# Place this file at /etc/init.d/postgresql (or +# /etc/rc.d/init.d/postgresql) and make symlinks to +# /etc/rc.d/rc0.d/K02postgresql +# /etc/rc.d/rc1.d/K02postgresql +# /etc/rc.d/rc2.d/K02postgresql +# /etc/rc.d/rc3.d/S98postgresql +# /etc/rc.d/rc4.d/S98postgresql +# /etc/rc.d/rc5.d/S98postgresql +# Or, if you have chkconfig, simply: +# chkconfig --add postgresql +# +# Proper init scripts on Linux systems normally require setting lock +# and pid files under /var/run as well as reacting to network +# settings, so you should treat this with care. + +# Original author: Ryan Kirkpatrick + +# $Header: /cvsroot/pgsql/contrib/start-scripts/linux,v 1.3 2001/07/30 + +## EDIT FROM HERE + +# Installation prefix +prefix=/usr/local/pgsql + +# Data directory +PGDATA="/usr/local/pgsql/data" + +# Who to run pg_ctl as, should be "postgres". +PGUSER=postgres + +# Where to keep a log file +PGLOG="$PGDATA/server.log" + +## STOP EDITING HERE + +# Check for echo -n vs echo \c +if echo '\c' | grep -s c >/dev/null 2>&1 ; then + ECHO_N="echo -n" + ECHO_C="" +else + ECHO_N="echo" + ECHO_C='\c' +fi + +# The path that is to be used for the script +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +# What to use to start up the postmaster +DAEMON="$prefix/bin/pg_ctl" + +set -e + +# Only start if we can find pg_ctl. +test -f $DAEMON || exit 0 + +# Parse command line parameters. +case $1 in + start) + $ECHO_N "Starting PostgreSQL: "$ECHO_C + su - $PGUSER -c "$DAEMON start -D '$PGDATA' -s -l $PGLOG" + echo "ok" + ;; + stop) + echo -n "Stopping PostgreSQL: " + su - $PGUSER -c "$DAEMON stop -D '$PGDATA' -s -m fast" + echo "ok" + ;; + restart) + echo -n "Restarting PostgreSQL: " + su - $PGUSER -c "$DAEMON restart -D '$PGDATA' -s -m fast" + echo "ok" + ;; + status) + su - $PGUSER -c "$DAEMON status -D '$PGDATA'" + ;; + *) + # Print help + echo "Usage: $0 {start|stop|restart|status}" 1>&2 + exit 1 + ;; +esac + +exit 0 Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/files/restart-aolserver.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/files/Attic/restart-aolserver.txt,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/files/restart-aolserver.txt 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/files/restart-aolserver.txt 1 Feb 2002 17:09:12 -0000 1.2 @@ -1,5 +1,6 @@ #!/usr/bin/perl -## Restarts an AOLserver. Takes as its only argument the name of the server to kill. +## Restarts an AOLserver. +## Takes as its only argument the name of the server to kill. ## bquinn 6/16/2000 with help from {ryanlee, doug}@arsdigita ## This is a perl script because it needs to run setuid root, ## and perl has fewer security gotchas than most shells. @@ -18,7 +19,7 @@ my $server = shift; $server =~ /^([\w-]*)$/; my $service_name = $1; -my $PIDFILE = "/home/aol30/log/nspid.$service_name"; +my $PIDFILE = "/usr/local/aolserver/log/nspid.$service_name"; my $pid; $< = $>; # set realuid to effective uid (root) Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/files/svgroup.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/files/Attic/svgroup.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/files/svgroup.txt 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,19 @@ +#! /bin/sh +if test $# -lt 2 ; then + echo svgroup groupname directories ... >&2 + echo for example: >&2 + echo svgroup wheel /service/\* >&2 + exit 2 +fi +g="$1" ; shift +for i in $* ; do + chgrp $g $i/supervise/control + chmod g+w $i/supervise/control + chgrp $g $i/supervise/ok + chmod g+w $i/supervise/ok + # just in case + chgrp $g $i/supervise/status + chmod g+r $i/supervise/status + chgrp $g $i/supervise + chmod g+x $i/supervise +done Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/files/winnsd.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/files/Attic/winnsd.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/files/winnsd.txt 1 Feb 2002 17:12:18 -0000 1.1 @@ -0,0 +1,111 @@ +# nsd.tcl -- This is a sample AOLserver Startup Script +# +# By mburke@arsdigita.com, 2000-04-16 +# Based on a file created by Curtis Galloway +# +# This sample script will, with minor modifications, get you +# up and running ACS on a Windows box. +# +# winnsd.txt,v 3.3 2000/06/20 16:50:11 curtisg Exp +# + +set home [file dirname [ns_info config]] +set bin [file dirname [info nameofexecutable]] + +# Setting the following should get you going. +set server winacs +set httpport 80 +set oracleuser winacs +set oraclepassword winacs +set sroot servers/$server + + + +foreach d [list log servers $sroot $sroot/modules $sroot/pages] { + if ![file exists $home/$d] { + file mkdir $home/$d + } +} + +ns_section ns/threads +ns_param stacksize 500000 + +ns_section ns/db/drivers +ns_param ora8 ora8.dll + +ns_section ns/db/pool/main +ns_param driver ora8 +ns_param connections 2 +ns_param user $oracleuser +ns_param datasource "" +ns_param password $oraclepassword +ns_param verbose off + +ns_section ns/db/pool/subquery +ns_param driver ora8 +ns_param connections 2 +ns_param user $oracleuser +ns_param datasource "" +ns_param password $oraclepassword +ns_param verbose off + +ns_section ns/db/pool/log +ns_param driver ora8 +ns_param connections 2 +ns_param user $oracleuser +ns_param datasource "" +ns_param password $oraclepassword +ns_param verbose off + +ns_section ns/db/pools +ns_param main main +ns_param subquery subquery +ns_param log log + +ns_section ns/parameters +ns_param home $home +ns_param auxconfigdir /web/$server/parameters +#ns_param smtphost your.mail.server +#ns_param smtpuser username + +ns_section ns/servers +ns_param $server $server + +ns_section ns/server/$server +ns_param threadtimeout 5000000 +ns_param pageroot /web/$server/www +ns_param enabletclpages on +ns_param directoryfile index.tcl,index.adp,index.html,index.htm + +ns_section ns/server/$server/adp +ns_param map /*.adp +ns_param defaultparser fancy + +ns_section ns/server/$server/modules +foreach m [list nssock nslog nscp nscgi] { + ns_param $m $bin/$m.so +} + +ns_section ns/server/$server/adp +ns_param map /*.adp + +ns_section ns/server/$server/module/nssock +ns_param port $httpport + +ns_section ns/server/$server/module/nscgi +ns_param map "GET /*.bat" +ns_param map "GET /cgi $bin" + +ns_section ns/server/$server/module/nscp +ns_param port 9999 + +ns_section ns/server/$server/module/nscp/users +# password is "x" +ns_param user nsadmin:t2GqvvaiIUbF2: + +ns_section ns/server/$server/db +ns_param pools * +ns_param DefaultPool main + +ns_section ns/server/$server/tcl +ns_param library /web/$server/tcl