Archives

Installing WebSphere Application Server 8 in Linux

Steps for Installation of WebSphere Application Server 8 on Linux

Scope of the Document
a) Install the Installation Manager
b) Install Websphere Application Server 8 using GUI on Linux.
It do not contain the steps for the profile creation . it will be covered in the further posts

Installation scenarios

Before beginning an installation, it is important that you think about the type of WAS install you wish to perform.
The WAS installation process requires two main actions:
1. Installation of base binaries (which are the core executable).
2. Profile creation.

A conceptual diagram of the WAS installation components is shown next:

Was8Install

Preparation and prerequisites

Before we start with the WebSphere Application Server installation, we need to ensure the correct installation media is available and that the operating system prerequisites have been met.

  • What version of WAS is required to support your applications?
  • Are there any OS parameters  for the platform required for the chosen version of WAS?
  • What version of OS and fix packs are required to support the chosen version of WAS?
  • Identify the filesystem where you will be installing the Websphere binaries and the path where  you will have the profile created
  • Those filesystems is recommended to be on a  separate partition should have sufficient space and also for the  logs
  • Have atleast 1GB for the /tmp folder
  •   Have the root access or the sudo access

Graphical installation

Part 1—Installing the base binaries

Details of the Server : Red Hat Enterprise Linux Server release 5.6
Binaries Path : /opt/IBM/WebSphere
WAS Version: WAS ND 8

The WAS v8 installation GUI has been changed since WAS v7. IBM has updated many of its products to use a common Java-based installation tool called the IBM Installation Manager (IIM).

 Downloading WAS 8

1) Traditionally, installation media for WAS used to be obtained on CD
2) Organizations moving to Internet-based downloads often referred to as software by wire.
IBM provides the official WAS software downloads using an online system called Passport Advantage
3) Use the customers Passport Advantage to download the package

The WAS v8 installation GUI has been changed since WAS v7.
A major benefit is that IIM provides a common installation interface for many products

Prior to the WAS 8 release, each OS version of WAS required separate downloads.
Using a repository system now saves many hours of download and also disk space and simplifies the management of different installation packages.

Downloading and Installation of IBM Installation Manager

1) You can download the IBM Installation Manager from the Passport Advantage or
https://www-304.ibm.com/support/docview. wss?uid=swg24029226.
Ie “agent.installer.linux.gtk.x86_1.5.2000.20120223_0907.zip”

2) Copy the “agent.installer.linux.gtk.x86_1.5.2000.20120223_0907.zip” file to a suitable location on your Linux server and unzip it

Imsoftware3) Decompress the ZIP file using the unzip command

4) Ensure you have an X Window System (X11 for short) session running or Xming or Xmanager for GUI access to the Linux Server

5) Run the installer using the following command from the installed folder
./install

6) The IIM installer will begin an installation wizard. The following screen is presented detailing the version of IIM that is going to be installed.

IIM1

IIM2

7) Read the license agreement, and then select the I accept the terms in the license agreement radio option, and click Next

IIM3

8) It will you will be given an option to change the location where the IBM Installation Manager will be installed.
You can accept the default location or alter it as per your requirement.
This path is referred <iim_root>. Click Next to continue:

IIM4

9) Review the installation summary information that is presented and click Install to perform the installation.

IIM5

10) Once the IIM installation has completed, click the Restart Installation Manager button to restart IIM.

IIM6

11) You can also launch the Installation Manager from the path /opt/IBM/InstallationManager/eclipse/
Execute ‘./IBMIM”

IIM7

12) Once IIM is loaded, you will be presented with the workbench screen

IIM8

Verify the Installation

Navigate to the /opt/IBM/InstallationManager/ path

IIMVer3

Navigate to /var/ibm/InstallationManager

IIMVer4

Installation of  WebSphere Application Server 8

1)    Launch Installation Manager using ./IBMIM

IIM7
2)    Set the repository location preferences for the IIM
Using the File menu, select the Preferences option

Was8Install1

3)    To add a repository location, click the “Add Repository” button
I have saved the Software dump at /IBMSoftware/WAS/repository.config
Click Apply and OK

Was8Install2
4)     From the IIM workspace launch the “INSATLL” option

