2.2 WebSphere Application Server V5.0 Base installation

 < Day Day Up > 



2.2 WebSphere Application Server V5.0 Base installation

This section covers the installation of WebSphere Application Server V5.0 Base edition.

2.2.1 Installing WebSphere Application Server V5.0 Base

This section covers the installation of WebSphere Application Server. It has step-by-step instructions on how to install WebSphere Application Server with the least amount of configuration.

When you install WebSphere Application Server, X-windows must be running. In this case, VNC is running to display GUI install wizards. You can download the VNC viewer from the following site:

http://www.realvnc.com/

To install WebSphere Server, perform the following steps:

  1. Log in as root.

  2. Start VNC Server using the following command:

     # vncserver :1 

    The " :1" represents the session ID.

    If the password is required, you can enter any password. Use this password when you start the VNC viewer.

  3. Connect to the VNC server from the client.

    1. Double-click the VNC viewer icon (Figure 2-1).


      Figure 2-1: The VNC Viewer icon

    2. The Connection details window appears (Figure 2-2). Enter the host name of Linux and the session ID which you enter in stating the VNC Server. Click OK. Enter the VNC password you specified in step 2.

      click to expand
      Figure 2-2: Entering the host name and the session ID

  4. The X desktop appears. Insert and mount the WebSphere Application Server V5 CD-ROM on the X desktop:

     # mount /mnt/cdrom 

  5. Start the WebSphere Application Server LaunchPad:

     # cd /mnt/cdrom # ./LaunchPad.sh 

    Note 

    If you install WebSphere Application Server with a .tar file, you can use the tar command to extract all the files, and the cd /linuxppc/ and ./LaunchPad.sh commands.

       # tar -xvf c51vfml.tar   # cd /linuxppc   # ./LaunchPad.sh 

  6. In the language selection window, select your language and click OK. We chose English.

  7. In the WebSphere Application Server LaunchPad window, click Install the product, as shown in Figure 2-3.

    click to expand
    Figure 2-3: Click Install the product on the LaunchPad

  8. In the wizard language selection window, pick your language and click OK. We chose English.

  9. In the Welcome to Websphere Application Server window, click Next.

  10. In the Open SSL acceptance window, select Yes and click Next as shown in Figure 2-4.

    click to expand
    Figure 2-4: Accepting the Open SSL license

  11. In the software licence agreement window, select I accept the terms in the license agreement and click Next to agree to the terms of the agreement as shown in Figure 2-5.

    click to expand
    Figure 2-5: Accepting the software license agreement

  12. In the setup type window, select the specific type and click Next. We chose the Full type as shown in Figure 2-6.

    click to expand
    Figure 2-6: Selecting the Full setup type

    • Full: All of the features are installed.

    • Custom: You can select the specific features to install.

    If you select the Custom type, the window shown in Figure 2-7 appears. This is where you specify the features to install.

    click to expand
    Figure 2-7: Selecting the specific features on the Custom window

  13. In the next window you can change the installation path for the WebSphere Application Server and IBM HTTP Server as shown in Figure 2-8. We recommend that you use the default directories to keep things simple.

    click to expand
    Figure 2-8: Setting the installation directories

  14. In the next window, enter the node name and host name for your installation, as shown in Figure 2-9. We used the default names. The node name is automatically picked up by the host name of the Linux, and the host name is automatically picked up by the hosts file (/etc/hosts). You can see that the host name of our system is linux, and linux.local (host_name.domain_name) is listed in the hosts file. If you have the specific domain name, that domain name should show up.

    click to expand
    Figure 2-9: Setting the node name and host name

  15. In the next window, verify your installation on settings, and click Next to start the installation as shown in Figure 2-10.

    click to expand
    Figure 2-10: Verifying the selected features

  16. In the next window, deselect Register this product now and click Next as shown in Figure 2-11.

    click to expand
    Figure 2-11: Uncheck the register option

  17. Once the installation is completed, click Finish as shown in Figure 2-12.

    click to expand
    Figure 2-12: Finishing the installation wizard

  18. After WebSphere Application Server V5 is successfully installed, the First Steps window automatically starts. To manually start the First Steps window, use the following command:

     # /opt/WebSphere/AppServer/bin/firststeps.sh 

2.2.2 Verifying the successful installation

