welcome hpws docs hp-ux webservers home contact hp support
hp logo - invent  hp-ux web server suite

Getting Started with the HP-UX Web Server Suite

TABLE OF CONTENTS

Overview Installation Newconfig Support HP-UX Apache-based Web Server HP-UX Tomcat-based Servlet Engine HP-UX Webmin-based Admin HP-UX XML Web Server Tools - Xerces-J - Xalan-J - Cocoon - FOP - Batik Legal Notices

OVERVIEW

The HP-UX Web Server Suite is a free product for HP-UX platform and includes key software products necessary to deploy, manage, and implement mission critical web servers. The suite is comprised of four products that install into the following locations by default: HP-UX Apache-based Web Server /opt/hpws/apache/ HP-UX Tomcat-based Servlet Engine /opt/hpws/tomcat/ HP-UX Webmin-based Admin /opt/hpws/webmin/ HP-UX XML Web Server Tools /opt/hpws/xmltools/ Depending on what you have installed, some components may or may not be found. For the latest information on the HP-UX Web Server Suite, see http://www.hp.com/go/webserver/

INSTALLATION

The installation paths for the products included in HP-UX Web Server Suite are: /opt/hpws/apache/ for HP-UX Apache-based Web Server (50 - 60 MB) /opt/hpws/tomcat/ for HP-UX Tomcat-based Servlet Engine (15 - 17 MB) /opt/hpws/webmin/ for HP-UX Webmin-based Admin (5 MB) /opt/hpws/xmltools/ for HP-UX XML Web Server Tools (105 MB) HP-UX Apache-based Web Server, HP-UX Webmin-based Admin, HP-UX Tomcat-based Servlet Engine and HP-UX XML Web Server Tools can all be installed together, in combination (e.g. Apache and Webmin) or separately (e.g. Apache standalone, Tomcat standalone). Installing the HP-UX Web Server Suite Distribution: Before updating, make sure to stop any running instances of your existing Apache, Tomcat and Webmin installation. % $OLD_APACHE_HOME/bin/apachectl stop % $OLD_TOMCAT_HOME/bin/shutdown.sh % $OLD_WEBMIN_HOME/webmin-init stop As root, use swinstall command to install the software: % /usr/sbin/swinstall & A user interface will be invoked to guide you through the installation. At this point, you can choose between HP-UX Apache-based Web Server, HP-UX Webmin-based Admin, HP-UX Tomcat-based Servlet Engine or HP-UX XML Web Server Tools or any combination of these components. All products are installable as standalone. We recommend installing HP-UX Webmin-based Admin with HP-UX Apache-based Web Server for ease in web server management.

NEWCONFIG SUPPORT

Earlier releases of the HP-UX Web Server Suite (known as HP Apache-based Webserver) had the following behavior for user configurable files, say httpd.conf. When the software is installed, all the existing files on the system were saved with a ".save" suffix. Therefore, httpd.conf would be saved as httpd.conf.save. At the same time, new versions of the files were installed. Thus httpd.conf would be a new version corresponding to the installed version of the binary. Starting with this version, the HP-UX Web Server Suite follows the HP-UX defined standard methodology for delivering new user configurable files (henceforth referred to as just "file" or "files"). The new process is as follows: 1. The new files are delivered at: /opt/hpws/<component>/newconfig/ 2. During the preparation phase in an swinstall, a file from the previous installation of the component is moved to a safe location for a later review: /opt/hpws/<component>/old/ 3. The installation process then checks to see if the file is currently absent (implying either that this is the first installation or that the file has been removed), or that the working file is identical to the file at /opt/hpws/<component>/old/. In both the cases, the file already on the system can be overwritten. The install process then copies the files from: /opt/hpws/<component>/newconfig/ to: <absolute-path-to-file> Otherwise, it leaves the file untouched. An administrator can review the files later to determine and execute the move of the file from newconfig location to the actual location manually. Currently, even /etc/rc.config.d/hpws_*conf files are covered in the newconfig support. The administrator can review the /var/adm/sw/swagent.log to identify the files that have been updated by the newconfig process. The following type of "NOTE:" message in the log file will assist the administrator to make this determination. NOTE: A new version of "/opt/hpws/apache/conf/httpd.conf" has been installed on the system. IMPORTANT: The files located at /opt/hpws/<component>/newconfig and /opt/hpws/<component>/old/ are available to the administrator for reference when manually editing the current files, but they should not be altered. Doing so would make the file updates unpredictable.

