Configuring Your Installation

After installation, you may need to configure Linux to work with ColdFusion Server. This section addresses the following topics:

Configuring Web servers manually

If you did not instruct ColdFusion Server to configure your Web server automatically during the ColdFusion Server installation, you must manually configure your Web server. This section explains how to configure Web servers manually in Linux. The following Web servers are described in this section:

Netscape/iPlanet Web Server

The ColdFusion Server NSAPI plug-in has been tested with Netscape/iPlanet Enterprise Web Server 4.1 and the Netscape FastTrack Web Server 4.1. The installation script prompts you to configure either of these servers automatically.

The Netscape/iPlanet plug-in

Netscape/iPlanet plug-ins for ColdFusion Server are installed in the <installdir>/coldfusion/webserver/nsapi directory.

The following procedure assumes that you installed the Netscape/iPlanet server in

/usr/netscape/server4 on the system named smurf.

To configure the Netscape/iPlanet plug-in:

  1. Copy the plug-in to a directory named coldfusion in your server directories.
    mkdir /usr/netscape/server4/plugins/coldfusion
    
    cp /opt/coldfusion/webserver/nsapi/coldfusion35.so \
    
      /usr/netscape/server4/plugins/coldfusion/coldfusion.so
    
    
  2. Edit the /usr/netscape/server4/https-smurf/config/mime.types file to add a new ColdFusion Server type. Add the line:
    type=magnus-internal/cold-fusion exts=exts=cfm,dbm,cfml,dbml
    
    
  3. Edit the /usr/netscape/server4/https-surf/config/obj.conf file to add new service and init directives. Add all of the following on one line:
    Init fn="load-modules" shlib="/usr/netscape/server4/
    
    plugins/coldfusion/coldfusion.so" funcs="DoCFRequest"
    
    
  4. Add the following line in the default Object:
    Service fn="DoCFRequest" method="(GET|POST)" 
    
    type="magnus-internal/cold-fusion"
    
    
  5. Stop and restart the Web server.

    Note

    If you run the Netscape/iPlanet Server Manager, the browser-based administrator of the Web server, you may receive a warning about edits to the Netscape configuration files. This is normal. To reload the new configuration files, follow the instructions and click Apply.


    If your server does not restart, check that the pathname for the plug-in you specified in the obj.conf file is correct for your installation and that it is on a single line.

Apache Web server

ColdFusion Server has been tested with Apache version 1.3.6. To download Apache, go to the Apache Web site at http://www.apache.org.

ColdFusion Server includes a precompiled binary module for Apache, mod_coldfusion_so, that has been tested with Apache 1.3.6 through 1.3.19. This module works with most versions of Apache. However, if you need to compile your own version of Apache, see the Apache Readme file at /opt/coldfusion/webserver/apache/readme.

Different procedures are required to configure Red Hat and Apache and SuSE/Cobalt with Apache. Follow the procedure according to your Linux distribution:

To configure Red Hat and Apache:

  1. Shut down Apache with the following command:
    /etc/rc.d/init.d/httpd stop
    
    
    
    
  2. To check whether your version of Apache is built with EAPI, run the following command:
    httpd -V
    
    

    If the output contains the line -D EAPI, you are running an EAPI version of Apache.

  3. Open the file /etc/httpd/conf/httpd.conf in a text editor.
    1. If you are not running an EAPI version of Apache, in the section LoadModule, add the following line:
      LoadModule coldfusion_module /opt/coldfusion/webserver/apache/mod_coldfusion_standard.so
      
      

      If you are running an EAPI, add the following line:

      LoadModule coldfusion_module /opt/coldfusion/webserver/apache/mod_coldfusion_EAPI.so
    2. In the section AddModule, add the following line:
      AddModule mod_coldfusion.c
      
      
    3. Save the file.
  4. Restart Apache with the following command:
    /etc/rc.d/init.d/./httpd start
    
    