You can confirm that WebSphere Application Server V5 is installed correctly in the First Steps window.

  1. Click Start the server as shown in Figure 2-13.

    click to expand
    Figure 2-13: Starting the server in the First Steps Window

    You should see the following messages in the console message screen area at the bottom of the First Steps window:

     ADMU0116: Tool information is being logged in file: /opt/WebSphere/AppServer/logs/server1/startServer.log ADMU3200: Reading configuration for server: server1 ADMU2300: Server Launched. Waiting for initialization status. ADMU3000: Server server1 open for e-business; process id id XXXXX 

    The message you want to pay attention to is the last line, which indicates "Server server1 open for e-business."

  2. Click Verify installation.

    If WebSphere Application Server V5 is installed correctly, you get the message shown in Figure 2-14 on the console message screen area of the First Steps window.

    start figure

     IVTL0095I: defaulting to host linux and port 9080 IVTL0010I: Connecting to the WebSphere Application Server linux on port: 9080 IVTL0015I: WebSphere Application Server linux is running on port:9080 IVTL0050I: Servlet Engine Verification Status - Passed IVTL0055I: JSP Verification Status - Passed IVTL0060I: EJB Verification Status - Passed IVTL0070I: IVT Verification Succeeded IVTL0080I: Installation Verification is complete 

    end figure

    Figure 2-14: Messages in verifying installation

  3. Access Websphere Application Server through the embedded HTTP Server. The Embedded HTTP Server is a product feature which is the HTTP handling capability embedded within the Application Server. The Embedded HTTP Server enables an HTTP client to connect directly to an Application Server. This feature is very useful to test connecting to the WebSphere Application Server.

    1. Verify the status of the Websphere Application Server using the ./serverStatus.sh -all command. If you get the message shown in Figure 2-15, go to the next step. This message means that the server is active.

      start figure

       linux:/opt/WebSphere/AppServer/bin #./serverStatus.sh -all ADMU0116I: Tool information is being logged in file            /opt/WebSphere/AppServer/logs/serverStatus.log ADMU0500I: Retrieving server status for all servers ADMU0505I: Servers found in configuration: ADMU0506I: Server name: server1 ADMU0508I: The Application Server "server1" is STARTED 

      end figure

      Figure 2-15: Verify the server status

      If it's inactive, start the server using the command ./startServer.sh -all as shown in Figure 2-16.

      start figure

       linux:/opt/WebSphere/AppServer/bin # ./serverStatus.sh -all ADMU0116I: Tool information is being logged in file            /opt/WebSphere/AppServer/logs/serverStatus.log ADMU0500I: Retrieving server status for all servers ADMU0505I: Servers found in configuration: ADMU0506I: Server name: server1 ADMU0509I: The Application Server "server1" cannot be reached. It appears to be stopped. linux:/opt/WebSphere/AppServer/bin # ./startServer.sh server1 ADMU0116I: Tool information is being logged in file            /opt/WebSphere/AppServer/logs/server1/startServer.log ADMU3100I: Reading configuration for server: server1 ADMU3200I: Server launched. Waiting for initialization status. ADMU3000I: Server server1 open for e-business ;process id is 1357 

      end figure

      Figure 2-16: Verifying the server status and starting the application server

      Tip 

      To start and stop the server, two shell scripts are available in the <WAS_HOME>/bin directory.

      • startServer.sh

        The command to start server1 is:

         /opt/WebSphere/AppServer/bin/startServer.sh server1 

      • stop.Server.sh

        The command to stop server1 is:

         /opt/WebSphere/AppServer/bin/stopServer.sh server1 

      You can execute startServer.sh -help or stopServer.sh -help to get a list of valid options.

    2. Start your Web browser and open the following URL:

      http://host_name:9080/snoop

      The browser should display the snoop servlet page as shown in Figure 2-17. It means you can access the application server through WebSphere Application Server's embedded Web server.

      click to expand
      Figure 2-17: Snoop- Access through the embedded Web server

    3. Once the WebSphere Application Server is up and running, you can launch the Administrative Console. To open the Administrative Console, start your Web browser and enter the following URL:

      http://host_name:9090/admin

    4. The login window appears as shown in Figure 2-18. Enter any user ID and click OK.

      click to expand
      Figure 2-18: Logging in to the Administrative Console

      WebSphere Application Server security is not enabled yet, so we can enter any User ID to log in to the Administrative Console.

    5. The window shown in Figure 2-19 appears after login.

      click to expand
      Figure 2-19: Access the Administrative Console through the embedded HTTP Server

    6. Expand Servers Application Servers in the left pane. The window shown in Figure 2-20 on page 30 appears; you can see server1 on the list of Application Servers.

      click to expand
      Figure 2-20: Application Servers- server1

