You are on page 1of 40

Install and configure WebSphere Application Server on UNIX and Linux systems

UNIX and Linux are perfect platforms for WebSphere


Skill Level: Intermediate William von Hagen Systems Administrator, Writer WordSmiths

22 Dec 2008 Learn how application servers are used in modern enterprise environments and how to install IBM WebSphere Application Server on UNIX and Linux systems to provide the cornerstone of a robust, well-supported enterprise Web environment. This tutorial also explains how to integrate WebSphere Application Server into the startup and shutdown processes on your UNIX and Linux servers and provides links to many other resources that will help you get up and running quickly with WebSphere Application Server.

Section 1. Before you start


Learn what to expect from this tutorial and how to get the most out of it.

About this tutorial


Application servers are a central component of the Web architectures used in enterprise computing today. This tutorial begins with a general discussion of middleware in today's Web architectures, focusing on IBM's WebSphere family of products and the different ways in which WebSphere Application Server can be deployed. The remainder of the tutorial provides detailed information about how to install and configure WebSphere Application Server, integrate it into your system's
Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved. Trademarks Page 1 of 40

developerWorks

ibm.com/developerWorks

startup process, and integrate it into your enterprise computing infrastructure. After completing this tutorial, you will understand how to install, configure, and deploy WebSphere Application Server and its relationship with other applications and servers in a Web-based computing environment.

Objectives
This tutorial provides: A review of common Web architectures and the role of application servers and middleware in today's enterprise Web architectures. A basic understanding of WebSphere Application Server. An overview and comparison of common WebSphere installation and deployment mechanisms. Instructions for installing WebSphere Application Server on UNIX and Linux distributions. A basic overview of the initial configuration of the WebSphere Application Server. Details on how to integrate WebSphere Application Server into the system startup and shutdown processes and how to start and stop the server manually.

Prerequisites
This tutorial is written for beginning to intermediate-level systems administrators who may never have installed or configured a Web application server and who may be unfamiliar with modern Web server architectures. To complete the examples in this tutorial, you should have a general familiarity with UNIX command-line shells and text editors.

System requirements
To run the examples in this tutorial, you need administrative (root) privileges on a UNIX or Linux system on which no application server is currently installed. The system should have a minimum of 1GB of RAM. When installing WebSphere Application Server, at least 3.1GB of disk space must be available on the system: A minimum of 1.3GB must be permanently available in the file system that contains the /opt directory, and 1.75GB more must be

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 2 of 40

ibm.com/developerWorks

developerWorks

temporarily available in the file system from which you install WebSphere Application Server. If you are installing WebSphere Application Server on a Linux system, not all Linux distributions include a version of the Java Runtime Environment (JRE) that is suitable for use by the installer and certain WebSphere Application Server functions. On unsupported Linux distributions such as Ubuntu, you should download and install the IBM Java software development kit (SDK) and make some minor modifications to your system before installing WebSphere Application Server. See Setting up unsupported Linux distributions for instructions. If you choose to install the IBM Java SDK, at least 450MB of additional disk space must be available on the system: A minimum of 175MB must be permanently available in the file system that contains the /opt directory, and 275MB more must be temporarily available in the file system from which you install IBM Java SDK.

Section 2. Web servers and architectures


Today's enterprise Web environments are much more sophisticated than the simple content-delivery model of a few years ago. Evolving Web software technologies and increasing connectivity between Web servers and other data resources continue to revolutionize what users can do from the Internet and the services that businesses can offer and use themselves over the Web.

Modern Web architectures and middleware


Today's enterprise Web architectures use what are known as n-tier architectures that enable Web servers to connect to data sources beyond simple static content. To access remote data sources, these n-tier Web architectures typically use middleware, which is the term for software that connects other applications or services. The most powerful and flexible form of middleware is a Web application server, such as IBM WebSphere Application Server, that hosts the application program interfaces (APIs) required by enterprise Web applications. These Web applications implement the connectivity between applications and resources (business logic) required by Web-based implementations of various business processes. In n-tier Web architectures, an application server can be running on the same system on which a Web server is running or on another system. The Web server acts as an intermediary between Web clients and the application server, just as the application server acts as an intermediary between application logic and remote data
Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved. Trademarks Page 3 of 40

developerWorks

ibm.com/developerWorks

requirements.

IBM WebSphere Application Server overview


IBM WebSphere Application Server is a Java application server that is built using open standards such as Java Platform, Enterprise Edition (Java EE), Extensible Markup Language (XML), and Hypertext Transfer Protocol (HTTP)-based Web services. WebSphere Application Server is typically used in conjunction with other IBM products, such as IBM HTTP Server, but can be used with most other Web servers including the standard Apache HTTP Server, Microsoft Internet Information Services (IIS), and the Sun Java System Web Server. The IBM HTTP Server includes a WebSphere Application Server plug-in to simplify WebSphere configuration and administration. WebSphere Application Server provides a robust, scalable environment for enterprise Web applications. Its architecture and the reuse and integration opportunities provided by other WebSphere products minimize runtime memory requirements and deliver a secure, standards-based infrastructure for Web-based application development and deployment. The wide range of existing WebSphere add-on products, supported development frameworks, and its support for new standards such as the Service Component Architecture (SCA) satisfy the requirements of today's enterprise applications while simplifying the development and integration of the new applications that will deliver tomorrow's solutions. See Resources for a link to the WebSphere Application and transaction infrastructure page, which provides information about many of the WebSphere add-on products that are currently available. Both IBM WebSphere Application Server and IBM HTTP Server are supported on many platforms including Linux, IBM AIX, HP-UX, IBM i (i5/OS, i6/OS, OS/400), IBM z/OS, Microsoft Windows, and Solaris. See Supported platforms for more detailed information about hardware and software requirements. See Resources for links to additional information on popular n-tier application servers.

