InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.41: Administering WebSphere administrative domains (overview) >
6.6.41.5: Establishing multiple administrative domains on a machine

6.6.41.5: Establishing multiple administrative domains on a machine

This procedure describes how to install multiple WebSphere 4.0 domains on the same physical machine and allow them to run concurrently. This configuration is useful for allowing developers or testers to isolate their WebSphere domain from other WebSphere administrative domains on the same machine. It also provides the ability to make changes to the overall domain without affecting other domains.

The procedure describes how to set up this configuration using examples from Solaris 8 and Windows NT. The Solaris examples can be extrapolated to other UNIX operating systems supported by IBM WebSphere Application Server. It is intended for experienced administrators who need to setup and maintain multiple WebSphere instances on multiprocessor servers.

The UNIX configuration used in this document is:

  • Hardware: Sun Ultra 80 4x300MHz with 1024 MB of RAM
  • Operating system: Sun Solaris 8
  • Database: IBM DB2 Version 7.1.0.43
  • Web Server: IBM HTTP Server 1.3.19.0

The Windows NT configuration used in this document is:

  • Hardware: Dual 400 MHz Pentium II Netfinity with 650 MB of RAM
  • Operating system: Windows NT 4.0 Service Pack 6a
  • Database: IBM DB2 Version 7.1.0.43
  • Web Server: IBM HTTP Server 1.3.19.0

Overview:

  1. Install and configure separate HTTP servers and their WebSphere plug-ins
  2. Run the WebSphere installation twice with the appropriate configuration information.
  3. Change the default ports for the bootstrap service, LSD service, and Trace Service.
  4. Adjust the port values to eliminate conflicts.
  5. Start the servers in the configuration.
  6. Test each Web server and application server combination.
Install the first Web server instance

Install the Web server as you usually would, making note of:

  • The port on which the Web server is listening. Look for the port line in the httpd.conf file.
  • The path in which the Web server is installed

Note, IBM HTTP Server is available during IBM WebSphere Application Server installation, which is the next step.

Install the first IBM WebSphere Application Server instance

See the InfoCenter PDF view for case-specific installation documents, and section 2 for more information.

Make note of:

  • The path in which IBM WebSphere Application Server is installed, such as:
    AIX:            /opt/WebSphere/AppServer40a
    Windows NT:     C:\WebSphere\AppServer40a
    
Test the single instance setup

  1. Start the Web server. Ensure it is working.
  2. Start the WebSphere Application Server product.
  3. Start the administrative console.
  4. Start the application server.
  5. View the HTTP transport properties.
  6. Record the port numbers on which the Web container HTTP transport is listening, for future reference.

  7. Try to access the "snoop servlet" for verification:
    http://HTTP_Server_hostname/servlet/snoop
    

    This confirms that the "one instance" setup has basic functionality.

  8. Stop the Web server.
  9. Stop the application server.
Install the second Web server instance

To install the second instance of the Web server, you need either to create a new Web server instance using the Web server configuration application, as used by Netscape Enterprise Server, or to make copies of the necessary configuration files and hand edit them inserting appropriate values, as is necessary when using IBM Web server or Apache Server.

