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

User Guide for HP-UX Web Server Suite Utilities

TABLE OF CONTENTS

Overview Altroot.sh Ports.sh Legal Notices

OVERVIEW

These utilities provide functions that are unique to the HP-UX Web Server Suite. They are located in /opt/hpws/util.

ALTROOT.SH

Alternate Root Tool for HP-UX Web Server Suite This tool allows an administrator to relocate the entire HP-UX Web Server Suite or its individual components to a location other than the default location of /opt/hpws. Note that this tool can only be run after the initial installation is complete, and the product has been installed on the system. The utility does not provide a means of changing the root of the software at the time of installation through swinstall. This script must be run as root. After being moved by altroot.sh, the components are configured appropriately to execute from their new locations. IMPORTANT: We recommend that the user of the altroot.sh script carefully review this document (along with the caveats documented below) and the actual script itself prior to executing it. In this release of altroot.sh, the following facility is supported. - Move the entire directory from </current/root> to - Change necessary files so that references to </current/root> are replaced by </new/root> - Update the RC scripts' configuration files in /etc/rc.config.d The following files hold information for the location of various components of HP-UX Web Server Suite. o HP-UX Apache-based Web Server: /etc/rc.config.d/hpws_apacheconf o HP-UX Tomcat-based Servlet Engine: /etc/rc.config.d/hpws_tomcatconf o HP-UX Web Server XML Tools: /etc/rc.config.d/hpws_xmltoolsconf o HP-UX Webmin-based Admin and all other components under </current/root> of the HP-UX Web Server Suite: /etc/rc.config.d/hpws_webminconf - Saves the original copy of the modified files as file.<current-time> so that one can go back and review the changes if needed. This option is configurable through the script. USAGE % altroot.sh { --apache | --apache32 | --tomcat | --xmltools | --all } [--nosave] [--strict] [/current/root] </new/root> --apache move HP-UX Apache-based Web Server root directory --apache32 move HP-UX Apache-based Web Server (32-bit) root directory --tomcat move HP-UX Tomcat-based Servlet Engine root directory --xmltools move HP-UX XML Web Server Tools root directory --all move all HP-UX Web Server Suite components as one unit [--nosave] do not save original files [--strict] for --apache, --apache32 and --all only. Uses Apache's httpd.conf file to determine Apache's </current/root> (overrides user input). DEFAULTS: The default directories and RC scripts for Apache, Apache32, Webmin, Tomcat, XML Tools, and the Web Server Suite are, Apache: /opt/hpws/apache assumed as </current/root> RC script: /etc/rc.config.d/hpws_apacheconf Apache32: /opt/hpws/apache32 assumed as </current/root> RC script: /etc/rc.config.d/hpws_apache32conf Webmin: /opt/hpws/webmin assumed as </current/root> RC script: /etc/rc.config.d/hpws_webminconf Note: The Webmin component cannot be moved by itself. However, if you wish to move entire hpws suite it will also move the Webmin component. Tomcat: /opt/hpws/tomcat assumed as </current/root> RC script: /etc/rc.config.d/hpws_tomcatconf XML Tools: /opt/hpws/xmltools assumed as </current/root> RC script: /etc/rc.config.d/hpws_xmltoolsconf Entire Suite:/opt/hpws assumed as </current/root> RC script none OPTIONS: { --apache | --apache32 | --tomcat | --xmltools | --all } Select one of these as the product to move. --nosave Optional, does not save an original copy of the modified files. --strict Required for Apache (--apache and --apache32) or the entire HP-UX Web Server Suite (--all) when Apache's /current/root is different than the one specified by the "ServerRoot" in /current/root/conf/httpd.conf. This may happen if the Apache installation has been corrupted for some reason. This option should be used with caution as it overrides user specified source location. As an added precaution it is recommended _not_ to use the --nosave option when using this option. /current/root current location of the product, needed only if it is not in its default directory. /new/root Required option, indicates the new target location for the product. EXAMPLES: % altroot.sh --apache /usr/local/hpws/apache Would move your current installation of Apache at /opt/hpws/apache (default root) to /usr/local/hpws/apache % altroot.sh --apache /usr/local/hpws/apache /opt/hpws/apache Would move your Apache installation from the existing /usr/local/hpws/apache to /opt/hpws/apache % altroot.sh --all /usr/local/hpws Would move all components currently residing under /opt/hpws (default root) to /usr/local/hpws. Any component that is not present or has already been moved is ignored. NOTES/CAVEATS: 1. References to Apache apply to Apache32 as well. /opt/hpws/apache can be replaced by /opt/hpws/apache32. HP-UX Apache-based Web Server can be replaced by HP-UX Apache-based (32-bit) Web Server. /etc/rc.config.d/hpws_apacheconf can be replaced by /etc/rc.config.d/hpws_apache32conf 2. Modification of HP-UX Apache-based Web Server binaries Since the binaries of Apache are built with the target installation directory to be /opt/hpws/apache, installing it in a separate directory affects the behaviour of executables that have dependencies on shared libraries. Some of the effected binaries are: /opt/hpws/apache/bin/htdbm /opt/hpws/apache/bin/htdigest /opt/hpws/apache/bin/htpasswd /opt/hpws/apache/bin/httpd /opt/hpws/apache/bin/logresolve /opt/hpws/apache/bin/rotatelogs In order to use these binaries by themselves in the command line, you will have to set the SHLIB_PATH environment variable, to point to the /new/root. However, if you are starting apache through the apachectl script (/new/root/bin/apachectl), then you will not have to worry about it, as the SHLIB_PATH set-up is done in there. 3. No update of the Internal Product Database (IPD) IPD is not updated with the new location of the product. Therefore commands such as swverify and swremove will not work correctly as expected. Also, software updates using swinstall will not take place as anticipated, as the system will not know about the existence of the software in an alternate location. 4. No check for disk space in destination location The altroot.sh script does not check for adequate disk space in the destination. If there is insufficient space in the destination, then altroot.sh will abort in the middle, and this may result in an incomplete move. The administrator is strongly urged to verify this prior to executing the move. 5. User interaction requests The following message may occur when executing altroot.sh, Unable to move the following files: ...files... OK to remove file(s)? (Y/N) These are socket files which cannot be moved across file systems. They are created as part of normal product execution and can be safely removed. They will be recreated in their new location, the next time Apache is started. 6. Documentation correctness requires complete installation The documentation for a specific component is contained within the component itself, and there is also cross-reference of documents between one component and another. altroot.sh updates all of the documentation cross-references. However, if a component is installed after the execution of altroot.sh, the documentation cross-references in the newly installed component as well as the already moved components will have to be manually updated. Hence, it is recommended that all the components of the HP-UX Web Server Suite, that an administrator needs for his/her system, be installed on the system prior to the execution of altroot.sh. 7. Move HP-UX Apache-based Web Server with altroot.sh when Bastille is used If using HP-UX Bastille, HP-UX Apache-based Web Server should only be moved by altroot.sh. The altroot.sh script updates /etc/rc.config.d/hpws_apacheconf which HP-UX Bastille uses to find Apache's root directory. 8. Do not interrupt a move while in progress Moving the suite may take a few minutes because of the large number of files. If altroot.sh is interrupted while a move is in progress the installation may be left in an unknown state. 9. Webproxy functionality will not work after an altroot unless Webproxy files are manually updated. Webproxy files are located under the Apache directory, /opt/hpws/apache/webproxy, and so are moved as part of an Apache altroot. For example, after % altroot.sh --apache /opt/hpws/apache /usr/local/hpws/apache Webproxy files are located under /usr/local/hpws/apache/webproxy. To successfully run Webproxy servers in an altroot environment: 1 Altroot apache first 2. Then manually update the Apache and Webproxy roots in the the Webproxy scripts and configuration files (i.e. scripts in /usr/local/hpws/apache/webproxy/bin, config files in /usr/local/hpws/apache/webproxy/conf, etc.) 3. Configure and start Webproxy servers only after all Apache and Webproxy root references have been updated. NOTE: It is much more difficult to update webproxy servers if they have been configured and started before the altroot. For this reason it is NOT recommended to use Webproxy BEFORE an altroot. 10. Some bundled documents cannot be read after an altroot. When moving a single HPWS component (i.e. Apache, Tomcat, XML Tools) the component's document files (i.e. apache.release.notes, apache.admin.guide) are not accessible. To fix this, update the component's document link to the new location. For example, after doing the following altroot: % altroot.sh --apache /opt/hpws/apache /usr/local/hpws/apache You can verify the problem, % cd /opt/hpws/hp_docs % ll apache apache -> /opt/hpws/apache/hpws_docs To fix the problem, change the symlink to point to the new location, % cd /opt/hpws/hp_docs % rm apache % ln -s /usr/local/hpws/apache/hpws_docs apache % ll apache apache -> /usr/local/hpws/apache/hpws_docs

