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.7 -r1.6.2.8 --- openacs-4/packages/acs-core-docs/www/openacs.html 19 Apr 2003 20:39:32 -0000 1.6.2.7 +++ openacs-4/packages/acs-core-docs/www/openacs.html 29 Apr 2003 05:58:34 -0000 1.6.2.8 @@ -1,9 +1,9 @@ -Install OpenACS 4.6.2

Install OpenACS 4.6.2

+Install OpenACS 4.6.3

Install OpenACS 4.6.3

by Vinod Kurup
- OpenACS docs are written by the named authors, but may be edited + OpenACS docs are written by the named authors, and 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
    @@ -31,7 +31,7 @@
           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 4.6.2-P and 4.6.2-O Reference Platform, + community.

    For the 4.6.3-P and 4.6.3-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 @@ -75,7 +75,7 @@ [service0@yourserver web]$ tar xzf /tmp/openacs-4.6.2.tgz [service0@yourserver web]$ mv openacs-4.6.2 service0 [service0@yourserver web]$ chmod -R 700 service0 -[service0@yourserver web]$ ls -al +[service0@yourserver web]$ ls -al total 3 drwxrwx--- 3 root web 1024 Mar 29 16:41 . drwxr-xr-x 25 root root 1024 Mar 29 16:24 .. @@ -89,8 +89,7 @@ tar xzf /tmp/openacs-4.6.2.tgz mv openacs-4.6.2 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
        @@ -293,7 +292,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)
        @@ -311,7 +310,7 @@
         	  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 +359,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 @@ -379,9 +378,13 @@ If you don't see the login page, view your error log (/web/service0/log/service0-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 with killall nsd. - + to make sure the service is starting without any + problems. The most common errors here are trying to start a + port 80 server while not root, failing to connect because of + a firewall, and aolserver failing to start due to + permissions errors or missing files. 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. A simpler method, using init, 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
      @@ -433,7 +436,7 @@
                 Mini-HOWTO.
       

Configure a Service with the OpenACS Installer

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

  • You should see a page from the webserver titled OpenACS Installation: @@ -489,7 +492,7 @@ 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.6.2 is now up and running! + 4.6.3 is now up and running!

  • OPTIONAL - Install Full Text Search.

    1. Click Package Manager on the right side of the default home page. If prompted, log in with the account and password you entered during install.

    2. Click on the Install packages link.

    3. On the next screen, after it loads, click on Uncheck all boxes, then click the second checkbox next to OpenFTS Driver 4.2. This will automatically check the first box. Then click Next.

    4. Click Install Packages

    5. Restart the service.

      [service0@yourserver service0]$ svc -t /service/service0
       [service0@yourserver service0]$
    6. Wait a minute, then browse back to the home page.

    7. Click on Site Map on the top right side of the screen.

    8. Mount the OpenFTS Full Text Search Engine in the site map.

      1. Click the new sub folder link on the "/" line, the first line under Main Site:/.

      2. Type openfts @@ -515,7 +518,7 @@ line, click Install.

    9. Restart the service.

      [service0@yourserver service0]$ svc -t /service/service0
      -[service0@yourserver service0]$
    10. 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.

  • PostGreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).

    [service0@yourserver service0]$ mkdir /web/service0/database-backup
    +[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.

  • PostGreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).

    [service0@yourserver service0]$ mkdir /web/service0/database-backup
     [service0@yourserver service0]$ pg_dump -f /web/service0/database-backup/initial_backup.dmp service0
     [service0@yourserver service0]$ ls -al /web/service0/database-backup
     total 1425
    @@ -525,7 +528,7 @@
     [service0@yourserver service0]$
     
    mkdir /web/service0/database-backup
     pg_dump -f /web/service0/database-backup/initial_backup.dmp service0
    -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, +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 +559,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

    • Test your backup and recovery procedure.

    • Follow the instruction on the home page to change the appearance of your service or add more packages.

    • Proceed to the tutorial to learn how to develop your own packages.

    ($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

    • Test your backup and recovery procedure.

    • Follow the instruction on the home page to change the appearance of your service or add more packages.

    • Proceed to the tutorial to learn how to develop your own packages.

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