Wednesday, 9 October 2013

HOWTO: script WebSphere AS 8.5.5 internet install

This post describes how to perform a scripted install of a WebSphere Application Server (WAS) development environment from the internet. This is adequate if you want automated installation that will be repeated infrequently. Prior knowledge of WAS, Eclipse and Linux is assumed.

IBM has at least three offerings for basic Java EE development:

  • WAS for Developers - the full-fat commercial WAS server
  • Liberty Profile - a lightweight, developer-friendly server
  • Community Edition - a blue-washed Apache Geronimo

The scripts described here install the first two options with IDE tooling and Java 7. Eclipse Juno is the latest release with this level of WDT support.

Formally, the following are installed:

  • IBM WebSphere Application Server for Developers
  • IBM WebSphere SDK Java Technology Edition
  • IBM WebSphere Application Server Liberty for Developers
  • IBM WebSphere SDK Java Technology Edition Version 7.0 for Liberty
  • Eclipse IDE for Java EE Developers (Juno Sr2; Eclipse 4.2)
  • WebSphere Application Server V8.5 Liberty Profile Tools
  • WebSphere Application Server V8.5 Tools

OS and configuration

I chose CentOS 6.4 32-bit as the platform as it is nearly identical to a supported Red Hat version.

I installed the OS onto VMWare Player 6.0.0 build-1295980 using CentOS-6.4-i386-LiveCD.iso. I left the OS packages as-is with the exception of adding support for the VMWare Tools. Command:

yum groupinstall 'Development Tools'


The following files are used to perform the install:

All should be placed in the same directory. is the IBM Installation Manager (IBMIM) and can be downloaded via the WASdev downloads page. Choose the HTTP download option to login to the IBM site with your IBM ID and locate the file.

masterpw.txt should contain an arbitrary password string of your own devising.

The other files are listed below or you can download them using the links.

Note: these scripts will not work with


The provided scripts install the applications without the need for root access.

The install script can be invoked in the form:

./  yourpassword