In this example, we will hand edit the configuration files, because we are using IBM Web server.

  1.   Perform this step if using Windows NT. Otherwise, skip this step.

    To install a second copy of the IBM HTTP Server on Windows NT, first you must remove an entry in the Windows Registry so the install program does not detect the already installed version.

    1. Start regedit
    2. Carefully, remove just this one key:
      My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\IBM\HTTP Server
      

    REVIEWERS: The NT version of these instructions did not include the following - or any steps for installing the 2nd Web server installation (just preparing to install it. Does the following apply to NT? (I imagine it would).

  2. Copy the httpd.conf and apachectl files in their corresponding directories, such as:
    httpd.conf copy to httpd2.conf
    apachectl copy to apachectl2
    
  3. Edit the httpd2.conf file. Change the values slightly (such as adding 2 to their values).

    • Change the port to an unused port, such as: Port 81
    • Change the error log, such as (for Solaris): ErrorLog /opt/IBMHTTPD/logs/error_log2
    • Change the custom log, such as (for Solaris): CustomLog /opt/IBMHTTPD/logs/access_log2 common
    • Change the pid file, such as (for Solaris): PidFile /opt/IBMHTTPD/logs/httpd2.pid
    • Change the score board file, such as (for Solaris): ScoreBoardFile /opt/IBMHTTPD/logs/httpd2.scoreboard
  4. Save the httpd2.conf file.
  5. Open the apachectl2 file in a text editor and make similar changes. For example, for Solaris:

    • PIDFILE=/opt/IBMHTTPD/logs/httpd2.pid
    • HTTPD='/opt/IBMHTTPD/bin/httpd -f /opt/IBMHTTPD/conf/httpd2.conf'
    (Note the single quotation marks in the HTTPD command).
  6. Save the apachectl2 file.
Install the second WebSphere Application Server instance

Install the second WebSphere Application Server, with these notes:

  • Use the Custom installation option.
  • Skip the migration assistant if it is present.
  • Do not "Backup and Uninstall" the previous version.
  • When the installion notifies you that it has found another copy of WebSphere 4.0, simply click OK to continue.
  • Do not install the Web server or the database.
  • Install the appropriate Web server plug-in.
  • For Advanced Edition (non-Single Server), name the database something unique, such as "was40b" if the first installation's database was "was40a."
  • For the Destination Directory, enter a unique directory for this instance, such as (for Solaris): /opt/WebSphere/AppServer40b
  •   The installation program will only accept a file named httpd.conf when it asks the location of the httpd.conf file. To get past this correctly, move the httpd.conf file to httpd.confA and move httpd2.conf to httpd.conf.

    After the installation program updates the httpd.conf file, move the files back to their original names, httpd.conf and httpd2.conf.

Test the second instance installation, just as you did with the first instance to verify that each set of HTTP/AppServer functions correctly alone. (Note, you might need to restart the Web server to have it read in the plugin-cfg.xml file.)

Adjust the port values to eliminate conflicts

With the configuration as it stands, you can run each HTTP Server and Application Server combination separately, but you cannot run both instances concurrently due to conflicting ports.

To allow both instances to run at the same time, edit the port settings.

  1. Edit the server.cfg.xml file with a text editor. Change the ports to unused values. For example:
    • Search for orbSettings and change the bootstrapPort attribute to 901.
    • Search for locationServiceDaemon and change the port attribute to 9001.
    • Search for traceService and change the diagThreadPort attribute to 7001.
  2. Append a new port number to all of the virtual host settings of this instance of WebSphere. This is the value that the corresponding HTTP Server will listen on.

    Change the default ports of the host aliases:

    From *:80 to *:81
    From *:9080 to *:9081
    

    Editing virtual host settings

  3. Edit the server.cfg.xml file with a text editor.

    • Search for VirtualHosts and increment all of the port attributes of the host aliases by 1. (For example, change 9080 to 9081.

    By default there are two VirtualHosts. Be sure to change the ports in both sections. Make sure that you set the values to ports that are free and valid.

  4. Verify that each Web Container port does not conflict with any other Web Container port, both on this instance of WebSphere Application Server and other instances.

    Edit the server.cfg.xml file with a text editor.

    • Search for webContainer and increment all of the transports' port attributes by 1, such as changing 9080 to 9081.

    Make sure this port is free and is valid.

  5.   For Windows NT, change the HTTP server port number from 80 to another valid port number, such as 81, in httpd.conf.
Start the servers in the configuration

To run this configuration, you will need to use a command prompt to startup each Web server and each WebSphere Application Server.

  1.   For Windows NT, stop all of the running Web server and application server services. Set each of the services to manual so that they will not start automatically. The services to set are:
    IBM HTTP Administration
    IBM HTTP Server
    IBM WS AdminServer 4.0
    
  2. Start each Web server.
  3. Start each appliction server by changing directory to the bin directory of each of the two installations and running the startupServer script.
Test each Web server and application server combination

To test that each Web server and application server pair has basic functionality, start the default application server in each WebSphere Application Server instance. Try the following URLs to verify that basic functionality exists:

http://HTTP_server_hostname/servlet/snoop
http://HTTP_server_hostname:81/servlet/snoop
http://HTTP_server_hostname/webapp/examples/HitCount
http://HTTP_server_hostname:81/webapp/examples/HitCount
Additional usage notes

Whenever you add a new Web Container to either instance of WebSphere Application Server, you must make sure that the port number of the Web Container Service does not conflict with another Web Container Service on either instance of WebSphere Application Server.

Go to previous article: Updating administrative domain configurations with the Web console Go to next article: Administering references (overview)

 

 
Go to previous article: Updating administrative domain configurations with the Web console Go to next article: Administering references (overview)