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.6.2.5 -r1.6.2.6 --- openacs-4/packages/acs-core-docs/www/openacs.html 7 Apr 2003 16:59:25 -0000 1.6.2.5 +++ openacs-4/packages/acs-core-docs/www/openacs.html 15 Apr 2003 17:03:02 -0000 1.6.2.6 @@ -1,9 +1,9 @@ -Install OpenACS 4.6.2

Install OpenACS 4.6.2

+Install OpenACS 4.6.2

Install OpenACS 4.6.2

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

Set up the file system for an OpenACS Service

  1. The reference install stores all OpenACS services in +

Set up the file system for an OpenACS Service

  1. The reference install stores all OpenACS services in /web, with one subdirectory per service. The first time you install a service, you must create that directory and set its permissions:

    [root@yourserver root]# mkdir /web
    @@ -90,7 +90,7 @@
     mv openacs-4-6 service0
     chmod -R 700 service0/
     ls -al
    -exit
  2. Add the Service to CVS - OPTIONAL.�If this is a development server, you may want to add it to your local CVS repository.

    1. Create and set permissions on a subdirectory in the local cvs repository.

      [root@yourserver root]# mkdir /cvsroot/service0
      +exit
    2. Add the Service to CVS - OPTIONAL.�If this is a development server, you may want to add it to your local CVS repository.

      1. Create and set permissions on a subdirectory in the local cvs repository.

        [root@yourserver root]# mkdir /cvsroot/service0
         [root@yourserver root]# chown service0.web /cvsroot/service0
         [root@yourserver root]#
         
        mkdir /cvsroot/service0
        @@ -146,31 +146,31 @@
         [root@yourserver web]#
         
        su - service0
         mkdir /web/service0/etc /web/service0/log /web/service0/database-backup
        -exit

    Prepare Oracle for OpenACS

    OPTIONAL - if you won't be using Oracle, skip to Prepare PostgreSQL for OpenACS

    +exit

Prepare Oracle for OpenACS

OPTIONAL - if you won't be using Oracle, skip to Prepare PostgreSQL for OpenACS

You should be sure that your user account (e.g. service0) is in the dba group.

  1. Verify membership by typing groups when you login: -

    +		  

     service0:~$ groups
    -dba web
    +dba web

    If you do not see these groups, take the following action: -

    +		  

     service0:~$ su -      
     Password: ************
    -root:~# adduser service0 dba
    +root:~# adduser service0 dba

    If you get an error about an undefined group, then add that group manually: -

    +

     root:~# groupadd dba
    -root:~# groupadd web
    +root:~# groupadd web

    Make sure to logout as root when you are finished with this step and log back in as @@ -179,26 +179,26 @@ Connect to Oracle using svrmgrl and login: -

    +		  

     service0:~$ svrmgrl
     
     SVRMGR> connect internal
    -Connected.
    +Connected.

  2. Determine where the system tablespaces are stored: -

    -SVRMGR>  select file_name from dba_data_files;
    +

    +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
    +/ora8/m01/app/oracle/oradata/ora8/drsys01.dbf

  3. Using the above output, you should determine where to store your tablespace. As a general rule, you'll want to @@ -280,7 +280,7 @@ 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 the section called “Troubleshooting Oracle Dates” -

Prepare PostgreSQL for an OpenACS Service

  1. Create a user in the database matching the service name.

    [root@yourserver root]# su - postgres
    +		  