PORTS.SH

Port List Utility. This script lists the ports being configured by the HP-UX Web Server Suite and the location of their configuration files. Apache, Tomcat, and Webmin all use ports. ports.sh will display ports for whichever of these are installed on the system. USAGE: % ports.sh DEFAULTS: Displays all configured ports for Apache, Tomcat, and Webmin EXAMPLE: % ports.sh Apache, Tomcat, and Webmin are all currently installed at their default locations and using their default ports. The following is displayed: Apache installed at /opt/hpws/apache Locations of configuration files: Apache: /opt/hpws/apache/conf/httpd.conf Apache (SSL): /opt/hpws/apache/conf/ssl.conf mod_jk: /opt/hpws/apache/conf/mod_jk.conf mod_jk: /opt/hpws/apache/conf/workers.properties mod_jk2: /opt/hpws/apache/conf/mod_jk2.conf mod_jk2: /opt/hpws/apache/conf/workers2.properties LDAP: /opt/hpws/apache/conf/ldap.conf Stunnel: /opt/hpws/apache/conf/stunnel.conf The following ports have been identified: HTTP port: 80 HTTPS port: 443 LDAP port: 389 Stunnel port: 5555 Apache installed at /opt/hpws/apache32 Locations of configuration files: Apache: /opt/hpws/apache32/conf/httpd.conf Apache (SSL): /opt/hpws/apache32/conf/ssl.conf mod_jk: /opt/hpws/apache32/conf/mod_jk.conf mod_jk: /opt/hpws/apache32/conf/workers.properties mod_jk2: /opt/hpws/apache32/conf/mod_jk2.conf mod_jk2: /opt/hpws/apache32/conf/workers2.properties LDAP: /opt/hpws/apache32/conf/ldap.conf Stunnel: /opt/hpws/apache32/conf/stunnel.conf The following ports have been identified: HTTP port: 80 HTTPS port: 443 LDAP port: 389 Stunnel port: 5555 Tomcat installed at /opt/hpws/tomcat Locations of configuration files: Tomcat: /opt/hpws/tomcat/conf/server.xml jk2: /opt/hpws/tomcat/conf/jk2.properties Webmin installed at /opt/hpws/webmin Locations of configuration files: Webmin: /opt/hpws/webmin/conf/miniserv.conf Tomcat ports: 8005 8081 8009 Webmin port: 10000 ***************************************************************************