Supported platforms
This tutorial discusses installing and configuring IBM WebSphere Application Server 7.0. Version 7.0 is available for and supported on the following operating systems and associated hardware: AIX HP-UX on IA64 and HP-UX PA-RISC
Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved. Trademarks Page 4 of 40

ibm.com/developerWorks

developerWorks

Linux (32 bit) Linux for IBM i, System p, and System z Sun Solaris on SPARC and x86-64 Microsoft Windows 2000, Windows Server 2003, and Microsoft Windows XP WebSphere Application Server is officially supported on the Red Hat Enterprise Linux versions 4 and 5 and SUSE Enterprise Server versions 9 and 10 Linux distributions, but you should be able to install it cleanly on any Linux distribution. The Setting up unsupported Linux distributions section provides tips to enable you to install and run WebSphere Application Server on Linux distributions other than those that are officially supported. Note: You can run the 32-bit Intel architecture versions of WebSphere Application Server and HTTP Server on a 64-bit UNIX system as long as you have installed your UNIX system's 32-bit compatibility libraries on that system. The name of this package and the package management system used for its installation differs on various UNIX systems. On Linux systems, this is the ia32-libs package.

Deploying WebSphere Application Server


WebSphere Application Server is typically deployed in one of two basic ways: As stand-alone application servers that support specific business logic and related applications in single-server environments. In a network deployment scenario, where clusters of application servers deliver advanced capabilities for high-performance, high-availability environments. (See Resources for more information.) As your business requirements and information technology (IT) infrastructure grow, a stand-alone WebSphere Application Server installation can be integrated into the clusters created in a network deployment scenario. This tutorial focuses on installing a stand-alone application server because of the site-specific nature of network deployments.

Section 3. Installing WebSphere Application Server

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 5 of 40

developerWorks

ibm.com/developerWorks

Thanks to its graphical installer, installing WebSphere Application Server is quite simple.

Getting the installation files


If you want to evaluate WebSphere Application Server on a specific UNIX system, you can request a copy for evaluation purposes from IBM. Contact your IBM sales representative for more information. A trial version of WebSphere Application Server for Linux systems is available as a download or on the Linux Software Evaluation Kit (SEK), a set of four DVDs containing evaluation products from IBM WebSphere, IBM Information Management, Lotus, Rational, and Tivoli that enable you to install and configure IBM middleware and start building and deploying applications. The software on these DVDs is fully functional and can be used for 60 days for evaluation purposes. Product support for this trial period is available. This tutorial focuses on installing WebSphere Application Server from a downloaded file. If you are installing WebSphere Application Server from the Linux SEK DVDs, the archive file containing the installable files for WebSphere Application Server are located on DVD #3 of the set. The instructions for extracting the contents of the archive file on your DVD are the same as those for extracting installable files from a downloaded file.

Setting up unsupported Linux distributions


The Supported platforms section of this tutorial includes a list of the UNIX and Linux platforms on which WebSphere Application Server is officially supported. As commercial products, UNIX systems provide standard capabilities that can be guaranteed to be present for use by commercial products such as WebSphere Application Server. Unfortunately, Linux distributions can be very different from each other, so WebSphere Application Server is only officially supported on certain distributions. However, you can also run WebSphere Application Server on other Linux distributions by making some minor modifications to those systems. Note: If you are installing WebSphere Application Server on a UNIX or supported Linux platform, you can skip this section and proceed directly to the Extracting files and beginning the installation section of this tutorial. For example, not all Linux distributions include a version of the JRE that is suitable for use by the WebSphere Application Server installer and certain WebSphere Application Server functions. On unsupported Linux distributions such as Ubuntu, you should download and install the IBM Java SDK for use during the installation

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 6 of 40

ibm.com/developerWorks

developerWorks

process. See Resources for a link from which you can download the appropriate version of the IBM Java SDK for your system. After downloading this file, you can extract its contents and install them using the following steps: 1. Extract the contents of the archive file using a command like the following:

tar zxvf filename.tar.gz

Replace filename with the name of the IBM Java SDK archive file that you downloaded, which will be something like ibm-java-sdk-6.0-2.0-linux-x86_64.tar.gz. The directory that is created by the tar command will be something like ibm-java-x86_64-60. 2. Use the sudo command to move the directory that was extracted from the archive file to a system directory such as /opt by using a command like the following:

mv DIRECTORY /opt

Replace DIRECTORY with the name of the directory that was created when you extracted the contents of the IBM Java SDK archive file that you downloaded. 3. Modify the series of directories that your system searches for binaries by executing a command like the following:

export PATH DIRECTORY:$PATH

You should add this command to your shell startup file (~/.bashrc) to ensure that you use this version of the JRE in the future. On Ubuntu systems, you must also modify the default shell that is mapped to the generic UNIX/Linux shell, /bin/sh. Ubuntu systems use a lightweight shell named /bin/dash as /bin/sh, but this shell does not provide all the capabilities required by the WebSphere Application Server installation and startup scripts. To use the standard Bash shell as /bin/sh, execute the following commands on your Ubuntu system before beginning the WebSphere Application Server installation process:
sudo mv /bin/sh /bin/sh.ORIG sudo ln -s /bin/bash /bin/sh

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 7 of 40

