Index: openacs-4/packages/acs-core-docs/www/openacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs.html,v diff -u -r1.16 -r1.17 --- openacs-4/packages/acs-core-docs/www/openacs.html 31 Oct 2003 15:57:34 -0000 1.16 +++ openacs-4/packages/acs-core-docs/www/openacs.html 5 Nov 2003 11:48:10 -0000 1.17 @@ -1,20 +1,19 @@
For Linux Standard Base compliance and ease of backup, + all of the files in each OpenACS site are stored in a + subdirectory of + /var/lib/aolserver, one + subdirectory per site. The first time you install an OpenACS + site on a server, you must create the parent directory and set its permissions:
[root@yourserver root]# mkdir /var/lib/aolserver
[root@yourserver root]# chgrp web /var/lib/aolserver
[root@yourserver root]# chmod 770 /var/lib/aolserver
[root@yourserver root]#
mkdir /var/lib/aolserver
chgrp web /var/lib/aolserver
-chmod 770 /var/lib/aolserver
You should already have downloaded the OpenACS tarball - to the /tmp directory. If - not, download the OpenACS - tarball and save it in - /tmp and proceed:
+chmod 770 /var/lib/aolserver
AOLserver needs to be started as the root user if you want to use port 80. Once it starts, though, it will drop the root privileges and run as another user, which you must specify on the command line. It's @@ -29,46 +28,43 @@ of your site is one word, that would be a good choice. For example "service0" might be the service name for the service0.net - community.
For the 5.0.0a4-P and 5.0.0a4-O Reference Platform, - we'll use a server named service0 and - a user named service0. We'll leave the password - blank for increased security. The only way to log in will be - with ssh certificates. The only people who should log in are + community.
We'll leave the password blank, which prevents login by + password, for increased security. The only way to log in will + be with ssh certificates. The only people who should log in are developers for that specific instance. Add this user, and put - it in the web group so that it - can use database commands associated with that group. -
[root@yourserver root]# useradd -g web service0 -d /home/service0 -[root@yourserver root]#
Set up database environment variables. They are - necessary for working with the database. -
[root@yourserver root]# su - service0
-[service0@yourserver service0]$ emacs .bashrc
Put in the appropriate lines for the database you are running. If you will use both databases, put in both sets of lines.
PostGreSQL:
export LD_LIBRARY_PATH=LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib -export PATH=$PATH:/usr/local/pgsql/bin
Oracle. 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. -
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
Test this by logging out and back in as - service0 and checking the paths.
[service0@yourserver service0]$ exit
-logout
-[root@yourserver src]# su - service0
-[postgres@yourserver pgsql]$ env | grep PATH
-
For PostGreSQL, you should see:
-LD_LIBRARY_PATH=LD_LIBRARY_PATH=:/usr/local/pgsql/lib -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/usr/local/pgsql/bin:/usr/local/pgsql/bin
For Oracle:
ORACLE_BASE=/ora8/m01/app/oracle -ORACLE_HOME=/ora8/m01/app/oracle/product/8.1.7 -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/ora8/m01/app/oracle/product/8.1.7/bin -LD_LIBRARY_PATH=/ora8/m01/app/oracle/product/8.1.7/lib:/lib:/usr/lib -ORACLE_SID=ora8 -ORACLE_TERM=vt100 -ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
[service0@yourserver service0]$ exit -logout - -[root@yourserver root]#
Unpack the OpenACS tarball and rename it to service0. Secure the directory so that only the owner can access it. Check the permissions by listing the directory.
[root@yourserver root]# su - service0 + it in the service0 group so that it + can use database and server commands associated with that group. +[root@yourserver root]# groupadd web +[root@yourserver root]# useradd -g service0 -G web service0 -d /home/service0 +[root@yourserver root]#
Starting with OpenACS 5.0, an experimental script is + available to automate all of the steps for the rest of this section. Requires tclwebtest. If you are not feeling lucky, skip to Section�, “Install from tarball”.
Get the install script from CVS:
[root@yourserver root]# su - service0
+[service0@yourserver service0]$ cvs -d :pserver:anonymous@openacs.org:/cvsroot co -d install openacs-4/etc/install
+cvs server: Updating install
+U install/README
+U install/TODO
+ ... many lines omitted ...
+U install/tcl/twt-procs.tcl
+U install/tcl/user-procs.tcl
+[service0@yourserver service0]$ cd install
+
Edit + /home/service0/install/install.tclinstall.tcl + file and change the values as documented in the file.
Run the file as root.
[service0@yourserver service0]$ exit
+[root@yourserver root]# ./home/service0/install/install.sh
+/home/service0/install/install.sh: Starting installation with config_file
+/home/service0/install/install.tcl. Using serverroot=/var/lib/aolserver/
+service0, server_url=http://0.0.0.0:8000, do_checkout=yes, do_install=yes,
+dotlrn=no, and database=postgres., use_daemontools=true
+ ... many lines omitted ...
+./install.sh: Finished (re)installing /var/lib/aolserver/service0 at Wed Nov
+5 13:27:17 CET 2003. Access the new site at http://127.0.0.1:8000 with admin
+username admin@yourserver.test and password 1
+[root@yourserver root]#
+exit
+./home/service0/install/install.sh
You can proceed to Section�, “Next Steps”.
You should already have downloaded the OpenACS tarball + to the /tmp directory. If + not, download the OpenACS + tarball and save it in + /tmp and proceed:
Unpack the OpenACS tarball and rename it to service0. Secure the directory so that only the owner can access it. Check the permissions by listing the directory.
[root@yourserver root]# su - service0 [service0@yourserver service0]$ cd /var/lib/aolserver [service0@yourserver aolserver]$ tar xzf /tmp/openacs-5.0.0a4.tgz [service0@yourserver aolserver]$ mv openacs-5.0.0a4 service0 @@ -87,21 +83,11 @@ tar xzf /tmp/openacs-5.0.0a4.tgz mv openacs-5.0.0a4 service0 chmod -R 700 service0/ -exit
Add the Service to CVS (OPTIONAL)
(This step should be obsoleted by the 5.0.0 tarball, as - these directories will be included in the tarball)Set up several additional directories in the service root: - etc is for configuration and control files, log is for error and request (web page hit) log files, and database-backup is for database backup files. If you did the CVS step, note that these new directories are excluded from that step so that you can decide whether or not you want your logs and config files in source control.
[root@yourserver root]# su - service0
-[service0@yourserver service0]$ mkdir /var/lib/aolserver/service0/etc /var/lib/aolserver/service0/log /var/lib/aolserver/service0/database-backup
-[service0@yourserver aolserver]$ exit
-logout
-
-[root@yourserver aolserver]#
-su - service0
-mkdir /var/lib/aolserver/service0/etc /var/lib/aolserver/service0/log /var/lib/aolserver/service0/database-backup
-exit
If you won't be using Oracle, skip to Section�, “Prepare PostgreSQL for an OpenACS Service”
+exit
Add the Service to CVS (OPTIONAL)
Prepare the database
Prepare Oracle for OpenACS.�If you won't be using Oracle, skip to Prepare PostgreSQL for an OpenACS Service
You should be sure that your user account (e.g. service0) is in the dba group. -
+
Verify membership by typing groups when you login: @@ -231,7 +217,10 @@ 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 Section�, “Troubleshooting Oracle Dates” -
Prepare PostgreSQL for an OpenACS Service.�
Create a user in the database matching the service + name. With default PostGreSQL authentication the name of + the user of the process will be matched to this account + automatically.
[root@yourserver root]# su - postgres
[postgres@yourserver pgsql]$ createuser service0
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
@@ -244,17 +233,17 @@
CREATE DATABASE
[service0@yourserver service0]$
su - service0
-createdb -E UNICODE service0
Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user.
[service0@yourserver service0]$ export EDITOR=emacs;crontab -e
Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.
0 1 * * * /usr/local/pgsql/bin/vacuumdb --analyze service0
Add Full Text Search Support (OPTIONAL)
[service0@yourserver service0]$ exit
+createdb -E UNICODE service0
Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user.
[service0@yourserver service0]$ export EDITOR=emacs;crontab -e
Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.
0 1 * * * /usr/local/pgsql/bin/vacuumdb --analyze service0
Add Full Text Search Support (OPTIONAL)
[service0@yourserver service0]$ exit logout -[root@yourserver root]#
Configure an AOLserver Service for OpenACS.�
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 OpenACS to work, you need to configure a virtual server. The Reference Platform uses a configuration file included in the OpenACS tarball, /var/lib/aolserver/service0/etc/config.tcl. - Open it in an editor to adjust the parameters.
[root@yourserver root]# su - service0 + Open it in an editor to adjust the parameters.[root@yourserver root]# su - service0 [service0@yourserver service0]$ cd /var/lib/aolserver/service0/etc [service0@yourserver etc]# emacs config.tcl@@ -279,7 +268,7 @@ started, but for more options, read the AOLServer docs.
Enable OpenFTS Full Text Search (OPTIONAL)
Install nsopenssl - for SSL support. (OPTIONAL)
Verify AOLserver startup.�
Kill any current running AOLserver processes and start a new one. If you are using Oracle, rather than PostgreSQL, replace nsd-postgres with @@ -317,7 +306,8 @@ changes, don't forget to kill any running servers with killall nsd.
Automate - AOLserver keepalive (OPTIONAL)
Configure a Service with the OpenACS + Installer.� Now that you've got AOLserver up and running, let's install OpenACS 5.0.0a4.
@@ -376,10 +366,43 @@ reload the final page above. You should see the front page, with an area to login near the upper right. Congratulations, OpenACS 5.0.0a4 is now up and running! -
Install Full Text Search (OPTIONAL). If you have installed OpenFTS and enabled +
Install Full Text Search (OPTIONAL). If you have installed OpenFTS and enabled OpenFTS, you can now install the OpenFTS Driver package and - Full Text Search Engine package in the OpenACS service.
This is a good time to make a backup of your service. If this is a + Full Text Search Engine package in the OpenACS service.
This is a good time to make a backup of your service. If this is a production site, you should set up automatic nightly backups.
If you want traffic reports, set up analog or another log processing program.
Follow the instruction on the home page to change the appearance of your service or add more - packages. (more information)
Proceed to the tutorial to learn how to develop your own packages.
Test your backup and recovery procedure.
Proceed to the tutorial to learn how to develop your own packages.
Set up database environment variables for the site + user. These settings are necessary for working with the + database while logged in as the service user. They do not + directly affect the service's run-time connection with the + database, because those environmental variables are set by the + wrapper scripts nsd-postgres and nsd-oracle.
[root@yourserver root]# su - service0
+[service0@yourserver service0]$ emacs .bashrc
Put in the appropriate lines for the database you are running. If you will use both databases, put in both sets of lines.
PostGreSQL:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib +export PATH=$PATH:/usr/local/pgsql/bin
Oracle. 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. +
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
Test this by logging out and back in as + service0 and checking the paths.
[service0@yourserver service0]$ exit
+logout
+[root@yourserver src]# su - service0
+[postgres@yourserver pgsql]$ env | grep PATH
+
For PostGreSQL, you should see:
+LD_LIBRARY_PATH=LD_LIBRARY_PATH=:/usr/local/pgsql/lib +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/usr/local/pgsql/bin:/usr/local/pgsql/bin
For Oracle:
ORACLE_BASE=/ora8/m01/app/oracle +ORACLE_HOME=/ora8/m01/app/oracle/product/8.1.7 +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/ora8/m01/app/oracle/product/8.1.7/bin +LD_LIBRARY_PATH=/ora8/m01/app/oracle/product/8.1.7/lib:/lib:/usr/lib +ORACLE_SID=ora8 +ORACLE_TERM=vt100 +ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
[service0@yourserver service0]$ exit +logout + +[root@yourserver root]#
Test your backup and recovery procedure.