Prepare PostgreSQL for an OpenACS Service

  1. Create a user in the database matching the service name.

    [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
    @@ -293,7 +293,7 @@
     CREATE DATABASE
     [service0@yourserver service0]$
     
    su - service0
    -createdb service0
  2. 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 service0
  3. Add Full Text Search Support - OPTIONAL

    If you are installing Full Text Search, add required packages to the new database.

    [service0@yourserver service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
    +createdb service0
  4. 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 service0
  5. Add Full Text Search Support - OPTIONAL

    If you are installing Full Text Search, add required packages to the new database.

    [service0@yourserver service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
     BEGIN
     CREATE
     (many lines omitted)
    @@ -307,11 +307,11 @@
     /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.3/contrib/pgsql_contrib_openfts/openfts.sql
  6. [service0@yourserver service0]$ exit
     logout
     
    -[root@yourserver root]# 

Configure an AOLserver Service for OpenACS

  1. +[root@yourserver root]#

Configure an AOLserver Service for OpenACS

  1. 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. Copy it to the /web/service0/etc directory and open it in an editor to adjust the parameters.

    [root@yourserver root]# su - service0
    +	  need to configure a virtual server.  The Reference Platform uses a configuration file included in the OpenACS tarball.  Copy it to the /web/service0/etc directory and open it in an editor to adjust the parameters.

    [root@yourserver root]# su - service0
     [service0@yourserver service0]$ cd /web/service0/etc
     [service0@yourserver etc]# cp /web/service0/packages/acs-core-docs/www/files/config.tcl.txt config.tcl
     [service0@yourserver etc]# emacs config.tcl
    @@ -360,7 +360,7 @@
     S/Sd2MYA0JVmQuIt5bYowXR1KYKDka1d3DUgtoVTiFepIRUrMkZlCli08mWVjE6T
     (11 lines omitted)
     1MU24SHLgdTfDJprEdxZOnxajnbxL420xNVc5RRXlJA8Xxhx/HBKTw==
    ------END RSA PRIVATE KEY-----

Verify AOLserver startup

  1. +-----END RSA PRIVATE KEY-----

Verify AOLserver startup

  1. Kill any current running AOLserver processes and start a new one. (Note, if you are using Oracle, rather than PostgreSQL, replace nsd-postgres with @@ -382,7 +382,7 @@ to make sure the service is starting without any problems. If you need to make changes, don't forget to kill any running servers with killall nsd. -

  2. OPTIONAL - Automate AOLserver keepalive

    Assuming AOLserver started cleanly in the previous step, we'll set it up so that it's always running, and automatically restarts whenever it dies or is stopped. This step is strongly recommended, even for development sites, because it makes install and maintenance much simpler.

    The Reference Platform uses Daemontools to control AOLserver. An earlier method using init, less flexible and reliable, is here.

    1. Daemontools must already be installed. If not, install it.

    2. Each service controlled by daemontools must have a directory in /service. That directory must have a file called run. Daemontools then creates additional files and directories to track status and log. Create the appropriate directory as /web/service0/etc/daemontools, copy the prepared run file, and set permissions. If your server is not called service0, edit /web/service0/etc/run accordingly.

      [service0@yourserver log]$ cd /web/service0/etc
      +	

    3. OPTIONAL - Automate AOLserver keepalive

      Assuming AOLserver started cleanly in the previous step, we'll set it up so that it's always running, and automatically restarts whenever it dies or is stopped. This step is strongly recommended, even for development sites, because it makes install and maintenance much simpler.

      The Reference Platform uses Daemontools to control AOLserver. An earlier method using init, less flexible and reliable, is here.

      1. Daemontools must already be installed. If not, install it.

      2. Each service controlled by daemontools must have a directory in /service. That directory must have a file called run. Daemontools then creates additional files and directories to track status and log. Create the appropriate directory as /web/service0/etc/daemontools, copy the prepared run file, and set permissions. If your server is not called service0, edit /web/service0/etc/run accordingly.

        [service0@yourserver log]$ cd /web/service0/etc
         [service0@yourserver etc]$ mkdir daemontools
         [service0@yourserver etc]$ cp /web/service0/packages/acs-core-docs/www/files/run.txt daemontools/run
         [service0@yourserver etc]$ chmod 700 daemontools/run
        @@ -431,7 +431,7 @@
         
                 Most of this information comes from Tom Jackson's AOLServer+Daemontools
                   Mini-HOWTO.
        -

Configure a Service with the OpenACS Installer

+

Configure a Service with the OpenACS Installer

Now that you've got AOLserver up and running, let's install OpenACS 4.6.2.

  • @@ -515,7 +515,7 @@ line, click Install.

  • Restart the service.

    [service0@yourserver service0]$ svc -t /service/service0
    -[service0@yourserver service0]$
  • Test FTS. (INCOMPLETE). Add a package that supports search,like "note," add some content, and search for it.

  • Back up the New Service - OPTIONAL

    This is a very good time to back the service, even if it's not a production service. Making a backup now lets you roll back to this initial, clean setup at any point in the future, without repeating the install process. A full OpenACS service backup includes everything in the /web/service0/ directory. At this point it's probably sufficient to back up just the database, because you can recover the files from a tarball.

    Note that, if you did the CVS options in this document, the /web/service0/etc directory is not included in cvs and you may want to add it.

    Back up the New Service - OPTIONAL

    This is a very good time to back the service, even if it's not a production service. Making a backup now lets you roll back to this initial, clean setup at any point in the future, without repeating the install process. A full OpenACS service backup includes everything in the /web/service0/ directory. At this point it's probably sufficient to back up just the database, because you can recover the files from a tarball.

    Note that, if you did the CVS options in this document, the /web/service0/etc directory is not included in cvs and you may want to add it.

    Set up Automated Backup - OPTIONAL

    Backup can encompass all files in /web/service0. For a development server, putting the files in cvs is sufficient. (It's important then to back up the cvs repository!)

    A quick way to automate database backup is a cron job. This is not recommended for production and is not part of the Reference Platform, because it is not cross-platform and can fail silently. More thorough methods are documented in the section called “Backup Strategy”

    [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/pg_dump -f /web/service0/database-backup/service0_$(date +%Y-%m-%d).dmp service0

    If you plan to back up the whole /web/service0 directory, then it would be redundant to keep a history of database backups. In that case, set up the cron job to overwrite the previous backup each time:

    0 1 * * * /usr/local/pgsql/bin/pg_dump -f /web/service0/database-backup/service0_nightly.dmp service0

    Set up Log Analysis Reports - OPTIONAL

    Analog is a program with processes webserver access logs, +ls -al /web/service0/database-backup

  • Oracle - INCOMPLETE.�

  • Set up Automated Backup - OPTIONAL

    Backup can encompass all files in /web/service0. For a development server, putting the files in cvs is sufficient. (It's important then to back up the cvs repository!)

    A quick way to automate database backup is a cron job. This is not recommended for production and is not part of the Reference Platform, because it is not cross-platform and can fail silently. More thorough methods are documented in the section called “Backup Strategy”

    [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/pg_dump -f /web/service0/database-backup/service0_$(date +%Y-%m-%d).dmp service0

    If you plan to back up the whole /web/service0 directory, then it would be redundant to keep a history of database backups. In that case, set up the cron job to overwrite the previous backup each time:

    0 1 * * * /usr/local/pgsql/bin/pg_dump -f /web/service0/database-backup/service0_nightly.dmp service0

    Set up Log Analysis Reports - OPTIONAL

    Analog is a program with processes webserver access logs, performs DNS lookup, and outputs HTML reports. Analog should already be installed. A modified configuration file is included in @@ -556,4 +556,4 @@ [root@yourserver root]# emacs /etc/cron.daily/analog

    Put this into the file:

    #!/bin/sh
     
    -/usr/share/analog-5.31/analog -G -g/web/service0/etc/analog.cfg
    [root@yourserver root]# chmod 755 /etc/cron.daily/analog

    Test it by running the script.

    [root@yourserver root]# sh /etc/cron.daily/analog

    Browse to http://yourserver.test/log/traffic.html

    Next Steps

    ($Id$)
    View comments on this page at openacs.org
    +/usr/share/analog-5.31/analog -G -g/web/service0/etc/analog.cfg
    [root@yourserver root]# chmod 755 /etc/cron.daily/analog

    Test it by running the script.

    [root@yourserver root]# sh /etc/cron.daily/analog

    Browse to http://yourserver.test/log/traffic.html

    Next Steps

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