Web site hosting and domain registration services by Active-Venture.com
  

Installing the Apache 1.3 HTTP Server on TPF

Compilation

Apache supports the notion of "optional modules". However, the server has to know which modules are compiled into it. In order for those modules to be effective, it is necessary to generate a short bit of code (modules.c) which simply has a list of them. If you are using the Configure utility and make, modules.c and other necessary files will be created for you automatically.

The provided instructions assume a c89 compiler and have been tested on an OS/390 UNIX machine running at version 2.6 that contained both OS/390 UNIX and TPF C header files. If you are using a platform other that OS/390 UNIX you may need to modify src/os/tpf/TPFExport and src/Configure to match your environment.

TIP: Editing files on your PC prior to moving them to OS/390 UNIX may result in the loss/addition of unprintable characters. Files of concern include shell scripts and src/Configuration. The most common problems are with tab characters and CR/LF characters. Most editors will handle the CR/LF problem correctly but none seem to handle tab characters. If you need to edit files prior to moving them to OS/390 UNIX, edit them in a UNIX editor such as vi or emacs.

Note that OS/390 UNIX commands in this section are shown in bold, are case sensitive, and must be made from the "src" directory.

  1. Switch to the source code subdirectory: cd apache_1.3.xx/src
     
  2. Overlay src/Configuration with src/Configuration.tmpl: cp Configuration.tmpl Configuration
     
  3. Edit src/Configuration. It contains the list and settings of various "Rules" and an additional section at the bottom that determines which modules to compile:
     
    • comment out (by preceding the line with a "#") lines corresponding to those modules you DO NOT wish to include  
    • uncomment (by removing the initial "#", if present) lines corresponding to those modules you wish to include or add new lines corresponding to any custom modules you have written (the readme-tpf.html document lists the modules that have been tested on TPF) 
    • if you did not delete the src/lib/expat-lite directory as noted in the download instructions, add "Rule EXPAT=no" to the src/Configuration file
    • adjust the other rules, EXTRA_CFLAGS, EXTRA_LIBS, EXTRA_LDFLAGS, and EXTRA_INCLUDES settings if you feel so inclined

    The modules placed in the Apache distribution are the ones that have been tested and are used regularly by various members of the Apache development group. Additional modules contributed by members or third parties with specific needs or functions are available at http://modules.apache.org/. There are instructions on that page for linking these modules into the core Apache code. 

  4. Indicate whether the non_socket_select function is implemented on your system.

    If you are on a PUT12 or higher system, or have PJ26895 installed, then you probably support non_socket_select.
    You can verify this by looking for the non_socket_select prototype in your system header files (specifically i$pwbl.h).

    If your TPF system supports non_socket_select do one of the following:

    • add "#define TPF_HAVE_NONSOCKET_SELECT" to src/os/tpf/os.h   or
    • add "-DTPF_HAVE_NONSOCKET_SELECT" to the _C89_OPTIONS export in src/os/tpf/TPFExport


    Otherwise:

    • add "#define TPF_NO_NONSOCKET_SELECT" to src/os/tpf/os.h   or
    • add "-DTPF_NO_NONSOCKET_SELECT" to the _C89_OPTIONS export in src/os/tpf/TPFExport


    Without non_socket_select CGI output is buffered and only sent to the browser when the CGI program finishes.

  5. Indicate whether the tpf_sawnc function is implemented on your system.

    If you are on a PUT10 or higher system, or have PJ27387/PJ26188 installed, then you probably support tpf_sawnc.
    You can verify this by looking for the tpf_sawnc prototype in your system header files (either tpfapi.h or i$fsdd.h).

    If your TPF system supports tpf_sawnc do one of the following:

    • add "#define TPF_HAVE_SAWNC" to src/os/tpf/os.h   or
    • add "-DTPF_HAVE_SAWNC" to the _C89_OPTIONS export in src/os/tpf/TPFExport


    Otherwise:

    • add "#define TPF_NO_SAWNC" to src/os/tpf/os.h   or
    • add "-DTPF_NO_SAWNC" to the _C89_OPTIONS export in src/os/tpf/TPFExport


    The use of tpf_sawnc allows for a cleaner shutdown of Apache.

  6. Indicate if you have the Syslog Daemon message logging facility.

    If you are on a PUT13 or higher system, or have PJ27214 installed, you can use syslog for Apache's ErrorLog.
    To have the option of using syslog you must do one of the following:

    • add "#define HAVE_SYSLOG" to src/os/tpf/os.h   or
    • add "-DHAVE_SYSLOG" to the _C89_OPTIONS export in src/os/tpf/TPFExport


    You also need to add "INCLUDE OBJLIB(CSYLOG40)" to your link JCL.

    See TPF Transmission Control Protocol/Internet Protocol for more information about the Syslog Daemon: http://www.ibm.com/tpf/pubs/tpfpubs.htm.

  7. Indicate if you would like to use the TCP/IP network services database. (This only applies if you are using TCP/IP native stack.)

    If you are on a PUT16 or higher system, or have PJ28195 installed, you can use the TCP/IP network services database. To do so, you must do one of the following:

    • add "#define TPF_HAVE_NSD" to src/os/tpf/os.h   or
    • add "-DTPF_HAVE_NSD" to the _C89_OPTIONS export in src/os/tpf/TPFExport


    See TPF Transmission Control Protocol/Internet Protocol for more information about the TCP/IP network services database: http://www.ibm.com/tpf/pubs/tpfpubs.htm.

  8. Set the TPF environment variables: . os/tpf/TPFExport 

    TIP: The initial period and blank on the command are required to ensure the environment variables exist beyond the scope of the shell script.

    This script will set the environment variables required to compile the programs for TPF. Verify that the export variables are valid for your installation, in particular, the system include file directories. The system include files must reside on your OS/390 UNIX system in the appropriate file structure similar to /usr/include and /usr/include/sys. DO NOT modify the TPF=YES export variable. If this is changed, the "Configure" script will not recognize TPF. 
     
  9. Run the "Configure" script: Configure 

    This generates modules.c, include/ap_config_auto.h, and necessary Makefiles:

          Using config file: Configuration
          Creating Makefile
           + configured for TPF platform
           + setting C compiler to c89
           + setting C pre-processor to c89 -E
           + using "tr [a-z] [A-Z]" to uppercase
           + checking for system header files
           + adding selected modules
           + checking sizeof various data types
          Creating Makefile in support
          Creating Makefile in regex
          Creating Makefile in os/tpf
          Creating Makefile in ap
          Creating Makefile in main
          Creating Makefile in modules/standard
          $ _
    
    

    If you want to maintain multiple configurations, you can say, for example
    Configure -file Configuration.2nd

          Using config file: Configuration.2nd
          Creating Makefile
           + configured for <whatever> platform
           + setting C compiler to <whatever>
          et cetera
    

    If you receive an error such as "Configure 146: FSUM7351 not found" the most likely explanation is that one or more of the make related files were edited on a non-UNIX platform, corrupting the end-of-line marks. Verify that lines ending with "\" in the flagged file do not have trailing spaces. Using the vi editor and the sample error above as an example...   

         pull up the flagged file:       vi Configure
         turn on punctuation:            :set list
         go to the line in question:     146G
            or find a line with a "\":   /\\
    

    The end of line should display as "\$". If it is displayed as "\ $" (with a blank between \ and $) then you should revert to the distributed version of the file and make the site-specific changes again using a UNIX compatible editor such as vi or emacs. Then try the Configure command again. 

         close the file:                 :q  (or :quit!)
    
  10. Edit include/ap_config.h if you want to use the sigaction() function.

    The sigaction() function supersedes the signal() interface and should be used in preference. This function was implemented with APAR PJ26188 which shipped with PUT10.

    To use sigaction() remove #define NO_USE_SIGACTION in the TPF section of ap_config.h.

    The change will only take effect after Apache is (re)compiled.

  11. Edit include/ap_config.h if you do not want the scoreboard kept in shared memory.

    The default behavior for Apache on all platforms except TPF is to use the file system for maintaining the scoreboard (which holds current Apache children status). The default behavior for Apache on TPF is to use shared memory. This reduces file activity for the parent Apache ECB and improves performance.

    If you are on a pre-PUT10 system, or for some reason you do not want to use shared memory for the scoreboard, you must remove "#define USE_SHMGET_SCOREBOARD" from the TPF section of ap_config.h

    The change will only take effect after Apache is (re)compiled.

  12. Now compile the programs: make

    Besides compiling, make also runs src/main/gen_test_char.c and src/main/gen_uri_delims.c in order to create src/main/test_char.h and src/main/uri_delims.h respectively

    • The following compilation warning may or may not occur. It should be ignored:

      main/http_main.c:    Infinite loop detected in function child_main. Program may not stop.
    • If during compilation you get a warning about a missing 'regex.h', set WANTHSREGEX=yes in the src/Configuration file and start back at the Configure step.
       
    • If you get a 'Duplicate type specifier "long" ignored' error, add "-W 0,langlvl(extended)" to the _C89_OPTIONS export in src/os/tpf/TPFExport and start back at the export step

 

 

 

© 2005 Active-Venture.com Web Page Hosting Service

Buy domain name registration | Register cheap domain name | Domain registration services 

< A language that doesn't have everything is actually easier to program in than some that do.   >

 

 
 

Disclaimer: This documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to http://httpd.apache.org/docs/