Was8Install3

5)    Ensure that all the installation packages are selected.

Click the Check for other Versions, Fixes and Extensions button and IIM will re-verify the  available downloads online.
Once the verification is complete, click Next.

Was8Install4

6)    Accept the license and click Next

Was8Install5

7)    The next screen defines where the IIM will create the WAS-shared resources folder. We have used the default provided location /opt/IBM/IMShared

Was8Install6

8)    Define the location where the WAS needs to be installed . We will keep at default ie /opt/IBM/WebSphere/AppServer/

Was8Install79)    On the next page, select your preferred language, and click Next again, to move onto the features screen

10)    Within the features screen, you will have the option to install the sample applications provided by IBM for testing JEE concepts and features of WAS.

Was8Install8

11)    Click Next to proceed to the final summary screen and review the options you have chosen in the previous steps.

Was8Install9

12) Click the Install button to begin the actual WAS installation.

13) Once the installation is complete, you will be given an option to run the Profile Management Tool (PMT) to create a WAS profile.
We will install the Profiles later so we will Select the option labelled None and exit the IBM Installation Manager.

 

Verifying The Installation

 


1)    Navigate to the Installation folder  to verify if the permissions and the folders are created
2)    Check the Version of the Websphere Application Server using versionInfo.sh
Execute  <was_root>/bin/versionInfo.sh

Was8Install10

 

Installation logs

The IIM logs events as it is installing the WAS product . It will update the events during the installation of WAS
Path of Logs : /var/ibm/InstallationManager/logs/

IIM Logs are XML based logs

Was8Install11

Installing Installation Manager 1.5 on Linux

Installation Manager Wizards guide you through the steps that you must take to install, modify, update, roll back, or uninstall your IBM products.
Use Installation Manager to install individual software packages on your local machine

The WAS v8 installation GUI has been changed since WAS v7.
A major benefit is that IIM provides a common installation interface for many products

Prior to the WAS 8 release, each OS version of WAS required separate downloads.
Using a repository system now saves many hours of download and also disk space and simplifies the management of different installation packages.

Downloading and Installation of  IBM Installation Manager

1) You can download the IBM Installation Manager from the Passport Advantage or
https://www-304.ibm.com/support/docview. wss?uid=swg24029226.
Ie  “agent.installer.linux.gtk.x86_1.5.2000.20120223_0907.zip”

2) Copy the “agent.installer.linux.gtk.x86_1.5.2000.20120223_0907.zip” file to a suitable location on your Linux server and unzip it

Imsoftware3) Decompress the ZIP file using the unzip command

4) Ensure you have an X Window System (X11 for short) session running or Xming or Xmanager for GUI access to the Linux Server

5) Run the installer using the following command from the installed folder
./install

6)    The IIM installer will begin an installation wizard. The following screen is presented detailing the version of IIM that is going to be installed.

IIM1

IIM2

7)    Read the license agreement, and then select the I accept the terms in the license agreement radio option, and click Next

IIM3

8)    It will you will be given an option to change the location where the IBM Installation Manager will be installed.
You can accept the default location or alter it as per your requirement.
This path is  referred  <iim_root>. Click Next to continue:

IIM49) Review the installation summary information that is presented and click Install to perform the installation.

IIM5

10)    Once the IIM installation has completed, click the Restart Installation Manager button to restart IIM.

IIM6

11) You can also launch the Installation Manager from the path /opt/IBM/InstallationManager/eclipse/
Execute  ‘./IBMIM”

IIM712)    Once IIM is loaded, you will be presented with the workbench screen

IIM8

Verify the Installation

Navigate to the  /opt/IBM/InstallationManager/ path

IIMVer3

Navigate to /var/ibm/InstallationManager

IIMVer4

Command of the Installation Manager

Check the version of Installation Manager
1) Navigate to /opt/IBM/InstallationManager/eclipse/tools
Execute : ./imcl -version

IIMVer

Check the list of Installed Packages
1) Navigate to /opt/IBM/InstallationManager/eclipse/tools
Execute : ./imcl listInstalledPackages

IIMVer1

