Install Mathematica from the Mathematica CD-ROM using the Getting Started with Mathematica manual appropriate for your platform on the computer you wish to use for your web server. You should choose a single-machine installation and install an appropriate license as described in the manual. When you have finished, you should be able to run Mathematica interactively to validate your installation. If Mathematica cannot run, then webMathematica cannot run.
If you already have an installation of Mathematica 4.2 on your server, you do not need to install Mathematica again but can proceed with the remaining installation steps. With an existing installation of Mathematica 4.2, you may place your webMathematica license information into a different location, as described in the section on the installation of the webMathematica web application. Placing the license information in a different location will ensure that an interactive usage of Mathematica on your server does not interfere with the operation of your webMathematica site. One possible alternative directory is the webMathematica/WEB-INF/conf directory as demonstrated in the section on installing webMathematica into Tomcat. Note that if you install the license in a special file you will have to set the -pwfile option when you run Mathematica outside of webMathematica.