Most of the examples on the internet show you how to install WAS using GUI, but if you want to install the WAS on a Ubuntu server that doesn't come with xorg-server, then you might need to do some internet digging. There are numerous posts out there providing hints but I had to piece them up together to make the procedure work in my environment.
I am not great a fan of having my servers to be able to support GUI applications so I will not install the xorg-server package. Your preference may vary.
For that reason I will be performing a silent installation of IBM WAS 7.
What we need in order to perform a silent installation is the following:
- IBM WAS 7 software package
- Ubuntu 12.04 64-bit server installation
- Putty
- A response file for silent installation
- root access to the Ubuntu server
At the end of the install, we will have created a profile called 'appsvr01' and a default server called 'server1' using default ports, when we use the following response file.
-OPT silentInstallLicenseAcceptance="true" -OPT disableOSPrereqChecking="true" -OPT installType="installNew" -OPT profileType="standAlone" -OPT feature="noFeature" -OPT PROF_enableAdminSecurity="true" -OPT PROF_adminUserName="wasadmin" -OPT PROF_adminPassword="password" -OPT PROF_profileName="appsvr01" -OPT PROF_defaultPorts="true" -OPT installLocation="/opt/IBM/WebSphere/AppServer" -OPT traceLevel="INFO"
The options are self-explanatory. Due to the fact that Ubuntu is not a supported platform to run WAS, the 'disableOSPrereqChecking="true"' is necessary.
It is not necessary to pre-create the installation directory. As long as the installation process has the privilege to create the folder, we are ok.
Before we start, there is this little subtlety that we need to address. If you execute the command "ls -al `which sh`" you will see that the /bin.sh is actually pointing to a binary called 'dash'.
~# ls -al `which sh` lrwxrwxrwx 1 root root 4 Jun 7 20:49 /bin/sh -> dash
We need to re-link the/bin/sh to /bin/bash as the default symbolic link of sh in Ubuntu is pointing to dash. There are numerous posts on the internet talked about this. Won't worry about why it is so, just interested to install the IBM WAS. Fix the sh sym link issue.
cd /bin
unlink sh
ln -s /bin/bash sh
Installation Steps:
1) Untar the IBM Websphere Application Server 7 archive.
# tar -xzvf was.7000.wasdev.nocharge.linux.amd64.tar.gz2) Create a responce file for silent installation
# cat > responce.text << EOF -OPT silentInstallLicenseAcceptance="true" -OPT disableOSPrereqChecking="true" -OPT installType="installNew" -OPT profileType="standAlone" -OPT feature="noFeature" -OPT PROF_enableAdminSecurity="true" -OPT PROF_adminUserName="wasadmin" -OPT PROF_adminPassword="password" -OPT PROF_profileName="appsvr01" -OPT PROF_defaultPorts="true" -OPT installLocation="/opt/IBM/WebSphere/AppServer" -OPT traceLevel="INFO" EOF
It is also worth noting that in the WAS directory in the expanded installation archive, there is a sample response file named "responsefile.base.txt". Have a look at this file, it should give you a good idea of what options are supported without needing to read through thousands of pages of documents.
3) cd to WAS directory and execute the install.sh with the following arguments
# ./install -is:javaconsole -options responce.text -silentOr
# install -options responce.text -silent -log # !/root/was_install_log.txt @ALLto log all installation messages.
The "-is:javaconsole" argument tells the installer to print the output to stdout. Unfortunately, on my server, this doesn't work as it gives this warning message and terminates the installation process :-(
WARNING: could not write using log service: java.lang.IllegalStateException: proxy has been closed
I had to remove the argument, clean the installation directory and re-run the installation for a successful outcome.
4) During the installation process, you could watch the progress by tail-ing the log file located in ~/waslogs directory. (In the first-time installation, a temporary log file directory is always created in the home directory of the current user)
# tail -f ~/waslogs/log.txt (Jun 18, 2012 11:47:17 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Installing component: wccm.services.pme, percent complete: 89% (Jun 18, 2012 11:47:17 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Installing component: webcontainer, percent complete: 89% (Jun 18, 2012 11:47:17 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Installing component: webservices, percent complete: 89% (Jun 18, 2012 11:47:18 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Installing component: websvcs.admin.impl, percent complete: 89% (Jun 18, 2012 11:47:18 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Installing component: websvcs.admin, percent complete: 89% (Jun 18, 2012 11:47:18 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Installing component: websvcs, percent complete: 89% (Jun 18, 2012 11:47:19 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Installing component: webui.webservices.admin, percent complete: 90% (Jun 18, 2012 11:47:19 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Installing component: webui.webservices.policyset, percent complete: 90% (Jun 18, 2012 11:47:19 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Installing component: webui.webservices.trust, percent complete: 90% (Jun 18, 2012 11:47:19 AM), Process, com.ibm.ws.install.ni.ismp.mediaspanning.InstallNIFMaintenanceMediaSpanning, msg1, Installing component: webui, percent complete: 90%
5) Take note of the the last line of the installation log, you should see an exitcode = 0.
(Jun 18, 2012 12:18:02 PM), Process, com.ibm.ws.install.ni.ismp.actions.SetExitCodeAction, msg1, CWUPI0000I: EXITCODE=0
The installation takes about 5 minutes to complete on my i5-3550 machine.
By now, the installation has been completed successfully. Lets examine the installation. First, start the default server 'server1' of our profile appsvr01.
To start the server:
1) cd to the [was_install_dir]
2) execute the startServer.sh script with "server1" as the argument. "server1" is the default server of a profile.
root@ubuntu12svr01:/opt/IBM/WebSphere/AppServer/profiles/appsvr01/bin# ./startServer.sh server1
ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/appsvr01/logs/server1/startServer.log
ADMU0128I: Starting tool with the appsvr01 profile
ADMU3100I: Reading configuration for server: server1
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server server1 open for e-business; process id is 29695
The application server instance server1 is now started. The default secured listener port of this instance is 9043, try hitting https://server-ip
Just add the exception and tell the browser to connect to the server, the following log-in screen will be displayed.
If you want to repeat the exercise, just follow the following steps to uninstall the entire installation, in silent mode.
Steps to uninstall:
1) Stop all servers
2) cd to [was_install_dir]/uninstall/
3) execute the uninstall script with the '-silent' argument
root@ubuntu12svr01:/opt/IBM/WebSphere/AppServer/uninstall# ./uninstall -silent
4) After the script exits, delete the entire IBM directory
That is it. Install, start server, stop server, uninstall. For the fun of it.
Cheers,
Buen post me ha servido de gran ayuda. Saludos desde GT.
ReplyDeleteHi, actually I'm using Ubuntu 14.04. Is there an updated guide?
ReplyDeletechas gracia don
ReplyDelete