Check the List of Installed Directories
1) Navigate to /opt/IBM/InstallationManager/eclipse/tools
Execute : ./imcl listInstallationDirectories

IIMVer2

 

 

Monitor Apache Web Server Load and Page Statistics

As a System Admin it becomes very important to check the Apache server statistics for performance and troubleshooting any issues

Apache’s mod_status can be used to provide these details
Apache’s mod_status shows a plain HTML page containing the information about current statistics of web server state including.

  •     Total number of incoming requests
  •     Total number of bytes and counts server
  •     CPU usage of Web server
  •     Server Load
  •     Server Uptime
  •     Total Traffic
  •     Total number of idle workers
  •     PIDs with respective client and many more.

By default the status page is disabled to hide internal information from unauthorized users.
=======================================================================================
Enable mod_status in Apache
The default Apache installation comes with mod_status enabled
To validate it .
a) login in to the Apache server
b) Navigate to the Apache configuration file ie /etc/httpd/conf/httpd.conf
[root@mqnode AppServer]# vi /etc/httpd/conf/httpd.conf
c) Search for the word “mod_status”
#LoadModule status_module modules/mod_status.so
If its commented then uncomment it
d) Restart the apache instance using

[root@mqnode AppServer]# service httpd stop
Stopping httpd:                                            [  OK  ]
[root@mqnode AppServer]# service httpd start
Starting httpd:                                            [  OK  ]

=======================================================================================
Configure server-status

1) Login the the Apche Server
2)Open the /etc/httpd/conf/httpd.conf
3) Search for server-status

# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the “.example.com” to match your domain to enable.
#
#<Location /server-status>
#    SetHandler server-status
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Location>

Remove the comment character (“#”) in front of each line.
Be careful about the “Allow from” line.
Here you can customize to put the IP address and fine tune the security to ensure that unauthorized access to server-status url
Recommended to use your IP address that you are connecting from.
You might also want to consider password-protecting this page using htpasswd.

4) We would use the htpasswd for security

5) Setup the htpasswd
[root@mqnode ~]# htpasswd -c /etc/httpd/conf/server-status-htpasswd status
New password:
Re-type new password:
Adding password for user status
[root@mqnode ~]# cat /etc/httpd/conf/server-status-htpasswd
status:hdtkPGbH2G81U

5) Use this  /etc/httpd/conf/server-status-htpasswd within the configurations for server-status in httpd.conf

<Location /server-status>
SetHandler server-status
AuthType basic
AuthName “Apache status”
AuthUserFile /etc/httpd/conf/server-status-htpasswd
Require valid-user
</Location>

Screenshot:status_3
6) Enable ExtendedStatus
The “ExtendedStatus” settings adds more information to the statistics page like, CPU usage, request per second, total traffic, etc.

7)  To enable it, edit the the same httpd.conf file and search for the word “Extended” and Uncomment the line and set the status “On” for ExtendedStatus directive.
ExtendedStatus On

8) Restart Apache
[root@mqnode ~]# service httpd restart
Stopping httpd:                                          [  OK  ]
Starting httpd:                                          [  OK  ]

9) Access mod_status Page
http://serveripaddress/server-status

status_1

It will prompt for the user name and password. Enter the Details

 

status_2

 

 

View jks certs in WebSphere

 

There is a utility “keytool” to manage the certificates
With it you  can create , view , delete,  import the certs

Navigate to
[root@mqnode ~]# cd /opt/IBM/WebSphere/AppServer/java/bin/
[root@mqnode bin]# ./keytool -list -v -keystore /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/etc/DummyServerTrustFile.jks
Enter keystore password:WebAS

The Default password  for certs in Websphere Application Server is WebAS

 

keytool

Create the DMGR Profile using Profile Management Tool

After installing the core Websphere product files for the product, you must create a profile.
You can refer to  WebSphere App Server 7.0 Installation on Linux Using GUI

Methods to create the profile
a) To create the profile you can use the graphical user interface tool that is provided by the Profile Management Tool.
b) You can also use the manageprofiles command to create profiles

Assumption :
a) The binaries are installed in /opt/IBM/WebSphere/AppServer
b) You have sudo access or root access

1) Profile Creation
Launch the Profile Management Tool
<was_root>/bin/ProfileManagement/pmt.sh