developerWorks

ibm.com/developerWorks

These steps are sufficient to enable you to begin the WebSphere Application Server installation process on an Ubuntu system. Other Linux distributions may require similar changes.

Extracting files and beginning the installation


After downloading or otherwise obtaining the archive file containing WebSphere Application Server or mounting the Linux SEK DVD #3 when using a Linux system, create a directory in which to extract the files from which you can actually install WebSphere Application Server. See Basic tasks for Linux Developers if you are unsure about how to mount your DVD or determine where it is mounted. The /opt/WASTrial directory is the suggested location for extracting the files from which you will install WebSphere Application Server. To create this directory, do the following: 1. Depending on the UNIX operating system or Linux distribution that is installed on the system where you are installing WebSphere Application Server, use the su or sudo -s commands to become a privileged user on your system. Enter the root password or your password (respectively) when prompted to do so. Create the /opt/WASTrial directory using the mkdir /opt/WASTrial command. Change directory to the /opt/WASTrial directory. Use the tar command to extract the contents of the file that you downloaded or the WebSphere Application Server archive file from the mounted DVD. If you downloaded the file, use a command like the following:

2. 3. 4.

tar zxvf /path/to/file/was.cd.7000.trial.base.linux.ia32.tar.gz

Replace /path/to/file with the full directory path of the location to which you downloaded the file. If you are installing WebSphere Application Server from a DVD, use a command like the following:

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 8 of 40

ibm.com/developerWorks

developerWorks

tar zxvf /mountpoint/was7uxt/filename.tar.gz

Replace /mountpoint with the name of the directory on which SEK DVD #3 is mounted, and replace filename with the name of the WebSphere Application Server archive file in that directory. You may also have to replace was7uxt with the name of the directory containing the Linux archive file if a different directory name was used in the latest SEK DVD releases. 5. Use the ./launchpad.sh command to start the Firefox Web browser, which displays the page shown in Figure 1. Figure 1. Firefox Welcome page

Note: If you are using Linux for your evaluation, no 64-bit Linux version seems to be available for download. See Supported platforms for information about how to use the 32-bit Linux build on a 64-bit Linux system.

Starting the installer


Click Launch the installation wizard for WebSphere Application Server Trial to begin the actual installation process. The graphical installer for WebSphere Application Server begins and displays its welcome screen, as shown in Figure 2.

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 9 of 40

developerWorks

ibm.com/developerWorks

Figure 2. WebSphere Application Server installer's welcome screen

The welcome screen shows that the graphical installer is working correctly and provides links to online sites that provide information and support for WebSphere and related products. Click Next to proceed with the installation process.

Accepting the license terms and checking your system


The next page of the graphical installer displays the license under which WebSphere Application Server is released, as shown in Figure 3. Figure 3. Accepting the IBM software license agreement

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 10 of 40

ibm.com/developerWorks

developerWorks

This license contains IBM licensing information for the evaluation version of WebSphere Application Server and language that excludes open source software that is distributed with IBM WebSphere Application Server from those terms and identifies separately licensed software components. Select I accept the terms in the licensing agreement to accept the licensing terms. Click Next to proceed with the installation process. If you don't accept the license terms, a window displays asking you to confirm that fact. If you confirm that you do not accept the license terms, the installer exits. The next page of the installer indicates whether your system satisfies the prerequisites for installation. If your system does not satisfy requirements, the installer may display information about any missing patches that you should install. In this case, you can either click Cancel to exit the installer and install the missing prerequisites, or simply proceed with the installation. Click Next to proceed with the installation process.

Selecting optional features for installation


Figure 4 shows the installer screen that enables you to install optional software while you install WebSphere Application Server.
Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved. Trademarks Page 11 of 40

developerWorks

ibm.com/developerWorks

Figure 4. Selecting optional software for installation

Optional software that you can install consists of the following: Sample applications: Source code and integrated applications for initial experimentation. The sample applications also serve as an excellent mechanism for verifying that WebSphere Application Server is installed correctly and is working properly on your system. Non-English language support for the administrative console: Language catalogs that provide national language support for WebSphere Application Server's administrative console. These language catalogs do not provide national language support for WebSphere Application Server itself, which is available in a separate item on this screen. Non-English language support for WebSphere Application Server: Language catalogs that provide national language support for WebSphere Application Server itself. These language catalogs do not provide national language support for WebSphere Application Server's administrative console, which is available in a separate item on this screen. Unless you already have substantial experience with WebSphere Application Server, you should install the sample applications to provide a way for you to learn more about application integration and deployment in the WebSphere Application Server

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 12 of 40

ibm.com/developerWorks

developerWorks

environment. The default language package installed with WebSphere is English as spoken in the United States. Whether or not you install the optional language packages depends on your geographic location and language support requirements. The additional languages that are supported by the administrative console and WebSphere Application Server language support packs are Chinese, Czech, French, German, Hungarian, Italian, Japanese, Korean, Polish, Portuguese, Russian, and Spanish. After selecting any additional features that you want to install, click Next to proceed with the installation process.

Identifying the target installation directory


Next, the graphical installer displays the default location in which WebSphere Application Server will be installed, which is /opt/IBM/WebSphere/AppServer on UNIX and Linux systems. Figure 5 shows this screen. Figure 5. Specifying the installation location

