Professional Documents
Culture Documents
Au Wasonlinux PDF Uses of Linux
Au Wasonlinux PDF Uses of Linux
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.
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.
developerWorks
ibm.com/developerWorks
requirements.
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.
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.
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:
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:
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.
2. 3. 4.
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
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.
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
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.
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.
developerWorks
ibm.com/developerWorks
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.
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.
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.
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.
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.
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.
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.
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
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
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.
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.
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
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.
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:
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:
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
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:
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.
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.
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