Sun Update Connection - Automated Baseline Management Service 1.0 User's Guide

ProcedureHow to Install and Configure the CGI Script

The Common Gateway Interface (CGI) script is used to transfer the Explorer and PatchPro output from the TLP client to the TLP server, by using the HTTP protocol. The TLP client contacts the web server that is running on the TLP server. The client then transfers the data by using a simple file upload over HTTP. The script writes the uploaded file to a directory that is read by the TLP server software. This procedure describes how to install and configure the CGI script.

Before You Begin

To complete this procedure, make sure you have the following:


Note –

This steps in this procedure use a configuration for the Apache Web Server. If you are using a different web server, adjust these steps accordingly.


Steps
  1. Install the CGI script.

    After you install the TLP software, a cgi subdirectory is placed in the installation BaseDirectory. By default, the tlp_server.pl script is located in the /opt/SUNWtlp/cgi directory.

    You can install the script in one of the following ways:

    • Add a ScriptAlias to the httpd.conf file.

      This method is the preferred method.

      1. Locate the httpd.conf file. Use a text editor to add the following line:


        ScriptAlias /tlp-cgi/ /opt/SUNWtlp/cgi/

        where /opt/SUNWtlp/cgi/ is the default installation directory. If you did not install the TLP software in this directory, replace this information with the appropriate installation directory. Adding this line to the file maps all HTTP requests that are directed to http://server/tlp-cgi/ to the /opt/SUNWtlp/cgi/ directory.

      2. To ensure that the modifications are correct, run a configtest before restarting the web server.

      3. After you edit the httpd.conf file, restart the web server.

    • Copy the tlp_server.pl script and the tlp_server.cfg file to the cgi-bin directory.


      Caution – Caution –

      If you use this method, there is a risk that during a TLP update, the tlp_server.pl script might not be updated in another directory.


      If you are unable to modify the httpd.conf file, copy the tlp_server.pl script and the tlp_server.cfg file to a directory that contains a set of the ExecCGI configuration directives. By default, this is usually the cgi-bin directory. Lastly, copy the tlp_server.pl script and the tlp_server.cfg file to a directory where you can run CGI applications.

  2. Modify the tlp_server.cfg file.

    For more information, see Example 2–3.


Example 2–3 Modifying the tlp_server.cfg file.

All configuration data is stored in the tlp_server.cfg file. The CGI script writes all files that are received from the clients to the TargetDirectory directory. Make sure that your web server has the sufficient write permissions for this directory. In addition, make sure that the TLP tool has sufficient read and write permissions to and from this directory. This example shows the portion of the tlp_server.cfg file where this variable is defined.


tlp_server.cfg
# TargetDirectory is the directory where the TLP
# server will store all files received by the clients

TargetDirectory = /opt/SUNWtlp/data/explorer