Note: I recommend that you do not change this location because installing WebSphere Application Server in non-standard locations can make local system administration more complex. Non-standard installation locations may also cause
Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved. Trademarks Page 13 of 40

developerWorks

ibm.com/developerWorks

problems with WebSphere applications that may expect the standard installation location. Click Next to proceed with the installation process.

Specifying the WebSphere Application Server environment


The screen shown in Figure 6 enables you to identify the type of WebSphere Application Server environment you want to create during the installation process. Figure 6. Specifying the target server environment

The environment refers to the administrative and network environment in which you are installing and integrating WebSphere Application Server. The environment that you select determines the type of execution profile that will be created automatically during the installation process (or whether one will be created at all). Your choices are the following: Management: Select this option if you are installing this copy of WebSphere Application Server to manage other application server environments on the local machine or on other systems on your network. Selecting this option creates an appropriate profile and will install and

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 14 of 40

ibm.com/developerWorks

developerWorks

configure an administrative agent server, services for managing multiple application server environments, and an administrative agent to manage other application servers that are on the same machine. Application server: The default selection, this option creates an appropriate profile for installing a stand-alone application server that will run your enterprise applications and which can only be managed from its own administrative console. None: Select this option if you do not want to create an execution profile during installation. Only select this option if you will explicitly create one or more profiles after WebSphere Application Server is successfully installed on your system. Click Next to proceed with the installation process. Note: If you select None as your server execution environment, a warning dialog displays to inform you that at least one functional profile must be available to run WebSphere Application Server. Click Yes to proceed with the installation process without creating a profile during the installation process, and proceed to Summary page and actual installation. If you want to create a profile during the installation process, click No to return to the dialog shown in Figure 6 to modify your server execution environment setting.

Creating an administrative user


The next screen of the installer, shown in Figure 7, enables you to create a secure account on your system for system administration through the WebSphere Application Server administrative console. Figure 7. Defining an administrative user

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 15 of 40

developerWorks

ibm.com/developerWorks

Create an administrative user if you are installing a stand-alone or managed WebSphere Application Serverin other words, when you are installing WebSphere Application Server in an environment that creates a profile for you during the installation process, as described earlier in Specifying the WebSphere Application Server environment. Enter a username and password for use in administering your WebSphere Application Server, and enter the password again to confirm that you typed it correctly the first time. If you selected the sample applications for installation in the Selecting optional features for installation section, you will also be prompted to set a password for the user associated with those sample applications. Enter the password twice to ensure that you have typed it correctly or have at least made the same typo twice. After supplying information about the administrative user (and, optionally, a password for the sample applications if you selected them for installation), click Next to proceed with the installation process.

Summary page and actual installation


As shown in Figure 8, a summary screen displays the configuration options that you
Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved. Trademarks Page 16 of 40

ibm.com/developerWorks

developerWorks

have accepted or specified and provides a check box that enables you to verify that you have the necessary privileges to perform the installation. Figure 8. Information about the proposed installation

In most cases, given that you are doing this installation as the root user, there's really no need to verify that you have the required privileges. Clear this check box and click Next to begin the installation process. A window displays showing the status of the installation process. The installation process first creates an uninstaller for WebSphere Application Server to simplify removing the software, if necessary. It then installs WebSphere Application Server, displaying status information as the installation proceeds.

Installation status and next steps


When the installation finishes, the window shown in Figure 9 displays the success or failure of installation. If any errors occur, this window shows the location of a log file that you can examine to identify the problems and determine whether they were meaningful. Figure 9. Summary information about your installation

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 17 of 40

developerWorks

ibm.com/developerWorks

This screen provides a check box that, because it is selected by default, starts the WebSphere Application Server First steps console when you exit the installer. The First steps console enables you to do some initial configuration of WebSphere Application Server. At this point, you have two options: Leave the Launch the First steps console check box selected and click Finish to exit the installer and start the First steps console. Clear the Launch the First steps console check box and click Finish to exit the installer without starting the First steps console or WebSphere Application Server. Congratulations: You've installed WebSphere Application Server. If you started the First steps console, proceed to the next section for information about using that console. Otherwise, you may want to do one of the following: Start the WebSphere Application Server manually. Integrate WebSphere Application Server with your system's Web server. Integrate WebSphere Application Server into your system's startup and

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 18 of 40

ibm.com/developerWorks

developerWorks

shutdown processes. Access the WebSphere administrative console to begin configuring your WebSphere Application Server.

Section 4. Using the First steps console


The WebSphere Application Server installation process can automatically start a First steps console to help you familiarize yourself with WebSphere Application Server and perform some initial configuration tasks. Figure 10 shows the initial screen of the First steps console. Figure 10. First steps console

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 19 of 40

developerWorks

ibm.com/developerWorks