To configure SuSE/Cobalt and Apache:

  1. To check whether your version of Apache is built with EAPI, run the following command:
    httpd -V
    
    

    If the output contains the line -D EAPI, you are running an EAPI server. (SuSE requires an EAPI version of mod.coldfusion.so.)

  2. Shut down Apache with the following command:
    /etc/rc.d/apache stop
    
    
  3. Open the file /etc/httpd/httpd.conf in a text editor.
    1. In the section LoadModule, add the following lines:
      LoadModule mmap_static_module /usr/lib/apache/mod_mmap_static.so
      
      LoadModule setenvif_module /usr/lib/apache/mod_setenvif.so
      
      LoadModule coldfusion_module /opt/coldfusion/webserver/apache/mod_coldfusion_EAPI.so
      
      
      
      
    2. In the section AddModule, add the following lines:
      ClearModuleList
      
      AddModule mod_mmap_static.c
      
      AddModule mod_vhost_alias.c
      
      AddModule mod_so.c
      
      AddModule mod_setenvif.c
      
      AddModule mod_coldfusion.c
      
      
    3. Save the file.
  4. Create a symbolic link from the EAPI version of the ColdFusion Server module to the /usr/lib/apache directory, to ensure that the EAPI module is executable:
    chmod 755 /opt/coldfusion/webserver/apache/mod_coldfusion_EAPI.so
    
      ln -s  /opt/coldfusion/webserver/apache/mod_coldfusion_EAPI.so /usr/lib/apache/mod_coldfusion.so
    
    
  5. Open the file /etc/rc.d/apache in a text editor.
    1. Look for the following lines:
      if ! test "$HTTPD_SEC_MOD_SAPCGI" == "no" ; then
      
            test -e /usr/lib/apache/mod_fastcgi_sap.so || \
      
                test $(/usr/sbin/httpd -l | grep  "mod_fastcgi_sap.c") = "mod_fastcgi_sap.c" 2> /dev/null \
      
                && MODULES="-D SAP_CGI $MODULES" && echo -n " SAP-fastcgi"
      
      fi
      
      
      
      
    2. Add the following lines directly below the previous lines:
      if ! test "$HTTPD_SEC_MOD_COLDFUSION" == "no" ; then
      
        test -e /usr/lib/apache/mod_coldfusion.so && MODULES="-D COLDFUSION $MODULES" && echo -n " Coldfusion"
      
      fi
      
      
      
      
  6. Restart Apache with the following command:
    /etc/rc.d/apache start
    
    

Configuring SNMP MIB

To use the ColdFusion Server MIB features, you must configure the following settings.

To configure Red Hat to use the MIB Agent:

  1. Stop the SNMP Server by entering the following command as root:
    /etc/rc.d/init.d/snmpd stop
    
    
  2. For each server that is to receive trap messages from the local host, add the following line to /etc/snmp/snmpd.conf:
    trapsink server1.macromedia.com public
    
    

    where server1.macromedia.com is the name of the destination server, and public is the name of the community under which the trap messages are sent. Ensure that the destination server, such as server1.macromedia.com, is configured to receive traps from the specified community, such as public.


    Warning

    Ensure that the following line does not appear in snmpd.conf more than once: dlmod allaire /usr/lib/btcats/program/allaire_mib.so


  3. Go to the Debug Options page of the ColdFusion Administrator, and ensure Enable Performance Monitoring is selected.
  4. Start the SNMP Server, enter the following command as root:
    /etc/rc.d/init.d/snmpd    start
    
    

Tip

You can find a copy of the MIB definition in /usr/lib/btcats/database/lhmib_UNIX.mib.


Configuring the MIB Agent for HTTPS and non-default ports

To use HTTPS, a different Web server name, or a different port to access the Web document root for ColdFusion MIB information, modify the content of /usr/lib/btcats/database/mib.properties file.

This file usually contains a single entry, such as http://maine where maine is the name of the local host and http://maine is the Web document root directory for the ColdFusion MIB information. To use HTTPS, a different Web document root (maine1), and port (459), edit the entry to https://maine1:459.

Configuring databases

After the install is complete, but before you can set up data sources in the ColdFusion Administrator, you must edit the /opt/coldfusion/bin/start script to include information about whatever database(s) you use.

Normally this requires two changes per database: setting a database-specific environment variable, and adding the path to the client-side database libraries to your LD_LIBRARY_PATH environment variable. The start script provides examples to help you.

After editing the start script, you must stop and restart ColdFusion Server for the changes to take effect. Then, you can proceed to the ColdFusion Administrator to set up your data sources.


Note

For more information, see "Managing Data Sources".


In Linux, you must use certain database clients in Linux. The following table lists the required clients for ColdFusion Server 5 in Linux:



Banner.Novgorod.Ru