2.2.3 Configuring WebSphere Application Server

This section describes how to configure WebSphere Application Server.

You can use IBM HTTP Server (which comes with WebSphere Application Server V5.0.2) or Apache provided by a Linux distribution as the Web server. An HTTP client connects to a Web server, and the HTTP plug-in forwards the request to the WebSphere Application Server. Refer to "Software requirements" on page 8 for details about the Web servers supported by WebSphere Application Server V5.0.2 for Power Linux on iSeries.

_his section covers accessing WebSphere Application Server though IBM HTTP Server, which is external to WebSphere Application Server as compared to internal Embedded HTTP Server, as shown in Figure 2-19. In this case, you need to install IBM HTTP Server and IBM HTTP Server plug-in.

click to expand
Figure 2-21: Access WebSphere Application Server through IBM HTTP Server

Note 

The port number doesn't have to be port 80; any port number will do. We use port 80 just because it is the most common number. You can customize the port by editing the httpd.conf file.

Configuring the IBM HTTP Server

Perform the following steps to configure the IBM HTTP Server:

  1. Verify the status of IBM HTTP Server using the command:

     # ps -ef | grep httpd 

    If you get the response shown in Figure 2-22, you need to stop IBM HTTP Server. Go to the next step.

    start figure

     linux:~ # ps -ef | grep httpd root       791     1  0 07:51 tty1      00:00:02 Xvnc :1 -desktop X -httpd /usr/share/vnc/classes -auth /root/.Xaut root      1029     1 28 07:58 ?        00:00:06 /opt/IBMHttpServer/bin/httpd -d /opt/IBMHttpServer nobody    1030  1029  0 07:58 ?        00:00:00 /opt/IBMHttpServer/bin/httpd -d /opt/IBMHttpServer nobody    1031  1029  0 07:58 ?        00:00:00 /opt/IBMHttpServer/bin/httpd -d /opt/IBMHttpServer nobody    1032  1029  0 07:58 ?        00:00:00 /opt/IBMHttpServer/bin/httpd -d /opt/IBMHttpServer nobody    1033  1029  0 07:58 ?        00:00:00 /opt/IBMHttpServer/bin/httpd -d /opt/IBMHttpServer nobody    1034  1029  0 07:58 ?        00:00:00 /opt/IBMHttpServer/bin/httpd -d /opt/IBMHttpServer root      1045   760  0 07:58 tty1     00:00:00 grep httpd 

    end figure

    Figure 2-22: Verifying the status of IBM HTTP Server

  2. Use the /opt/IBMHttpServer/bin/apachectl stop command to stop the IBM HTTP Server.

  3. Open /opt/IBMHttpServer/conf/httpd.conf file in an editor, for example:

     # cd /opt/IBMHttpServer/conf # vi httpd.conf 

  4. Modify the httpd.conf file to update the value of the ServerName keyword as the fully qualified host name, as shown in Figure 2-23.

    start figure

     # ServerName allows you to set a host name which is sent back to clients for # your server if it's different than the one the program would get (i.e., use # "www" instead of the host's real name). # # Note: You cannot just invent host names and hope they work. The name you # define here must be a valid DNS name for your host. If you don't understand # this, ask your network administrator. # If your host doesn't have a registered DNS name, enter its IP address here. # You will have to access it by its address (e.g., http://123.45.67.89/) # anyway, and this will make redirections work in a sensible way. # #ServerName your.machine.com ServerName linux 

    end figure

    Figure 2-23: Putting your host name on /opt/IBMHttpServer/conf/httpd.conf

    1. Type ' i ' to change the insert mode.

    2. Add your host name. If you have a domain name, enter the fully qualified host name.

  5. Save your changes.

    1. Press the Esc key and enter :wq as shown in Figure 2-24.

      start figure

       # ServerName allows you to set a host name which is sent back to clients for # your server if it's different than the one the program would get (i.e., use # "www" instead of the host's real name). # # Note: You cannot just invent host names and hope they work. The name you # define here must be a valid DNS name for your host. If you don't understand # this, ask your network administrator. # If your host doesn't have a registered DNS name, enter its IP address here. # You will have to access it by its address (e.g., http://123.45.67.89/) # anyway, and this will make redirections work in a sensible way. # #ServerName your.machine.com ServerName linux # :wq 

      end figure

      Figure 2-24: Typing -wq to save your IBM HTTP Server configuration

  6. Start the IBM HTTP Server using the following command:

     # /opt/IBMHttpServer/bin/apachectl start 

  7. Start your Web browser and open the following URL:

    http://host_name/snoop

    The browser should display the snoop servlet page as shown in Figure 2-25. It means you can access the application server through your Web server. In this case, you access it through IBM HTTP Server.

    click to expand
    Figure 2-25: Snoop- Accessing through your Web server