As shown in Figure 10, the First steps console provides links to a number of convenient tasks that you may want to perform immediately after installation, including: Installation verification: Checks your WebSphere Application Server installation to verify that it is installed correctly and starts the application server as part of this check. Start the Server: Starts the WebSphere Application Server, displaying the output of the startup process in a separate window for convenience and diagnostic purposes. When the application server is running, this link changes to a Stop the server link, which provides a convenient way to stop the server and displays the output of the server shutdown process in a separate window. Stopping the server requires the administrative password that you set during the installation process and provides a convenient check that the application server's internal authentication mechanism is working correctly. Administrative console: Starts the WebSphere Administrative console in a browser window, enabling you to perform configuration tasks that are outside the scope of the installation process. Starting the administrative console also requires the administrative password that you set during the installation process. Profile management tool: Enables you to create additional execution profiles, each of which can be for use with specific enterprise Web applications, port configurations, and so on. If you did not specify a target server environment during the installation process and are not migrating server configuration information from an existing WebSphere Application Server installation, use this option to create at least one WebSphere Application Server profile. You cannot start WebSphere Application Server without at least one profileeach profile provides the configuration information required to start the application server in a specific context. Samples gallery: Provides access to the sample applications you installed during the installation process. Information center for WebSphere Application Server: Opens the WebSphere Application Server Library Web site in a browser to provide detailed information about WebSphere Application Server in a variety of enterprise application scenarios. Migration wizard: Starts a wizard that simplifies migrating configuration information and applications from earlier versions of WebSphere Application Server. The next few sections provide highlights of using selected options from the First steps console.

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 20 of 40

ibm.com/developerWorks

developerWorks

Installation verification
Though error messages would have displayed had any problems occurred during the WebSphere Application Server installation process, it's always comforting to be able to double-check that your application server installation is complete and that all the necessary configuration files were created correctly during that process. To verify that WebSphere Application Server was installed correctly on your system and start it as part of the testing process, click the Installation verification link in the First steps console. A window like the one shown in Figure 11 displays. Figure 11. Output of the verification process

As you can see from this figure, the verification process first starts the application server with your default profile and then connects to the application server to verify the Servlet engine, JavaServer pages, and enterprise bean configuration. It then examines the authentication of the key stores that are used to provide secure connections between WebSphere components. When the verification process completes, you can click the close button in the upper right-hand corner of the output window to close that window and return to the First steps console. Note that the Start the server link has been replaced by a Stop the server link because the WebSphere Application Server was started as part of the verification process.

Starting the server


If you choose not to verify your WebSphere Application Server installation as

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 21 of 40

developerWorks

ibm.com/developerWorks

described in the previous section, you can start the WebSphere Application Server manually by clicking the Start the server link in the First steps console. Clicking this link displays an output window much like the one shown in Figure 11, except that it only shows the initial text about starting the server and does not probe the configuration of your server. Note: If the First steps console does not show a Start the server link, but instead displays only a Stop the server link, your WebSphere Application Server is already running. After a line like ADMU3000I: Server NAME open for e-business... displays in the output window, you can click the close box in the upper right-hand corner of the output window to close that window and return to the First steps console.

Administrative console
The WebSphere Application Server Administrative console is the primary mechanism for configuring the application server, integrating the application server with external applications such as database systems, and installing WebSphere applications. If you are new to WebSphere Application Server and want to explore the administrative console or want to install new WebSphere applications immediately after installing WebSphere, you may want to start the Administrative console from the First steps console. Click Administrative console to start the WebSphere Administrative console from the First steps console. The login screen for the Administrative console opens in a browser window, as shown in Figure 12. Figure 12. Administrative console login screen

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 22 of 40

ibm.com/developerWorks

developerWorks

The Administrative console requires a Secure Sockets Layer (SSL) HTTP connection, generally referred to as a Hypertext Transfer Protocol over Secure Sockets Layer (HTTPS) connection. The page shown in Figure 12 only displays if a valid third-party SSL certificate is installed on your system. If the system on which you installed WebSphere Application Server does not have a valid certificate issued by a third party, you will see a warning dialog like that shown in Figure 13 instead. Figure 13. Certificate not trusted alert

If you see this message, see the next section of this tutorial for information about
Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved. Trademarks Page 23 of 40

developerWorks

ibm.com/developerWorks

configuring a security exception for your system's existing certificate. If you see the Administrative console login screen as shown in Figure 12, enter the administrative username and password that you defined during the installation process and click Login or press Return. The WebSphere Application Server Administrative console displays, as shown in Figure 14. You can explore or use the Administrative console, clicking the Logout link in the header when you are done. Figure 14. Administrative console

Configuring a certificate security exception


As discussed in the previous section, the WebSphere Application Server Administrative console requires an SSL HTTP connection, generally referred to as an HTTPS connection. According to the default security policies used by most systems, this means that the public key security certificate presented by your system must be a valid certificate issued by a trusted third-party certificate authority such as thawte, VeriSign, GeoTrust, and many others. See Resources for more information about these third-party certificate authorities. In a production environment, you will certainly only want to use WebSphere

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 24 of 40

ibm.com/developerWorks

developerWorks

Application Server on a system with a valid enterprise or third-party security certificate so that users of your Web applications can verify the identity of the system that they are connecting to. However, you may be installing and configuring WebSphere Application Server on a new system for which you have not yet obtained a certificate. In this case, you can temporarily or permanently define your existing certificate as a trusted one that is an exception to the standard WebSphere security policy. To define a policy exception, click OK in the dialog shown in Figure 13 to display the screen shown in Figure 15. Figure 15. A secure connection failure in Firefox

Click the Or you can define an exception link to begin the process of identifying your system's certificate as a valid digital public key certificate. A screen identical to the current screen displays, with the exception of two additional buttons that display at the bottom of the screen. Click Add exception to continue the process of defining the current certificate as an exception to the default certificate policy. The dialog shown in Figure 16 displays. Note: Clicking the Get me out of here! button exits the exception definition process and returns you to your browser without establishing a connection to the WebSphere

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 25 of 40

