|  | Back to Menu |
Configuring Autorun for Optimize Message Indexes
  This section describes how to run "Optimize Message Indexes" function of Denbun automatically. * The optimization takes some time according to the amount of message data. * Users cannot use Denbun when you perform "Optimize Message Indexes" for the users. * The following explanation is assuming that the installation folder directory is "/var/www/cgi-bin/dnpwml". 1. Create a Script Shell File Which Runs "Optimize Message Indexes" Create a script shell file (dnpvacuum.sh) which runs "Optimize Message Indexes" (Denbun installation directory/dnpvacuum). In the shell script file, describe the following command with the parameters. Parameters: -h [The full path name of Denbun installation directory] -l -a (<- Option to perform the optimization for all the users) -u [User ID] (<- Option to perform the optimization for a user) * Please specify either -a or -u [User ID] (not both). * The optimization takes some time according to the amount of message data.Please consider it if you perform it for all the users. * Example of Command 1: Perform the optimization for all the users
  /var/www/cgi-bin/dnpwml/dnpvacuum -h /var/www/cgi-bin/dnpwml -l -a
  * Example of Command 2: Perform the optimization for a user who has "2" as User ID.
  /var/www/cgi-bin/dnpwml/dnpvacuum -h /var/www/cgi-bin/dnpwml -l -u 2
  Use an editor such as vi to create a file and name it "dnpvacuum.sh", and save it to the installation directory of Denbun.
  [root@xxxxxx ~]# vi /var/www/cgi-bin/dnpwml/dnpvacuum.sh
  * Example of dnpvacuum.sh
  #!/bin/sh export LD_LIBRARY_PATH=/var/www/cgi-bin/dnpwml/lib /var/www/cgi-bin/dnpwml/dnpvacuum -h /var/www/cgi-bin/dnpwml -l -u 2
  Replace the Denbun installation path Denbun according to your environment. Specify the parameter for the command for the optimization program. Set permission to the file dnpvacuum.sh.
  [root@xxxxxx ~]# chmod 755 /var/www/cgi-bin/dnpwml/dnpvacuum.sh
  2. Setup cron Use cron to run the program regularly. Set an editor for edit.This step requires the super user (root).
  $ su - Password: # export EDITOR vi
  Edit crontab and schedule. To open cronrab, use the following command.
  # crontab -u apache -e
  In "apache", you should specify the user who provides HTTP service. * Example of crontab
  0 2 1 * * /var/www/cgi-bin/dnpwml/dnpvacuum.sh
* In the above example, "dnpvacuum.sh" in /var/www/cgi-bin/dnpwml runs at 2:00AM every first day of month. * Please refer the OS documentation for Cron command.
| Copyright (C) NEOJAPAN Inc. All Rights Reserved.