Sun Cluster 3.1 Data Service for Sun ONE Application Server Guide

How to Install and Configure the Sun ONE Application Server

  1. Become superuser on a cluster member.

  2. Determine if you are installing the Sun ONE Application Server on Solaris 8.

    • If no, proceed to Step 4.

    • If yes, perform the following operations:

    1. Run the setup command from the install directory for the Sun ONE Application Server on all cluster nodes.

    2. Provide the default location for Sun ONE Application Server instances at the setup command prompt.

      Place the server configuration directory on a local filesystem by using the default directory, /var/opt/SUNWappserver7. When you create server instances that are managed by Sun Cluster, specify a path to the global file system or HAStoragePlus file system. Ensure that all potential masters of a Sun ONE Application Server instance have access to the Sun ONE Application Server instance configuration files.


      Note –

      The domain created by the setup command cannot be used by Sun Cluster.


  3. If you are installing the Sun ONE Application Server on Solaris 8, proceed to Step 5.

  4. If you are installing the Sun ONE Application Server packaged with Solaris 9, perform the following operations:

    1. Install the Sun ONE Application Server packages on all the nodes of the cluster.

    2. Identify a location on a global file system where you intend to keep the application server configuration files.

      You can create a separate directory for this file system.

  5. (Optional) On all nodes, create a link to the server configuration directory on the global file system from the default configuration directory.

    You can either create a link to the server configuration directory or specify the full path to the location on the global file system when you create the Sun ONE Application Server domains in Step 8.


    [To create a link for the Sun ONE Application Server packaged with Solaris 9]
    # ln -s /var/appserver /global/appserver
    
    [To create a link for the unpackaged Sun ONE Application Server]
    # ln -s /var/opt/SUNWappserver7 /global/appserver
    
  6. If you are installing the Sun ONE Application Server on Solaris 8, proceed to Step 8.

  7. If you are installing the Sun ONE Application Server packaged with Solaris 9, perform the following operations on all nodes:

    1. List the Sun ONE Application Server run control scripts.


      # ls -1 /etc/rc?.d/*appserv
      /etc/rc0.d/K05appserv
      /etc/rc1.d/K05appserv
      /etc/rc2.d/K05appserv
      /etc/rc3.d/S84appserv
      /etc/rcS.d/K05appserv
    2. Rename the Sun ONE Application Server run control scripts.

      Renaming the run control scripts disables the START and STOP run control scripts that you installed as part of the SUNWasr package (or the SUNWasro package if the unbundled Sun ONE Application Server was installed). This step is necessary because Sun Cluster HA for Sun ONE Application Server starts and stops the Sun ONE Application Server instances after you have configured the data service.


      # mv /etc/rc0.d/K05appserv  /etc/rc0.d/k05appserv
      # mv /etc/rc1.d/K05appserv  /etc/rc1.d/k05appserv
      # mv /etc/rc2.d/K05appserv  /etc/rc2.d/k05appserv
      # mv /etc/rc3.d/S85appserv  /etc/rc3.d/s85appserv
      # mv /etc/rcS.d/K05appserv  /etc/rcS.d/k05appserv

      Note –

      The preceding example changes the first letter in the name of the run control script from uppercase to lowercase. However, you can rename the scripts to be consistent with your normal administration practices.


    3. Verify that all of the Sun ONE Application Server run control scripts have been renamed.


      # ls -1 /etc/rc?.d/*appserv
      /etc/rc0.d/k05appserv
      /etc/rc1.d/k05appserv
      /etc/rc2.d/k05appserv
      /etc/rc3.d/s85appserv
      /etc/rcS.d/k05appserv
  8. Create a domain with configuration information on the global file system.


    # asadmin create-domain --path /global/appserver --adminport=4848 \
    --adminuser admin --adminpassword password scdomain
    
  9. Start the domains administrative server.


    # /global/appserver/domains/scdomain/admin-server/bin/startserv
    
  10. Create new application servers to be made highly available by using the administrative server.

  11. Create a log directory on the local disk for each node that the Sun ONE Application Server uses.

    For the Sun ONE Application Server to work correctly, the log directory must be located on each node of the cluster, not on the cluster file system. Choose a location on the local disk that is the same for all the nodes in the cluster.


    schost-1# mkdir -p /var/pathname/domain/instance/logs/
    

    Note –

    If you anticipate large log files, ensure that the file system containing the directory has enough space to handle the files.


  12. Change the location of the Sun ONE Application Server PidLog to reflect the directory that you created in Step 11. To change the location, edit the init.conf file located in the server configuration directory.

  13. Change the location of PID_FILE in the stopserv file to match the value of PidLog that you set in Step 12.

  14. Change the location of the Log File, Log Root, and Transaction Log Location parameters to reflect the directory that you created in Step 11. To change these parameters, use the Sun ONE Application Server Administrative Interface. See “Configuring the Log Service” in Sun ONE Application Server 7 Collection (Solaris Edition) Administrator's Guide for instructions.

  15. Change the location of the accesslog parameter to reflect the directory that you created in Step 11. To change this parameter, use the asadmin utility. The following is an example of the asadmin command used to change the location of accesslog. See Sun ONE Application Server 7 Administrator's Guide for additional instructions.


    % asadmin
    asadmin> set server1.virtual-server.server1.property.accesslog=
    "/var/pathname/domain/instance/logs/accesslog"
  16. Ensure that any logical hostnames that the application server uses are configured and are online.

  17. If the application server is configured as a failover service, configure the HTTP listener IP address with the logical IP address and the server name with the logical hostname. If the application server is configured as a service mastered on multiple nodes, proceed to Step 18.

    This operation must be performed on the primary node of the logical host.

  18. Verify that the HTTP listener is returning the correct server name.

    The correct server name is usually the hostname that clients will use to access the resources on the application server.

  19. If the application server is configured as a failover service, configure the IIOP listener with the logical IP address for the Sun Cluster HA for Sun ONE Application Server. If the application server is configured as a service mastered on multiple nodes, proceed to Step 20.

    If the administrative server is to be made highly available, configure only the HTTP listener, the administrative server does not have an IIOP listener.

  20. Disable the Sun ONE Application Server startup of the Message Queue server by unchecking Start Enable for the services under JMS.

  21. Start the application server by issuing the startserv command.


    # /global/appserver/domains/scdomain/server1/bin/startserv
    

    If the server does not start, correct the problem. See the Sun ONE Application Server 7 documentation for details.

  22. Stop the application server by issuing the stopserv command.


    # /global/appserver/domains/scdomain/server1/bin/stopserv
    

    You must stop the server before you proceed to the next part of the installation and configuration process.