developerWorks

ibm.com/developerWorks

Administrative console, which isn't all that useful for the purposes of this tutorial. Figure 16. Initial dialog for defining a security exception

Click Get Certificate to retrieve your system's current certificate, which displays information about the current certificate and enables the Confirm Security Exception button at the bottom left of the dialog shown in Figure 16, as shown in Figure 17. Figure 17. Updated dialog for defining a security exception

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 26 of 40

ibm.com/developerWorks

developerWorks

The Permanently store this exception check box above the Confirm Security Exception button enables you to specify whether your system permanently stores the current certificate as an exception to the security policy, or whether it will only be accepted for the current session. When configuring systems for production use, clear this check box so that you must always go through the security exception process to prevent you from forgetting to install a valid certificate on the system that is running WebSphere Application Server. If you are working on a test system that will never be used in production, you can leave the Permanently store this exception check box selected. Click the Confirm Security Exception button to define the current certificate as an exception to the security policy. The WebSphere Application Server Administrative

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 27 of 40

developerWorks

ibm.com/developerWorks

console login screen displays, as shown in Figure 12. You can then enter the administrative username and password that you defined during the installation process and click Login or press Return to access the WebSphere Application Server Administrative console, as shown in Figure 14. You can explore or use the Administrative console, clicking the Logout link in the header when you are done.

Samples gallery
Clicking the Samples gallery link in the First steps console displays the page shown in Figure 18, which enables you to experiment with the sample applications that you optionally installed during the WebSphere Application Server installation process. Figure 18. Sample applications gallery

You can execute or modify these examples to get a feel for how to write WebSphere applications and how they will be displayed and perform in a WebSphere-based environment. The most interesting of the sample applications is an online Java Pet Store that enables you to walk through an example of browsing and purchasing products online. When you're finished experimenting with the sample applications, you can simply close the browser window to return to the First steps console.
Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved. Trademarks Page 28 of 40

ibm.com/developerWorks

developerWorks

Shutting down WebSphere Application Server


After experimenting with the various options provided on the First steps console, you may want to terminate the application server so that you can experiment with manually starting the application server or integrating starting and stopping the WebSphere Application Server into your system's startup and shutdown processes, as explained in the next section of this tutorial. To stop the WebSphere Application Server from the First steps console, click the Stop the server link in the First steps console. Clicking this link displays an authentication dialog like the one shown in Figure 19. Figure 19. Authenticating to stop the application server

Enter the administrative username and password that you set during the installation process, and click OK to begin the application server shutdown process. A dialog like the one shown in Figure 20 displays, showing the output of the shutdown process. Figure 20. Output from stopping the application server

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 29 of 40

developerWorks

ibm.com/developerWorks

After a line like ADMU4000I: Server NAME stop completed displays in the output window, you can click the close box in the upper right-hand corner of the output window to close that window and return to the First steps console.

Section 5. Starting and stopping WebSphere Application Server


Installing WebSphere Application Server doesn't start the WebSphere Application Server process on your system. As discussed in the previous section, the First steps console that displays by default at the end of the installation process provides a convenient mechanism for starting WebSphere Application Server for the first time. However, that is of limited value after you complete the installation process and exit this console. This section explains how to start and stop WebSphere Application Server manually and how to integrate starting and stopping the application server into the startup and shutdown processes for your system. If you are using WebSphere Application Server for real work or long-term experimentation, you'll want it to start automatically when you start your system and to shut down cleanly when you shut down your system. As explained in the following sections, WebSphere Application Server provides convenient UNIX/Linux shell scripts that simplify the process of starting and stopping the application server from the command line or from within other scripts, such as the ones that are run during your system's startup and shutdown processes.

Start WebSphere Application Server


WebSphere Application Server provides the startServer.sh shell script to simplify the application server startup process. This script takes one argument, which is the name of the application server that you want to start. On systems where you have newly installed the WebSphere Application Server, the name of the default server is server1. To start the application server, use the su or sudo -s commands (depending on the UNIX system or Linux distribution you are using), to become a privileged user on the system where you installed the application server. Enter the root password or your password (respectively) when prompted to do so. Next, enter the following command to start WebSphere Application Server:

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 30 of 40

ibm.com/developerWorks

developerWorks

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

As the application server starts, you will see output similar to that displayed in the output window shown in Figure 11. The command prompt redisplays when the server startup process completes and the application server is ready for use.

System startup and shutdown integration


After installing a Web server on your system, you typically want it to start automatically any time you restart your system. When installing WebSphere Application Server on platforms such as Microsoft Windows, the installation process enables you to define the server and administration server as Windows services that start automatically when your system starts. Unfortunately, the UNIX and Linux installers don't provide any equivalent integration into the startup processes for those systems. Therefore, you must manually integrate WebSphere Application Server into the startup process on UNIX and Linux systems. All UNIX and Linux systems define the tasks that should be performed during the startup and shutdown processes via a series of shell scripts (commonly referred to as init scripts) that are executed as the system starts. On most UNIX and Linux systems, these scripts are organized in the way specified by the SysVInit (that is, System V Init, which refers to an old version of UNIX) system startup mechanism (see Resources for more information). In this mechanism, the primary startup scripts for the system all reside in /etc/init.d (which may be a symbolic link to the /etc/rc.d/init.d directory on some systems). The specific scripts that are executed as the system boots into a specific numeric level of operation (known as a runlevel) are symbolic links from directories with names of the form /etc/rcrunlevel.d to the scripts in the /etc/init.d directory. Ubuntu Linux systems use a different startup mechanism that is configured to be compatible with the SysVInit process, and is explained in a subsequent section. Create a SysVInit script To create a SysVInit script for WebSphere Application Server, you can do one of the following: Download the sample SysVInit script that is provided with this tutorial. Copy an existing init script and modify it to execute the processes associated with your WebSphere Application Server installation. The remainder of this section explains how to download and use the sample SysVInit script provided with this tutorial, which looks like Listing 1.

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 31 of 40