install_was.xml is an IBMIM response file for silent installs:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE agent-input [

<!--The "acceptLicense" attribute has been deprecated. Use "-acceptLicense" command line option to accept license agreements.-->
<agent-input acceptLicense='true'>
<repository location=''/>
<repository location=''/>
<profile id='IBM WebSphere Application Server V8.5' installLocation='&home;/IBM/WebSphere/AppServer'>
<data key='eclipseLocation' value='&home;/IBM/WebSphere/AppServer'/>
<data key='user.import.profile' value='false'/>
<data key='cic.selector.os' value='linux'/>
<data key='cic.selector.arch' value='x86'/>
<data key='' value='gtk'/>
<data key='' value='en'/>
<install modify='false'>
<offering id='' version='8.5.5000.20130528_1049' profile='IBM WebSphere Application Server V8.5' features='-'/>
<offering id='' version='8.5.5000.20130528_1108' profile='IBM WebSphere Application Server V8.5' features='-'/>
<offering id='' version='8.5.5000.20130607_0847' profile='IBM WebSphere Application Server V8.5' features='-'/>
<offering id='' version='8.5.5000.20130723_1455' profile='IBM WebSphere Application Server V8.5' features='-'/>
<offering id='' version='8.5.5000.20130514_1044' profile='IBM WebSphere Application Server V8.5' features='core.feature,ejbdeploy,thinclient,embeddablecontainer,' installFixes='none'/>
<offering id='' version='7.0.4001.20130510_2103' profile='IBM WebSphere Application Server V8.5' features='' installFixes='none'/>
<offering id='' version='8.5.5000.20130514_1313' profile='WebSphere Liberty V8.5' features='liberty,embeddablecontainer,extprogmodels' installFixes='none'/>
<offering id='' version='7.0.4001.20130510_2103' profile='WebSphere Liberty V8.5' features='' installFixes='none'/>
<profile id='WebSphere Liberty V8.5' installLocation='&home;/IBM/WebSphere/Liberty'>
<data key='eclipseLocation' value='&home;/IBM/WebSphere/Liberty'/>
<data key='user.import.profile' value='false'/>
<data key='cic.selector.os' value='linux'/>
<data key='cic.selector.arch' value='x86'/>
<data key='' value='gtk'/>
<data key='' value='en'/>
<preference name='' value='&home;/IBM/IMShared'/>
<preference name='' value='30'/>
<preference name='' value='45'/>
<preference name='' value='0'/>
<preference name='offering.service.repositories.areUsed' value='true'/>
<preference name='' value='false'/>
<preference name='' value='false'/>
<preference name='http.ntlm.auth.kind' value='NTLM'/>
<preference name='http.ntlm.auth.enableIntegrated.win32' value='true'/>
<preference name='' value='true'/>
<preference name='' value='false'/>
<preference name='PassportAdvantageIsEnabled' value='false'/>
<preference name='' value='false'/>
<preference name='' value='false'/>
<preference name='' value='true'/>
<preference name='' value='true'/>
<preference name='' value='true'/>

The response file defines what to install, where and the repositories used to locate the software. It is possible to hand-code response files, but it is easier to record them using IBMIM's -record switch. The USERHOMEDIR string will be replaced with the user's home directory by the install script below; this version of IBMIM requires absolute directories.

masterpw.txt is an arbitrary password for generating credentials for authentication; example:


It is not possible to pass an IBM ID and password directly to the install process; it requires credentials in the form of a secure storage file. The script below uses the above password to secure the IBM ID using imutilsc. is a Bash script that coordinates the install operations:

set -e
if [[ -z "$1" ]] || [[ -z "$1" ]] ; then
  echo usage: ./ yourpassword
  exit 1

#install IBMIM
mkdir /tmp/ibmim
echo Extracting install manager
unzip -q -u agent.installer.linux.gtk.x86_1.6.2000.20130301_2248 -d /tmp/ibmim
echo Installing IBM Installation Manager
/tmp/ibmim/userinstc -acceptLicense
#rm -Rf /tmp/ibmim

#install WAS
echo Setting $HOME in response file
sed -e "s#USERHOMEDIR#$HOME#g" install_was.xml > /tmp/install_was.xml
echo Generating credentials
$TOOLS/imutilsc saveCredential -url $REPO -userName $1 -userPassword $2 -masterPasswordFile masterpw.txt -secureStorageFile ~/secure_repo.dat
echo Installing WAS from internet...     may take some time
$TOOLS/imcl input /tmp/install_was.xml -log ~/wasinstall.log -acceptLicense -masterPasswordFile masterpw.txt -secureStorageFile ~/secure_repo.dat
rm ~/secure_repo.dat

#install Eclipse
echo Downloading $ETAR
wget -O /tmp/$ETAR$ETAR
mkdir $JUNO
tar xzf /tmp/$ETAR -C $JUNO
#rm -Rf /tmp/$ETAR
echo Setting Eclipse JRE to WAS JDK
ln -s $JRE $JUNO/eclipse/jre
echo Installing WDT plugins from internet...  may take some time,,
$JUNO/eclipse/eclipse -nosplash -application org.eclipse.equinox.p2.director -repository $WDTREPO,$JUNOREPO -installIU $FEATURES
ln -s $JUNO/eclipse/eclipse ~/Desktop/eclipse

Here's a rough outline of what the above script does:

  1. Install WAS
    1. Unzip the IBMIM installer
    2. Install IBMIM into user-space using userinstc
    3. Set the HOME directory in the response file
    4. Generate the IBM repository credentials
    5. Install WAS using imcl
  2. Install Eclipse
    1. Download the Juno build using Wget
    2. Untar Juno
    3. Set the Eclipse JRE to the WAS JDK
    4. Use the Eclipse p2 director to install the WDT plugins

End notes

Installing WAS from the internet is slow, bandwidth intensive and subject to the vagaries of connectivity. These scripts make no allowance for proxies. If installs were going to be repeated frequently then offline repositories would be more appropriate; that is a topic for another post.

1 comment:

All comments are moderated