In our case its /opt/IBM/WebSphere/AppServer/bin/pmt.sh

ProfileDmgr1

2) Profile Management Tool
The PMT has loaded, the option to create a profile will be available.Click Create to start the profile creation wizard

ProfileDmgr_2

 

 

3) Environment Selection
Select which type of Profile you want to create
We would be creating the Dmgr profile . It is within the Management option

profiledmgr_4

4) Server Type Selection
Select the Deployment Manager profile and click Next

profiledmgr_5

4) Profile Creation Option
We will select the “Advanced profile creation” as we will be able to customize the path, cell names, ports etc.
Click Next

profiledmgr_6

5) Optional Application Deployment
Select the ” Deploy Administration console” this application is used to manage your application servers
Click Next

profiledmgr_7

6) Profile Name and Path
Enter the Profile Name and the Path of the DMGR profile
Click Next

ProfileDmgr_8

7) Node , Host and Cell
Enter the Node , Host and Cell of the DMGR profile
Click Next

profiledmgr_9

7) Administrative Security
Select the Administration security
Enter the admin username : in our case we would do as “wasadmin”
Enter the password
Click Next

This is user with which we can login to the admin console and the administer the cell

profiledmgr_10

8) Security Certificate
The certificates for the internal communication and access .. we will use the create “Default Personal Certificates”
Click Next

profiledmgr_11

9) Security Certificate 2
The certificate details are mentioned and the expiry duration is mentioned .. you could extent the validation of the certificate
Click Next

profiledmgr_12

10) Port Details
The Port assignment is mentioned . you could change the ports
Ensure that the ports are not in use . Else it would cause the port conflict
Click Next

profiledmgr_13
10)Linux Service Definition
Enabling this selection will create scripts in the /etc/rc.d/ to auto restart the profile when the physical restarts
Click Next

profiledmgr_14

11) Summary
Validate the summary details before creating the profile  . Click Create

profiledmgr_15

12)Profile Creation Progress
During the profile creation the logs would be created in <was_home>/logs/manageprofile/ folder
Monitor the logs for any errors

profiledmgr_16

12)Profile Creation Completed
If the profile creation is sucessful the message will be displayed .
Enable the first steps

ProfileDmgr_17

13)First Steps
Here you could validate the installation
Start the dmgr servers etc

ProfileDmgr_18

profiledmgr_19

14 ) AboutThisProfile
This text is within the <profile_home>logs/AboutThisProfile.txt
This file will contain the details of the profile like
ProfileName,Ports, Path etc

profiledmgr_20

15 ) List the profiles
Navigate to <WAS_HOME>/bin/manageprofile.sh -listProfiles
for eg /opt/IBM/WebSphere/AppServer/bin/manageprofile.sh -listProfiles

ProfileDmgr_21

16 ) Login to the admin console
Open the browser
Enter the url ; https://ipaddressofhost:9043/ibm/console
Check the Administrative Console Port Secure in AboutThisProfile.txt
Enter the
Admin username : wasadmin
Put the password and login

ProfileDmgr_22

WebSphere App Server 7.0 Installation on Linux Using GUI

Installation of Websphere 7 on Linux

a) Before Installation Some planning needs to be done
b) What version of Websphere is required to support your applications?
c) Are there any OS tweaks for the platform required for the chosen version of Websphere?
d) Ensure all the prerequisites are satisfied
e) There are supported browsers on the servers where WAS is going to be installed
f) What version of OS and fix packs are required to support the chosen version   of WebSphere?
g) What topology will you be installing and the profiles created
h) Which filesystem to download the software  does it have enough space
i) You would need the root or sudo access to install it ( though you can use the non-root installation ) It can get   tricky due to permission issues   So within the scope of this training we would install using root
j) Ensure that X11 rpms are installed and the Linux server has a GUI or X11 Forwarding enabled

Installation of Websphere Application Server 7 using GUI
1) Getting the Software Package
a) Login to the Passport Advantage using the Customers Login
b) Download and save the software dump to the server where you want to install
c) Ensure there is sufficient space in the filesystem where you are going to extract the files
d) Identify which filesystem you want to install