developerWorks

ibm.com/developerWorks

Listing 1. Sample SysVInit script


#!/bin/bash # # Simple startup script for IBM WebSphere Application Server # # chkconfig: - 85 15 # description: IBM WebSphere Application Server is a powerful \ # middleware platform for connecting Web-based applications and \ # servers. # Path to the WebSphere startup and shutdown scripts startscript=/opt/IBM/WebSphere/AppServer/bin/startServer.sh shutscript=/opt/IBM/WebSphere/AppServer/bin/stopServer.sh prog="the WebSphere Application Server" RETVAL=0 # modify the following line as needed to reflect any custom Java # installation directory PATH=/opt/IBM/ibm-java-x86_64_60/bin:$PATH # Function to start the server start() { echo -n $"Starting $prog: " $startscript server1 RETVAL=$? echo return $RETVAL } # Function to stop the server stop() { echo -n $"Stopping $prog: " $shutscript server1 -username ADMINUSER -password PASSWORD RETVAL=$? echo return $RETVAL } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac exit $RETVAL

To download and install the sample SysVInit script, perform the following steps: 1. 2. Download the sample script. Save this file to your system and copy it to /etc/init.d as the root user (or

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 32 of 40

ibm.com/developerWorks

developerWorks

by using the sudo command), giving it a name such as websphere_sysvinit.sh. 3. Edit this file using your favorite text editor, changing ADMINUSER and PASSWORD to the administrative username and password that you defined during the installation process, and save those changes. As the root user or by using sudo, make the file executable using this command:

4.

chmod 755 /etc/init.d/websphere_sysvinit.sh

5.

Create symbolic links to this file from the directory associated with your system's default runlevel (usually the /etc/rc5.d directory for a graphical system or the /etc/rc3.d directory for a system that uses a text console) by using commands like the following:

ln -s /etc/init.d/websphere_sysvinit.sh /etc/rc5.d/S85ibm-was ln -s /etc/init.d/websphere_sysvinit.sh /etc/rc5.d/K15ibm-was

The next time you shut down your system, the K15ibm-was symbolic link that you created automatically stops WebSphere Application Server as part of the shutdown process. The next time you start your system, the S85ibm-was symbolic link automatically starts WebSphere Application Server as part of the startup process. Create an Ubuntu Upstart script The Ubuntu Linux distribution uses an alternate startup mechanism to the SysVInit mechanism. The Ubuntu startup mechanism is known as Upstart (see Resources) and is a relatively new, event-driven startup mechanism that was created for Ubuntu but is being adopted by other distributions such as Fedora and, therefore, eventually Red Hat and Centos. Upstart is becoming popular largely because of its support for concurrency and responsiveness to system events. At the moment, Upstart is implemented to be compatible with the traditional SysVInit model. See Downloads for a simple Upstart script that you can put in the /etc/init.d directory on your system and use for WebSphere Application Server. This script looks like Listing 2. Listing 2. Sample Upstart script
#!/bin/bash -e ### BEGIN INIT INFO # Provides: # Required-Start: # Required-Stop: # Default-Start:

ibm-websphere $local_fs $remote_fs $network $syslog $local_fs $remote_fs $network $syslog 2 3 4 5

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 33 of 40

developerWorks

ibm.com/developerWorks

# Default-Stop: 0 1 6 # Short-Description: Start/stop IBM WebSphere Application Server ### END INIT INFO # # IBM WAS This init.d script starts the IBM WebSphere # Application Server. # modify the following line as needed to reflect any custom Java # installation directory ENV="env -i LANG=C PATH=/opt/IBM/ibm-java-x86_64_60/bin:/usr/bin:/bin" set -e if [ ! -d /opt/IBM/WebSphere/AppServer/bin ] ; then echo "No IBM WebSphere Application Server installed" exit 0 fi . /lib/lsb/init-functions test -f /etc/default/rcS && . /etc/default/rcS startscript=/opt/IBM/WebSphere/AppServer/bin/startServer.sh shutscript=/opt/IBM/WebSphere/AppServer/bin/stopServer.sh case $1 in start) log_daemon_msg "Starting application server" "IBM WAS" if $startscript ; then log_end_msg 0 else log_end_msg 1 fi ;; stop) log_daemon_msg "Stopping application server" "IBM WAS" if $stopscript -user was-admin -password PASSWORD; then log_end_msg 0 else log_end_msg 1 fi restart) log_daemon_msg "Restarting Web server" "IBM HTTP" if ($stopscript -user was-admin -password PASSWORD && $startscript) then log_end_msg 0 else log_end_msg 1 fi ;; *) log_success_msg "Usage: /etc/init.d/websphere {start|stop|restart}" exit 1 ;; esac