Working with the sample applications

To verify the correct configuration, run the sample applications provided by WebSphere Application Server V5.

  1. If you installed the Application Server Samples, access the following URL:

    http://host_name/WSsamples/en/index.html

  2. Run the applications by clicking the menus on the navigation bar. For example:

    1. Click Java Pet Store as shown in Figure 2-26.

      click to expand
      Figure 2-26: Verifying the connectivity using the sample application

    2. On the next window, click Run as shown in Figure 2-27.

      click to expand
      Figure 2-27: Click Run to run the Pet Store application

    3. A new window opens. Click the enter the store link as shown in Figure 2-28. The PetStore application runs as shown in Figure 2-29.

      click to expand
      Figure 2-28: Click "enter the store" to start the PetStore application

      click to expand
      Figure 2-29: The PetStore application

Using a specific port number

This section covers how to configure the WebSphere Application Server when you access applications with the non-default port number on the URL.

A client request for a servlet, JavaServer Pages (JSP) file, or related resource contains a Domain Name Server (DNS) alias and a Uniform Resource Indicator (URI) that is unique to that resource. For example, consider the URL request :8080/snoop">http://<host_name>:8080/snoop. In this example, <host_name>:8080 is the DNS alias (which is called Host Alias), and snoop is the URI. When no port number is specified in the URL request, the default port 80 is used.

When a client request for a servlet, JSP file, or related resource is received, the DNS alias is compared to the list of all known host aliases to locate the correct virtual host. Also, the URI is compared to the list of all known URIs to locate the correct resource. If a matching virtual host or URI is not found, an error is returned to the browser.

You can configure the application server to locate the correct virtual host and the correct resources with the specific port number, and you can separate all your applications into groups.

The topics in this section are:

  • Configuring a virtual host

  • Updating Web server plug-in configuration

  • Editing httpd.conf to configure the HTTP server

Configuring a virtual host

A virtual host works like a filter. It is used by the WebSphere plug-in to determine whether an HTTP request should be handled by WebSphere Application Server or not. A virtual host consists of one or more DNS aliases (host aliases). Each host alias consists of a host name and a port number. If an asterisk (*) is specified as a host name, it means that all host names and IP addresses will be valid for this host alias.

Note 

Two default virtual hosts exist for each application server: default_host and admin_host. Table 2-2 shows the default port number used by each virtual host.

Table 2-2: Default virtual host names and host ports

Virtual host

host name

port

HTTP server

default_host

*

80

external HTTP server

*

9080

internal HTTP server

admin_host

*

9090

Administrative Console

*

9043

Administrative Console via SSL

  • default_host is used for the user applications that are deployed to the application server.

  • admin_host is used for the WebSphere Administrative Console.

This section covers how to update the default_host virtual host; any other virtual host is updated the same way. Perform the following steps to update the default_host virtual host:

  1. To open the Administrative Console, start your Web browser and enter the following URL:

    http://host_name:9090/admin

  2. The login window appears as shown in Figure 2-18. Enter any user ID and click OK.

  3. Expand Environment in the left navigation pane, and click Virtual Hosts. The resulting screen is shown in Figure 2-30.

    click to expand
    Figure 2-30: Click Virtual Hosts after expanding Environment

  4. Click default_host.

  5. Click Host Aliases as shown in Figure 2-31.

    click to expand
    Figure 2-31: Click Host Aliases

  6. In the Host Aliases list, click New to add your specific port number, as shown in Figure 2-32. Port 80 is allocated for the external HTTP server, and port 9080 is the application server's internal HTTP port.

    click to expand
    Figure 2-32: Click * in the row of port 80

  7. Set the Host Name and the port number to the desired value and click OK. We set Host Name to * (which means any value is allowed), and the Port to 50001.

    click to expand
    Figure 2-33: Set the Host Name (*) and the port number (50001)

  8. Click Save, as shown in Figure 2-34. You must save each time you change a configuration setting.

    click to expand
    Figure 2-34: Click Save after changing your configuration

  9. Click Save to save your changes to the master configuration as shown in Figure 2-35.

    click to expand
    Figure 2-35: Click Save to save your changes to the master confutation

  10. After changing the configuration, regenerate the WebSphere plug-in configuration file. (This procedure is described in the next section.)

    Important: 

    Every time you change a virtual host, the application server and corresponding HTTP server must be restarted.

  11. To use the specific port number on the browser, you need to change the Listen port number in the configuration file of your HTTP server. (This procedure is described in "Editing httpd.conf to configure the HTTP server" on page 44).