2) Extracting the WAS 7 Software  
a) Login as root
I have saved the software for WAS 7 at /IbmSoftware/was
b) They are in the *.tar.gz formart
c) Use gunzip to unzip the each files ie there are 3 files
#cd /IbmSoftware/was
#gunzip C1G34ML.tar.gz
Similarly do it for all the files
Screenshot :

install1
d) Ensure all the 3 files are extracted in the same folder
e) Untar all the 3 files in the same location
for eg  #tar -xvf C1G34ML.tar
Screenshot :

install2

After the Extraction

install_3

f) After the extraction of all the tar files

3) Execute the ./launchpad.sh

4) Installation wizard welcome screen
It will be presented with the installation wizard welcome screen

install_launchpad11

Clicking on Next will take you to the software license agreement screen

5) Software license agreement
Accept the license agreement and click Next

install_7

6) System prerequisites check
The installer will check to ensure that your Linux OS meets the required prerequisites.
Click Next

install_8

7) Optional features
To enable the installation of samples by checking the Install the Sample applications checkbox.

install_14

Click Next

8) Installation directory
Specify the path where you want to install the Websphere Binaries.

install_9

In our case its /opt/IBM/WebSphere/AppServer

9) Profile Management Tool
After the base binaries are installed, we will use another tool called the  Profile Management Tool
to demonstrate how to independently create an application server profile.
We select None .Click Next

Install_15

10) Centralized Installation Manager
We don’t select the Repository and we keep it unselected as we dont want to create this repository. Click Next

install_16

11) Installation Progress
Click Next and the installation process will start and the progress will be shown

install_13

12) Successful Installation

install_12

Click Finish

13) Validate the Files System where the WAS is installed . In our case its /opt/IBM/WebSpere/AppServer

14) To check to see if the base binaries have installed correctly
Run the WebSphere command script installver.sh which is found in the bin folder
<was_root>/bin/installver.sh

install_17

15) This completes the installation of WAS 7 using GUI

 

How to manually generate a Heapdump in Websphere

Occasionally a heapdump needs to be generated without waiting for an OutOfMemoryError condition to occur.

Method 1: Using Kill command in unix
1) Login n the Administrative Console:
2) Navigate to  Servers > Application Servers > serverName:
3) In the Server Infrastructure section open Java and Process Management, then select Process Definition:
4) In the Additional Properties select Java™ Virtual Machine:
5) Add the following string to the Generic JVM arguments field:
-Xdump:heap:events=user
6) Press OK, and save the configuration.
7) Recycle the App Server for the changes to take effect

genericjvmargument1
To generate the heapdump, send the Application Server an interrupt. Use the “kill” command:

kill -3 <java process ID>

This will not “kill” the Application Server process, it just generate the heap  dump and thread dump in the Profile_HOME

Method 2: wasadmin command
1)Wsadmin provides functions to trigger a heapdump or javacore manually.
2)To call this functionality you need to first query the JVM MBean you are interested in and can then invoke “generateHeapDump” or “dumpThreads” functionality.

Invoke the generateHeapDump operation on a JVM MBean, for example,
a) Finding JVM objectName:
   wsadmin>$AdminControl queryNames type=JVM,*
WebSphere:name=JVM,process=server1,platform=proxy,node=IBM-ADCC282A82BNode04,j2eeType=JVM,J2EEServer=server1,…

b) Set the  variable for the concerned server
wsadmin>set jvm [$AdminControl queryNames type=JVM,*]
WebSphere:name=JVM,process=server1,platform=proxy,node=IBM-ADCC282A82BNode04,j2eeType=JVM,J2EEServer=server1,…

(set jvm is just a name given for the variable )

b) Invoking the generateHeapDump operation on JVM MBean:
wsadmin>$AdminControl invoke $jvm generateHeapDump

 

Method 3: Environment Entries

Update the Environment variables for the Path where you want to generate the heap , core and thread .. for each JVM where you want it set. I want the dumps generated under /appprofiles/server1/

a) Create the necessary directories

mkdir -p /appprofiles/server1/core
mkdir -p /appprofiles/server1/heapdump
mkdir -p /appprofiles/server1/javacore