After downloading this file, perform the following steps: 1. Save this file to your system and copy it to /etc/init.d as the root user (or by using the sudo command), giving it a name such as websphere_upstart.sh. As the root user or by using the sudo command, make the file executable by using this command:
Trademarks Page 34 of 40

2.

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

ibm.com/developerWorks

developerWorks

chmod 755 /etc/init.d/websphere_upstart.sh

3.

Create symbolic links to this file from the directory associated with your system's default runlevel (usually the /etc/rc2.d directory) by using the commands like the following:

ln -s /etc/init.d/websphere_upstart.sh /etc/rc2.d/S91ibm-was ln -s /etc/init.d/websphere_upstart.sh /etc/rc2.d/K15ibm-was

The next time you shut down your system, the K15ibm-was symbolic link that you created automatically stops WebSphere Application Server as part of the shutdown process. The next time you start your system, the S91ibm-was symbolic link automatically starts WebSphere Application Server as part of the startup process.

Section 6. Next steps


Congratulations on installing WebSphere Application Server and integrating it into your system startup and shutdown processes. You're now ready to add your own applications, customize the server's configuration, and so on. Writing and integrating WebSphere applications is outside the scope of this tutorial. However, here's some general information that you will find useful when working with WebSphere Application Server: To open the WebSphere Application Server Administrative console in a browser from the system on which it is installed, visit the following URL:
https://localhost:9043/ibm/console

The screen shown in Figure 12 displays. Enter the administrative username and password that you defined during the installation process and click Login or press Return to display the WebSphere Application Server Administrative console, as shown in Figure 14. To re-execute the First steps console, use the following command:
cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/firststeps

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 35 of 40

developerWorks

ibm.com/developerWorks

./firststeps.sh

Section 7. Summary
An application server is the core of most three-tier enterprise Web installations. IBM WebSphere Application Server is one of the most popular application servers in use today, supported by IBM and a huge ecosystem of third-party applications and vendors. The ability to download and experiment with a trial version of WebSphere Application Server makes it easy for you to install, test, and familiarize yourself with WebSphere Application Server in your environment. WebSphere Application Server provides a robust, powerful, well-tested, and well-supported foundation for your enterprise Web applications and services.

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 36 of 40

ibm.com/developerWorks

developerWorks

Downloads
Description
Sample SysVInit WebSphere startup file

Name
websphere_sysvinit.sh

Size
2KB 2KB

Download method
HTTP HTTP

Sample Upstart WebSphere startup file websphere_upstart.sh Information about download methods

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 37 of 40

developerWorks

ibm.com/developerWorks

Resources
Learn See the WebSphere Application Server 7 software and hardware requirements documentation for specific operating system patch requirements and supported database information. Get product documentation for IBM WebSphere Application Server and related products from the WebSphere library. See the WebSphere Application and transaction infrastructure page for information about many of the WebSphere add-on products that are currently available. See the IBM Redbooks Domain on the WebSphere software platform for technical and procedural information on the WebSphere software platform and WebSphere applications. See the WebSphere zone on developerWorks for additional information about planning, developing, and deploying enterprise Web environments and applications. See the IBM HTTP Server Information Center for detailed information about using the IBM HTTP Server with WebSphere Application Server. Learn more about WebSphere Application Server Network Deployment, where clusters of application servers deliver advanced capabilities for high-performance, high-availability environments. In the AIX and UNIX area on developerWorks, get the resources you need to advance your skills in UNIX administration. Check out additional WebSphere tips and tricks from the developerWorks site. Learn more about SysVInit, the traditional UNIX and Linux system startup and shutdown mechanism. Learn more about Upstart, a relatively new, event-driven startup mechanism created for Ubuntu and popular largely because of its support for concurrency and responsiveness to system events. Check out additional UNIX tips and tricks from the developerWorks site. Browse the technology bookstore for books on WebSphere Application Server and other technical topics. Get products and technologies Download a free trial version of WebSphere Application Server version 7 for your platform.

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 38 of 40

ibm.com/developerWorks

developerWorks

Download the IBM Java SDK for your platform. You may need to download and install the IBM Java SDK to install and use IBM WebSphere Application Server on certain Linux distributions. Download full and trial versions of other WebSphere products. Download IBM HTTP Server version 6.1 for your platform. Popular 3-tier application servers include WebSphere products, Adobe JRun, Oracle's BEA WebLogic, Red Hat's JBoss, and Sun Microsystems' Enterprise JavaBeans technology. Some examples of trusted third-party certificate authorities are thawte, VeriSign, and GeoTrust. Discuss Check out developerWorks blogs and get involved in the developerWorks community. Participate in the WebSphere Application Server forum.

About the author


William von Hagen William von Hagen has been a UNIX systems administrator for more than 20 years and a Linux advocate since 1993. Bill is the author or co-author of books on subjects such as Ubuntu Linux, Xen Virtualization, the GNU Compiler Collection (GCC), SuSE Linux, Mac OS X, Linux file systems, and SGML. He has also written numerous articles for Linux and Mac OS X publications and Web sites. You can reach Bill at wvh@vonhagen.org.

Trademarks
Java and JavaServer Pages are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Microsoft, Windows, and Windows Server are trademarks of Microsoft Corporation in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries.

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 39 of 40

developerWorks

ibm.com/developerWorks

Other company, product, or service names may be trademarks or service marks of others.

Install and configure WebSphere Application Server on UNIX and Linux systems Copyright IBM Corporation 2008. All rights reserved.

Trademarks Page 40 of 40

You might also like