| < Day Day Up > |
|
This section covers the installation of WebSphere Application Server V5.0 Base edition.
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:
Log in as root.
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.
Connect to the VNC server from the client.
Double-click the VNC viewer icon (Figure 2-1).
Figure 2-1: The VNC Viewer icon
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.
Figure 2-2: Entering the host name and the session ID
The X desktop appears. Insert and mount the WebSphere Application Server V5 CD-ROM on the X desktop:
# mount /mnt/cdrom
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 |
In the language selection window, select your language and click OK. We chose English.
In the WebSphere Application Server LaunchPad window, click Install the product, as shown in Figure 2-3.
Figure 2-3: Click Install the product on the LaunchPad
In the wizard language selection window, pick your language and click OK. We chose English.
In the Welcome to Websphere Application Server window, click Next.
In the Open SSL acceptance window, select Yes and click Next as shown in Figure 2-4.
Figure 2-4: Accepting the Open SSL license
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.
Figure 2-5: Accepting the software license agreement
In the setup type window, select the specific type and click Next. We chose the Full type as shown in Figure 2-6.
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.
Figure 2-7: Selecting the specific features on the Custom window
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.
Figure 2-8: Setting the installation directories
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.
Figure 2-9: Setting the node name and host name
In the next window, verify your installation on settings, and click Next to start the installation as shown in Figure 2-10.
Figure 2-10: Verifying the selected features
In the next window, deselect Register this product now and click Next as shown in Figure 2-11.
Figure 2-11: Uncheck the register option
Once the installation is completed, click Finish as shown in Figure 2-12.
Figure 2-12: Finishing the installation wizard
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
You can confirm that WebSphere Application Server V5 is installed correctly in the First Steps window.
Click Start the server as shown in Figure 2-13.
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."
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.
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
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.
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.
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
If it's inactive, start the server using the command ./startServer.sh -all as shown in Figure 2-16.
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
Tip | To start and stop the server, two shell scripts are available in the <WAS_HOME>/bin directory.
You can execute startServer.sh -help or stopServer.sh -help to get a list of valid options. |
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.
Figure 2-17: Snoop- Access through the embedded Web server
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
The login window appears as shown in Figure 2-18. Enter any user ID and click OK.
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.
The window shown in Figure 2-19 appears after login.
Figure 2-19: Access the Administrative Console through the embedded HTTP Server
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.
Figure 2-20: Application Servers- server1
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.
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. |
Perform the following steps to configure the IBM HTTP Server:
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.
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
Use the /opt/IBMHttpServer/bin/apachectl stop command to stop the IBM HTTP Server.
Open /opt/IBMHttpServer/conf/httpd.conf file in an editor, for example:
# cd /opt/IBMHttpServer/conf # vi httpd.conf
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.
# 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
Type ' i ' to change the insert mode.
Add your host name. If you have a domain name, enter the fully qualified host name.
Save your changes.
Press the Esc key and enter :wq as shown in Figure 2-24.
# 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
Start the IBM HTTP Server using the following command:
# /opt/IBMHttpServer/bin/apachectl start
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.
Figure 2-25: Snoop- Accessing through your Web server
To verify the correct configuration, run the sample applications provided by WebSphere Application Server V5.
If you installed the Application Server Samples, access the following URL:
http://host_name/WSsamples/en/index.html
Run the applications by clicking the menus on the navigation bar. For example:
Click Java Pet Store as shown in Figure 2-26.
Figure 2-26: Verifying the connectivity using the sample application
On the next window, click Run as shown in Figure 2-27.
Figure 2-27: Click Run to run the Pet Store application
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.
Figure 2-28: Click "enter the store" to start the PetStore application
Figure 2-29: The PetStore application
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
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.
|
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:
To open the Administrative Console, start your Web browser and enter the following URL:
http://host_name:9090/admin
The login window appears as shown in Figure 2-18. Enter any user ID and click OK.
Expand Environment in the left navigation pane, and click Virtual Hosts. The resulting screen is shown in Figure 2-30.
Figure 2-30: Click Virtual Hosts after expanding Environment
Click default_host.
Click Host Aliases as shown in Figure 2-31.
Figure 2-31: Click Host Aliases
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.
Figure 2-32: Click * in the row of port 80
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.
Figure 2-33: Set the Host Name (*) and the port number (50001)
Click Save, as shown in Figure 2-34. You must save each time you change a configuration setting.
Figure 2-34: Click Save after changing your configuration
Click Save to save your changes to the master configuration as shown in Figure 2-35.
Figure 2-35: Click Save to save your changes to the master confutation
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. |
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).
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:
|
Use the following steps to update the Web Server plug-in.
From the Administrative Console, select Environment → Update Web Server Plugin in the navigation tree as shown in Figure 2-36.
Figure 2-36: Accessing the Update Web server plugin
Click OK. You should get the message shown in Figure 2-37.
Figure 2-37: The confirmation message after saving the configuration
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.
<?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> ...........
Note | From the command line, use the following script to update the Web server plug-in:
# <WAS_HOME>/bin/GenPluginCfg.sh |
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:
Open the /opt/IBMHttpServer/conf/httpd.conf file in an editor, for example:
# cd /opt/IBMHttpServer/conf/ # vi httpd.conf
Search for the keyword Listen using the vi editor by typing :/Listen.
Enter i to change the insert mode.
Add the Listen port that you set on the virtual host, as shown in Figure 2-39.
# 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
To save your changes, press the Esc key and enter :wq.
Restart the HTTP server using the following command:
# /opt/IBMHttpServer/bin/apachectl restart
To verify that your configuration works correctly, connect to the application server with the specific port number using the following steps:
Start your Web browser and open the following URL:
http://host_name:your_port_number/snoop
If the browser displays the Snoop Servlet page shown in Figure 2-40, you accessed the application correctly with your configuration.
Figure 2-40: Successful connection with the specific port number
| < Day Day Up > |
|