HP-UX APACHE-BASED WEB SERVER

Apache is not automatically started upon installation. You must be root to start/stop Apache with the default installation. To start the HP-UX Apache-based Web Server: $ /opt/hpws/apache/bin/apachectl start To stop the HP-UX Apache-based Web Server: $ /opt/hpws/apache/bin/apachectl stop Once your Apache server is running, use your browser to access: http://yourserver.com/. Documentation detailing configuration and in-depth requirements can be found here. To start the HP-UX Apache-based Web Server with SSL capability: $ /opt/hpws/apache/bin/apachectl startssl To stop the HP-UX Apache-based Web Server with SSL capability: $ /opt/hpws/apache/bin/apachectl stop For server startup with PHP, suEXEC and ldap authetication, see the corresponding Admin guides located in /opt/hpws/hp_docs/apache/. For server startup with WebDAV, when your server is running, see the FAQ located at http://yourserver.com/hp_docs/faq/, or use Webmin and access http://yourserver.com:10000/hp_docs/faq/.

HP-UX TOMCAT-BASED SERVLET ENGINE

Tomcat is configured to be run as user www and it can be used as a standalone container or in conjunction with Apache. Tomcat can also be started as secure server, for detailed information consult ssl-howto.html. This version of Tomcat is designed to run on Java 1.5. However it can still run on Java 1.4 by having the compatibility package installed. This package is delivered as part of HP-UX Tomcat Servlet Engine. The minimum Java requirement for Tomcat is the JRE (Java Runtime Environment) 1.4.x or higher. However, Java 1.5 JRE is recommended. The latest versions of Java 1.5 and higher can be downloaded from http://www.hp.com/go/java. Make sure to download the correct version for Itanium. In order to use standalone Tomcat, run the following commands: $ cd /opt/hpws/tomcat $ ./bin/startup.sh Tomcat will start and will listen to the default port 8081. Once your Tomcat server is running, use your browser to access: http://yourserver.com:8081/. Documentation detailing configuration and in-depth requirements can be found here. To use Tomcat with Apache 1) Modify /opt/hpws/apache/conf/httpd.conf In that file enable mod_jk connector by uncommenting the following line: Include /opt/hpws/apache/conf/mod_jk.conf or Include /opt/hpws/apache/conf/mod_jk2.conf 2) Modify mod_jk.conf(if necessary) You can add here additional mount points if you want Apache to forward requests to Tomcat. Add lines similar to the following: JkMount /mywebapp ajp13 3) Start Tomcat $ cd /opt/hpws/tomcat $ bin/startup.sh Once your Tomcat server is running, use your browser to access: http://yourserver.com:8081/. 4) Start Apache $ /opt/hpws/apache/bin/apachectl start Tomcat will start and will listen to the default port 8081. Once your Tomcat server is running, use your browser to access: http://yourserver.com:8081/. Documentation detailing configuration and in-depth requirements can be found here. For mod_jk2 configuration please refer to the following web site: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/confighowto.html Stopping Tomcat $ cd /opt/hpws/tomcat $ ./bin/shutdown.sh

HP-UX WEBMIN-BASED ADMIN