b) In the admin console Navigate to the below path

Application servers > server1 > Process definition > Environment Entries

c) Set these Environment Entries

IBM_JAVACOREDIR
/appprofiles/server1/javacore

IBM_HEAPDUMP
true

IBM_HEAPDUMPDIR
/appprofiles/server1/heapdump

IBM_HEAP_DUMP
true

IBM_COREDIR
/appprofiles/server1/core

d) Restart the server

e) You can use kill-3 pid to generate the dumps . it will get created in the specific path you have mentioned

Also when the application server will automatically generate the dumps it will get created in the above path

 

3) heap dumps can be found under profile_rootprofile-name with naming heapdump.<date>..<timestamp><pid>.phd

AutoRestarting Application Servers With Nodeagent in WebSphere

In WebSphere 7, by default, the Nodeagent will take no action if an application server fails. In order for the Nodeagent to intervene and automatically restart a failed application server instance, the ‘monitoring policy’ must be set for that application server.

Login to the Admin console, perform the following:

1 . Click Servers.>>Select Server Types >> Select WebSphere Application Servers. >>Select <server_name> to monitor

docview.wss

 

2) Navigate to <Application Server> –> Java and Process Management –> Monitoring Policy

 

docview.ws1s

3)  Check the box next to “Automatic Restart”

4).  In the “Node Restart State“, set the state to “STOPPED

 

docview.wss2

 

  • If set to ‘STOPPED‘ actions above will allow the nodeagent to auto-restart a failed or killed application server
  • If set to ‘RUNNING‘ not only will the nodeagent restart a failed or killed application server, but it will autostart the application server upon a nodeagent restart.  (This may be unwanted in certain environments where application servers are only supposed to run at certain times or if there is a specific application start order.)
  • If set to ‘PREVIOUS‘ will enable  to return to its current state after the node restarts.

If you wish to have the nodeagent automatically start application servers when it comes online, set the state to “RUNNING“.

SyncNode to the DMGR in WAS

Once you have identified its not in Sync .. they you could use these 3 methods to sync Node
Option1) Go to the Admin Console >> System Administration >> Nodes >>
Select the node which is not synced ( which is identified by the broken sign>
Click on “Full Resynchronize”
wasnd_cluster_synch
Option2) Go to the ManageNode where the Node is not synced
Navigate to the <install_root>/AppServer/bin
./syncNode.sh <deploymgr host> <deploymgr port>

There are various options to syncNode to suit your requirements .. like -stopserver etc

Option3) Using the wsadmin command
We we would proceed with following to get the node synchronized with dmgr

$AdminControl invoke $node_name sync

After synchronization process finishes you should see similar output

wsadmin>$AdminControl invoke $node_name sync
true
wsadmin>

 

 

How to check if Node is in sync with Dmgr

Option1: Login to the Admin console >> System Administration >> Nodes >>
Within the Nodes there would be a column for the Sync Status
If it is broken it means that the Sync is not synced

Refer the Snapshot below

syncnode1

The node01 and node02 are not synced

===================================================================

Option2:

===================================================================
First of all localize wsadmin tool on your host. It is located in <install_root>/AppServer/bin

cd <install_root>/AppServer/bin

Start wsadmin tool to connect to deployment manager

wsadmin.sh -host <dmgr_server> -port <dmgr_SOAP_port> -conntype SOAP -username <admin_username> -password <admin_password>

Assign node name to some variable I have used node_name in this example and mynode is the name of the node you would like to synchronize

set node_name [$AdminControl completeObjectName type=NodeSync,node=mynode,*]

For Eg
wsadmin>set node_name [$AdminControl completeObjectName type=NodeSync,node=mynode,*]
WebSphere:mbeanIdentifier=nodeSync,cell=my_cell,process=nodeagent,name=nodeSyn
c,platform=common,node=mynode,version=6.0.2.23,type=NodeSync

Now, when we know the exact name of the node we can check if it is in sync with deployment manager

$AdminControl invoke $node_name isNodeSynchronized

If node is in sync with deployment manager you will see following output

wsadmin>$AdminControl invoke $node_name isNodeSynchronized
true
wsadmin>

The “True” Represents that the Node is Synced