Sun Java Enterprise System 5 Upgrade Guide for UNIX |
Chapter 7
Web ServerThis chapter describes how to upgrade Web Server to Java ES 5 (Release 5): Sun Java System Web Server 7.0.
The chapter provides an overview of upgrade considerations for the different upgrade paths supported by Release 5. The chapter covers upgrades on both the Solaris and Linux operating systems:
Overview of Web Server UpgradesThis section describes the following general aspects of Web Server that impact upgrading to Java ES 5 (Release 5):
About Java ES Release 5 Web Server
Java ES Release 5 Web Server represents a major release with respect to Release 4. It has a number of new features and interface enhancements.
Release 5 Web Server has a new administrative infrastructure with new administrative tools. The administrative infrastructure includes an Administration Server instance which hosts configuration information for any number of Web Server instances. A new command line interface (wadm) and new graphical user interface are used to create Web Server instances, either locally or on remote computers, and to configure and manage these instances. The new administrative tools require an administrator user name and password.
For more information on the new administrative infrastructure, see the Web Server 7.0 Administrator’s Guide, http://docs.sun.com/doc/819-2629.
These changes in the Web Server administrative interface have a significant impact on upgrade.
Web Server Upgrade Roadmap
Table 7-2 shows the supported Web Server upgrade paths to Java ES Release 5. The table applies to both Solaris and Linux operating systems.
Web Server Data
The following table shows the type of data that could be impacted by an upgrade of Web Server software.
Table 7-3 Web Server Data Usage
Type of Data
Location
Usage
Configuration data
Web Server 6.x (Java ES Release 2, 3, and 4): WebServer6-base/https-instanceName/config/
Configuration of Web Server instances
Web Server 7.0 (Java ES Release 5):
Instance Configuration
WebServer7Config-base/https-configName/config1/Central Configuration Store
Accessed through Web Server Console and through wadm command line interface.
1Note that the WebServer7Config-base path is substantially different from the WebServer6-base path.
Web Server Upgrade Strategy
Your strategy for upgrading Web Server generally depends on the many considerations discussed in Chapter 1, "Planning for Upgrades": upgrade path, dependencies between Java ES components, selective upgrade versus upgrade all, multi-instance deployments, and so forth.
This section is to particularize that general discussion to Web Server by presenting issues that might influence your Web Server upgrade plan.
Compatibility Issues
Java ES Release 5 Web Server does not introduce any changes in public interfaces and is therefore backwardly compatible with earlier versions in this respect. However, the new administrative interfaces are not backwardly compatible with earlier administrative interfaces. This impacts the upgrade and re-deployment of web applications (including, for example, Java ES components).
In particular, Release 5 Web Server uses different defaults for instance directories and virtual server names, as shown in the following table.
Web Server Dependencies
Web Server has dependencies on the following Java ES components:
- Shared components. Web Server has dependencies on specific Java ES shared components (see Table 1-9). Web Server upgrades might depend upon upgraded versions of these shared components.
- Directory Server. Web Server has an optional dependency on Directory Server for providing LDAP-based authentication.
- Web Proxy Server. Web Server has a co-dependency on Web Proxy Server for providing improved security and performance for HTTP requests.
Dual Upgrade
Dual upgrades, in which both Web Server and operating system are upgraded (as described in Dual Upgrades: Java ES and Operating System Softwared) can be performed using the in-place operating system upgrade approach:
- Back up existing Web Server data.
See Web Server Data for the location of essential data.
- Upgrade the operating system.
The upgrade leaves the existing file system in place.
- Upgrade to Release 5 Web Server.
See the appropriate section of this chapter, depending on upgrade path.
Upgrading Web Server from Java ES Release 4This section includes information about upgrading Web Server from Java ES 2005Q4 (Release 4) to Java ES 5 (Release 5). The section covers the following topics:
Introduction
When upgrading Java ES Release 4 Web Server to Release 5, consider the following aspects of the upgrade process:
- General Upgrade Approach. The upgrade is performed by doing a fresh install of Release 5 Web Server, migrating Release 4 Web Server instance configuration information to a Release 5 configuration, and then creating Release 5 Web Server instances that correspond to the Release 4 instances.
- Upgrade Dependencies. Web Server has dependencies on a number of Java ES shared components (see Table 1-9), all of which are automatically upgraded to Release 5 by the Java ES installer when you perform an upgrade of Web Server. Web Server has hard upgrade dependencies only on NSS and NSPR shared components.
- Backward Compatibility. Release 5 Web Server administrative interfaces are not backwardly compatible with the Release 4 version.
- Upgrade Rollback. Rollback of the Release 5 upgrade is achieved by reverting to the Release 4 installation, which remains intact.
- Platform Issues. The general approach for upgrading Web Server is the same on both Solaris and Linux operating systems.
Release 4 Web Server Upgrade
This section describes how to perform an upgrade of Web Server from Java ES Release 4 to Java ES Release 5 on both the Solaris and Linux platform. Where a topic depends on platform-specific procedures, the topic will indicate the operating system to which it applies. The section covers the following topics:
Pre-Upgrade Tasks
Before you upgrade Web Server software you should perform the following tasks:
Verify Current Version Information
You can verify the current version of Web Server by running the Web Server instance server with the -version option:
WebServer6-base/https-hostName.domainName/start -version
Table 7-5 Web Server Version Verification Outputs
Java ES Release
Web Server Version Number
Release 2
6.1SP2
Release 3
6.1SP4
Release 4
6.1SP5
Release 5
7.0
Upgrade Web Server Dependencies
It is generally recommended that all Java ES components on a computer system (and in a computing environment) be upgraded to Java ES Release 5. However, all shared components required by Web Server (see Table 1-9) are upgraded automatically by the Java ES installer when you perform an upgrade of Web Server to Release 5.
Back Up Web Server Data
The Web Server upgrade from Release 4 to Release 5 does not modify the existing configuration data; it is left intact. There is no need to back up current data.
Obtain Required Configuration Information and Passwords
You will have to log in as superuser to perform the upgrade and the user account performing migration should have permission to access the existing Web Server installation directories.
Upgrading Release 4 Web Server
This section discusses considerations that impact the upgrade procedure for Web Server followed by a description of the procedure itself.
Upgrade Considerations
When upgrading Web Server software to Java ES Release 5 you should take into account the following considerations:
- Configure Now or Configure Later. When performing an upgrade, you specify whether to install Release 5 Web Server using the Configure Now or Configure Later option:
- Configure Now means the installer will set up an Administration Server or Administration Node, as specified, and also create a default configuration and a corresponding Web Server instance. This approach is useful for installation on a single computer, but the default configuration name might impact the migration of existing instance configurations during upgrade.
- Configure Later means the installer will perform no configuration: you will have to manually run a configureServer script after providing property values to an input file. This approach is useful if you want to automate the installation on multiple computers using scripts that perform silent installs. You also have full control over configuration names and can avoid conflict with the migration of existing instance configurations during upgrade.
- Migration of a default Release 4 instance configuration. When performing an upgrade, you migrate configuration data for each Release 4 Web Server instance to a central configuration store maintained by the Web Server Administration Server. The migration is achieved using the wadm migrate-server command or the Release 5 Administration Console.
If an instance being migrated is a default Release 4 Web Server (6.x) instance, it has the same name (hostName.domainName) as the default Release 5 Web Server (7.0) configuration, which is automatically created by the Configure Now option.
When performing the migration of a default Release 4 instance configuration to Release 5, there are three approaches you can take, each of which results in a different configuration name.
The approach you choose can impact the subsequent upgrade of deployed web applications. For example, the upgrade of deployed Java ES components (such as Access Manager and Portal Server) and Sun Java Communications Suite components (such as Communications Express, Instant Messaging, and Delegated Administrator) generally requires that the person performing such upgrades know the name of the Release 5 configuration to which the Release 4 instance configuration has been migrated.
The three approaches are the following:
- Do not specify a new configuration name, but delete the default Release 5 instance and configuration (hostName.domainName) before running the migrate-server command. The migrate-server command will then create a new configuration with the default name (hostName.domainName). The sequence would be as follows (see wadm help for details):
Subsequently upgraded web applications would need to be re-deployed to the hostName.domainName-1 configuration.
Whichever approach you take in migrating Release 4 instance configurations, the name of the Release 5 configuration to which the Release 4 instance configuration has been migrated should be communicated to whomever is performing a subsequent upgrade of a web application deployed in that instance.
- Migration of configuration data. When migrating Release 4 instance configurations, the following information is automatically migrated:
- All the configuration information in the Release 4 Web Server instance directory: WebServer6-base/https-instanceName/config. This includes configuration information for all web applications deployed in the Release 4 instance (for example, Java ES components such as Access Manager and Portal Server).
- acl information from WebServer6-base/httpacl
- auth-db information from WebServer6-base/userdb
- Scheduler information from WebServer6-base/https-admserv/config
- Certificate information from WebServer6-base/alias
- Search collection information and index files, as specified when you perform the migration.
The automatic migration does not include the following data:
- docroot content. Instead the new configuration will point to the old docroot and a log message will be recorded in the migration log
- Webdav data. Webdav collection information will be migrated.
- 3rd party NSAPI plug-ins will not be migrated. Instead, they will point to the Release 4 file and a log message will be recorded in the migration log
- Log files
- Changes to the search collection docroot
- Command line scripts (startsvr, startsvr.bat, stopsvr, stopsvr.bat, restart, reconfig, reconfig.bat).
For details regarding data migration, see the Web Server 7.0 Installation and Migration Guide, http://docs.sun.com/doc/819-2625.
Upgrade Procedure
The procedure documented below applies to all Web Server instances corresponding to the same installed Web Server image on the computer where the upgrade is taking place.
- Log in as root or become superuser.
su -
- Stop all running instances of Web Server and the Administration Server.
WebServer6-base/https-instanceName/stop
WebServer6-base/https-admserv/stop- Perform a fresh install of Release 5 Web Server.
Perform the following steps:
- Launch the Java ES installer.
cd Java ES Release 5 distribution/os_arch
./installerwhere os_arch matches your platform, such as Solaris_sparc. (Use the installer -nodisplay option for the command line interface.)
After the Welcome and License Agreement pages are displayed, you will be presented with a component selection page. (When installed components are detected that can be directly upgraded by the Java ES installer, they are shown with a status of “upgradable.”)
- Select Web Server in the component selection page.
- Specify an installation path different from that of Release 4 Web Server.
- Choose to Configure Now or Configure Later.
- If you choose to Configure Now, the Java ES installer offers two choices:
- Configure Administration Instance as Administration Server
Use this choice on the computer that will host the Administration Server that, among other administrative tasks, is required to perform migration of Release 4 instances to Release 5.- Configure Administration Instance as Administration Node
Use this choice on a computer that will host a Web Server instance remote from the Administration Server. The administration instance is configured as a node agent that interacts with the Administration Server.- Specify the configuration values requested.
You are asked for the host name, HTTP port, admin user name and admin password.
- Confirm your installation choices.
Web Server packages will be installed and an install summary displayed.
The Java ES installer will create a default configuration named hostName.domainName and a corresponding Web Server instance.
- Exit the Java ES installer and go to Step 4.
- If you choose to Configure Later, the Java ES installer will create a configureServer script that you run in Step IV.
- Confirm your installation choices.
Web Server packages will be installed and an install summary displayed.
- Exit the Java ES installer.
- Set values in the WebServer7-base/setup/WSInstall.properties file.
Provide values to all the required (non-optional) properties in the following table.
- Run the configureServer script.
WebServer7-base/setup/configureServer
-inputfile WebServer7-base/setup/WSInstall.properties
-logfile WebServer7-base/setup/WSInstall.log
-verboseThe configureServer script will create a default configuration named hostName.domainName and a corresponding Web Server instance.
- Start the Web Server Administration Server service.
WebServer7Config-base/admin-server/bin/startserv
- Migrate Release 4 Web Server instance configurations to Release 5 configurations.
You can use either the command-line (wadm) or graphical user interface administration tools (log in to the Web Server Admin Server GUI). The steps that follow are based on the wadm command-line interface.
For example, to migrate an instance named myinstance to a new configuration:
WebServer7-base/bin/wadm migrate-server --user=admin
--host=localhost --server-root=/opt/SUNWwbsvr --instance=https-myinstance --config=newconfignameThe full command syntax is as follows:
WebServer7-base/bin/wadm migrate-server
--user=admin-user [--password-file=admin-pswd-file] [--host=admin-host]
[--echo] [--rcfile=rcfile] [--no-prompt] [--verbose]
[--search-collection-copy-path=searchCollectionPath]
[--log-dir=directory] --serverroot=path
([--all] | [--instance=https-instanceName] [--config=newconfigName])The first set of command options, above, are common to all wadm commands, and are documented in Table 7-7, below. The second set of command options are specific to the migrate-server command and are documented in Table 7-8.
Invoking wadm with only the first set of command options places you within the wadm command shell. Invoking commands within this shell does not require that you specify the common options again.
If you invoke the full wadm commands from outside the shell, you have to specify, at minimum, the --user and --host options. (If you omit the --password-file option, you will be prompted for a password, and if you omit other options, the default value will be assumed.) However, for commands used to illustrate procedures in this chapter, the --user and --host options are not included for the sake of simplicity.
By default, wadm uses the SSL protocol at port 8989.
For full information on wadm commands and options, see the Web Server 7.0 CLI Reference Manual, http://docs.sun.com/doc/819-3283.
In using the migrate-server command, please keep in mind the following considerations:
- If you want to migrate multiple Release 4 instance configurations, you can either run the migrate-server command multiple times with different --instance values and corresponding --config arguments, or use the --all option to migrate them all at once.
- For every invocation of the migrate-server command, the migration will create a log file of the following name in a directory specified by the --log-dir option (or in the default WebServer7Config-base/admin-server/logs directory):
- For data that is not migrated by the migrate-server command (see Upgrade Considerations), you have to perform the migration manually (see Post-Upgrade Tasks).
- Create Release 5 Web Server instances.
You must create a new Release 5 instance for each Release 4 instance configuration migrated in Step 5.
- Before creating a new instance, verify the migration log and fix any issues in the migrated configuration.
- Run the create-instance command.
WebServer7-base/bin/wadm create-instance
--config=configName nodehost1 [nodehost2 ...nodehostN]Common command options are documented in Table 7-7. Options specific to the create-instance command are documented in the following table.
The create-instance command creates an instance directory at WebServer7Config-base/https-configName
on the specified nodes and deploys the configuration to the corresponding instance directories.- Start each Release 5 instance.
WebServer7Config-base/https-configName/bin/startserv
The startserv script is created when the instance is created. If the instance starts without any problem, then you see a message saying “successful server startup.” The default URL for the instance will be displayed.
Verifying the Upgrade
You can verify the upgrade of Web Server to Release 5 by performing the following steps:
- Check the newly created migration log file for any ERROR messages.
If needed, make manual changes (see Post-Upgrade Tasks).
- Verify the Release 5 Web Server instances.
From a web browser access the following URL and make sure you get the welcome page:
http://hostName.domainName:port
where the fully-qualified host name and port correspond to each instance.
- Run the Web Server instance with the -version option:
WebServer7Config-base/https-configName/bin/startserv -version
See Table 7-5 for version output values.
Post-Upgrade Tasks
The main post-upgrade task concerns performing manual migration, if needed, of certain Release 4 data. This is data normally associated with one or more virtual servers configured for Release 4 and specified in the server.xml configuration file.
Please note the post-upgrade procedures to address the following situations:
Migrating Web Server 6.1 docroot content
- Copy the Web Server 6.1 docroot content to wherever you want.
- Update the new document root path using the following command:
WebServer7-base/bin/wadm set-virtual-server-prop
--config=configName --vs=virtualServerName
document-root=new docroot pathCommon command options are documented in Table 7-7. Options specific to the set-virtual-server-prop command are documented in the following table.
- Redeploy the configuration to the relevant Web Server instances.
WebServer7-base/bin/wadm deploy-config
[--force] [--restart] [--no-reconfig]
configNameCommon command options are documented in Table 7-7. Options specific to the deploy-config command are documented in the following table.
Migrating webdav collection information
No extra manual migration needed. Just updating the docroot path is enough.
Migrating Log files
Copy these files to a known location if you want to save them (otherwise they will be deleted should you remove the Release 4 installation).
Migrating 3rd party NSAPI plug-ins
- Copy the library files from their Release 4 location to the WebServer7-base/lib directory.
- Export the magnus.conf and obj.conf configuration files to a temporary directory.
WebServer7-base/bin/wadm get-config-file --config=configName
magnus.conf > /tmp/magnus.confWebServer7-base/bin/wadm get-config-file --config=configName
obj.conf > /tmp/obj.confCommon command options are documented in Table 7-7.
- Modify magnus.conf and obj.conf files as specified in 3rd party NSAPI plugin documentation.
- Import the magnus.conf and obj.conf configuration files from the temporary directory.
WebServer7-base/bin/wadm set-config-file --config=configName
--upload-file=/tmp/magnus.conf magnus.confWebServer7-base/bin/wadm set-config-file --config=configName
--upload-file=/tmp/obj.conf obj.confCommon command options are documented in Table 7-7.
- Redeploy the modified configuration to the relevant Web Server instances.
WebServer7-base/bin/wadm deploy-config
[--force] [--restart] [--no-reconfig]
configNameCommand options are documented in Table 7-11.
Changing the search collection document root
The migrate-server command has an option for migrating search collection information, however you might want to change the search collection document root, as follows:
- If the document root for the search collection is different from that used for Release 4, use the following command to set the document root for the search collection:
WebServer7-base/bin/wadm set-search-collection-prop --config=configName --vs=virtualServerName --collection-name=searchCollectionName document-root=new docroot path for the search collection
Common command options are documented in Table 7-7. Options specific to the set-search-collection-prop command are documented in the following table.
- Redeploy the configuration to the relevant Web Server instances.
WebServer7-base/bin/wadm deploy-config
[--force] [--restart] [--no-reconfig]
configNameCommand options are documented in Table 7-11.
Customizing command-line scripts
If scripts such as startsvr, startsvr.bat, stopsvr, stopsvr.bat, restart, reconfig, and reconfig.bat have been customized, then you will have to perform the same customizations on the Release 5 default scripts, located in the following directory: WebServer7-base/bin.
Rolling Back the Upgrade
Release 4 Web Server was left intact by the fresh installation of Release 5 and subsequent migration of Web Server instance configurations. Hence, the rollback of Release 5 Web Server consists of the following steps for reverting back to Release 4.
- Log in as root or become superuser.
su -
- Stop all running Web Server instance one by one.
WebServer7Config-base/https-configName/bin/stopserv
If the server was stopped properly then you will see a message “server has been shutdown”.
- Remove the Release 5 Web Server installation.
You have to remove all Release 5 instances and migrated configurations:
- Restart the Web Server instances that were stopped when upgrading Web Server, as described in Upgrade Procedure.
Upgrading Web Server from Java ES Release 3The procedure for upgrading Java ES 2005Q1 (Release 3) Web Server to Release 5 is the same as that for upgrading Release 4 Web Server to Release 5.
To upgrade Release 3 Web Server to Release 5, use the instructions in Upgrading Web Server from Java ES Release 4, except substitute Release 3 wherever Release 4 is referenced.
Upgrading Web Server from Java ES Release 2The procedure for upgrading Java ES 2004Q2 (Release 2) Web Server to Release 5 is the same as that for upgrading Release 4 Web Server to Release 5.
To upgrade Release 2 Web Server to Release 5, use the instructions in Upgrading Web Server from Java ES Release 4, except substitute Release 2 wherever Release 4 is referenced.
Note
If you are upgrading from Release 2 Web Server on the Linux platform, then you will have to perform a dual upgrade, in which both Web Server and the operating system are upgraded (Release 5 Web Server is not supported on RHEL 2.1). See Dual Upgrade for more information.