Webmin is not automatically started upon installation. You must be root to start and stop the Webmin miniserver. If you have problems starting Webmin, make sure you have Perl 5.1.6 or higher installed at /opt/perl/bin/perl. The latest version of Perl is available from HP Software Depot (http://software.hp.com). To start Webmin: Log in as root. $ /opt/hpws/webmin/webmin-init start Point the browser to: http://yourserver.com:10000/ Login : admin Password : hp.com Click on the "Documentation" button for details about configuration and in-depth requirements. Remember to change your password. To stop Webmin: Log in as root. $ /opt/hpws/webmin/webmin-init stop

HP-UX XML WEB SERVER TOOLS

The minimum Java requirement for Xerces, Xalan, FOP and Cocoon is the JRE (Java Runtime Environment) 1.2.x or higher. However, Java 1.3 JRE is required for Batik and recommended for the other components. The latest versions of Java 1.2 and higher can be downloaded from http://www.hp.com/go/java. For IPF, HP-UX 11i for Itanium processor family-based systems, only Java 1.3 or later is available. Make sure to download the correct version for Itanium.

Xerces-J

The only step to configure to start using Xerces is to include Xerces in your CLASSPATH: $ export CLASSPATH=/opt/hpws/xmltools/xerces-j/xercesImpl.jar:${CLASSPATH} Using Xerces-J with Cocoon : A version of Xerces is built-in to the cocoon.war file. To use the specific version of Xerces within the cocoon implementation, refer to the Cocoon Configuration details.

Xalan-J

- Using Xalan-J from commandline : At the very minimum, ensure that xalan.jar, xml-apis.jar & xercesImpl.jar are on the system classpath. To run sample applications, include xalansamples.jar and xalanservlet.jar. To run extensions, include bsf.jar. All JAR files are distributed in the /opt/hpws/xmltools/xalan-j/bin directory. You can now using the following command to do transformations : $ export XML_TOOLS=/opt/hpws/xmltools $ export CLASSPATH=$XML_TOOLS/xerces-j/xercesImpl.jar:${CLASSPATH} $ export CLASSPATH=$XML_TOOLS/xalan-j/bin/xalan.jar:${CLASSPATH} $ export CLASSPATH=$XML_TOOLS/xalan-j/bin/xml-apis.jar:${CLASSPATH} $ export CLASSPATH=$XML_TOOLS/xalan-j/bin/xalansamples.jar:${CLASSPATH} $ java org.apache.xalan.xslt.Process -IN foo.xml -XSL foo.xsl -OUT foo.out - Using Xalan-J with Cocoon : A version of Xalan is built-in to the cocoon.war file. To use the specific version of Xalan within the cocoon implementation, refer to the Cocoon Configuration details.

Cocoon

Cocoon's centralized configuration system and sophisticated caching help you to create, deploy, and maintain rock-solid XML server applications. The main configuration files, assuming Cocoon deployment as a servlet in a servlet container include : sitemap.xmap: The document describes the Cocoon sitemap concept in full details, why it's there, what it does, how it works and how you can use it. DEFAULT LOCATION : $TOMCAT_HOME/webapps/cocoon cocoon.xconf: The configuration file having logicsheet registrations. It specifies the location of sitemap.xmap and other parameters. DEFAULT LOCATION : $TOMCAT_HOME/webapps/cocoon/WEB-INF logkit.xconf: The configuration file for logkit management. DEFAULT LOCATION : $TOMCAT_HOME/webapps/cocoon/WEB-INF web.xml: The servlet deployment descriptor. It specifies the location of cocoon.xconf, log file location and other parameters. DEFAULT LOCATION : $TOMCAT_HOME/webapps/cocoon/WEB-INF Cocoon can also be run on any servlet engine that supports Servlet version 2.2 or later. They include WebLogic, Resin, Microsoft IIS (using ServletExec) and many others. Using Cocoon with Tomcat: 1. Copy the cocoon.war file to $TOMCAT_HOME/webapps directory. 2. Start the servlet engine. 3. Type-in the URL http://localhost:8081/cocoon in your browser. You should see the Cocoon welcome message.

FOP

To use FOP, ensure that fop.jar, xalan.jar, xml-apis.jar, batik.jar and xercesImpl.jar are in your system classpath. The fop.sh script included as a part of the distribution sets up this environment for FOP. The usage information for FOP can be obtained by typing the following at the command prompt : $ /opt/hpws/xmltools/fop/fop.sh --usage

Batik

To use the various applications shipped with Batik, setup the system classpath to include the batik.jar file. $ export CLASSPATH=/opt/hpws/xmltools/batik/batik.jar:${CLASSPATH} Squiggle SVG Browser : $ java -jar batik-squiggle.jar -font-size 10 SVG Rasterizer : $ java -jar batik-rasterizer.jar /path/to/svg/file SVG Font Converter : $ java -jar batik-ttf2svg.jar <ttf-path> [-l ] \ [-h <range-end>] [-ascii] [-id ] [-o ] [-testcard] SVG Pretty-printer : $ java -jar batik-svgpp.jar /path/to/svg/file ***************************************************************************