Updating Web server plug-in configuration

Changing certain WebSphere configuration properties makes it necessary to regenerate the Web Server plug-in configuration.

The HTTP Server and Application Server communicate using the WebSphere HTTP plug-in for the HTTP server. The HTTP plug-in uses an easy-to-read XML configuration file to determine whether a request should be handled by the Web server or the Application Server.

Note 

You need to update the Web Server plug-in configuration whenever you:

  • Install or remove an enterprise application

  • Add or remove servlets and mappings from a particular application

  • Change the configuration for the plug-in, a virtual host, or a transport.

Use the following steps to update the Web Server plug-in.

  1. From the Administrative Console, select Environment Update Web Server Plugin in the navigation tree as shown in Figure 2-36.

    click to expand
    Figure 2-36: Accessing the Update Web server plugin

  2. Click OK. You should get the message shown in Figure 2-37.

    click to expand
    Figure 2-37: The confirmation message after saving the configuration

  3. Click the link to view the current WebSphere plug-in configuration file (/opt/WebSphere/AppServer/config/cells/plugin-cfg.xml). Confirm that your configuration was updated on the file shown in Figure 2-38.

    start figure

     <?xml version="1.0" encoding="ISO-8859-1"?> <Config ASDisableNagle="false" IISDisableNagle="false"     IgnoreDNSFailures="false" RefreshInterval="60" ResponseChunkSize="64">     <Log LogLevel="Error" Name="/opt/WebSphere/AppServer/logs/http_plugin.log"/>     <Property Name="ESIEnable" Value="false"/>     <Property Name="ESIMaxCacheSize" Value="1024"/>     <Property Name="ESIInvalidationMonitor" Value="false"/>     <VirtualHostGroup Name="default_host">         <VirtualHost Name="*:9080"/>         <VirtualHost Name="*:80"/>         <VirtualHost Name="*:9443"/>         <VirtualHost Name="*:50001"/>     </VirtualHostGroup> ........... 

    end figure

    Figure 2-38: Confirming Virtual host Name 80 50001

Note 

From the command line, use the following script to update the Web server plug-in:

 # <WAS_HOME>/bin/GenPluginCfg.sh 

Editing httpd.conf to configure the HTTP server

To use the specific port number you changed or added on the HTTP server, you need to add the Listen port on the configuration file (httpd.conf) of the HTTP server. The steps to configure the IBM HTTP server:

  1. Open the /opt/IBMHttpServer/conf/httpd.conf file in an editor, for example:

     # cd /opt/IBMHttpServer/conf/ # vi httpd.conf 

  2. Search for the keyword Listen using the vi editor by typing :/Listen.

  3. Enter i to change the insert mode.

  4. Add the Listen port that you set on the virtual host, as shown in Figure 2-39.

    start figure

     # The following Listen directive is really only needed if you have # another Listen directive enabled in the config file, but it # does not cause harm to have it in anyway. Listen 80 Listen 50001 

    end figure

    Figure 2-39: Adding the line Listen 50001

  5. To save your changes, press the Esc key and enter :wq.

  6. Restart the HTTP server using the following command:

     # /opt/IBMHttpServer/bin/apachectl restart 

Verifying your configuration

To verify that your configuration works correctly, connect to the application server with the specific port number using the following steps:

  1. Start your Web browser and open the following URL:

    http://host_name:your_port_number/snoop

  2. If the browser displays the Snoop Servlet page shown in Figure 2-40, you accessed the application correctly with your configuration.

    click to expand
    Figure 2-40: Successful connection with the specific port number



 < Day Day Up > 



Websphere for Linux on Iseries. Implementation Guide
Websphere for Linux on Iseries: Implementation Guide
ISBN: 0738498955
EAN: 2147483647
Year: 2003
Pages: 56
Authors: IBM Redbooks

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net