Sunday, October 16, 2016

Unix commands Cheatsheet

1.Create a group in Linux
    groupadd <groupname>
Ex:    groupadd trial

2.Create a user.
    useradd -c "test user " -m -d /home/test -g trial -G trial -u 1000 -s /bin/bash test
 options explained -c for comments
                                -d  home directory for the user
                                -g primary group
                                -G secondary groups
                                -u uid
                                -s shell






Monday, August 22, 2016

Websphere: com.ibm.websphere.management.exception.AdminException: A composition unit with name already exists

When you see error message like this in SystemErr.log of Websphere it shows the application which you are trying to deploy is fully or partially deployed already.If you want to uninstall the app completely. Please delete the application in the following location.

Please stop dmgr .nodeagent and  jvm.In these kind of scenarios mostly app will be missing under applications directory where as it will be present under blas and cus directory.

blas is business level application 


 <Dmgr profile>/config/cells/cellname/applications/appname
<Dmgr profile>/config/cells/cellname/blas/appname
<Dmgr profile>/config/cells/cellname/cus/appname

<Appserver profile >/config/cells/cellname/applications/appname
<Appserver profile>/config/cells/cellname/blas/appname
<Appserver profile>/config/cells/cellname/cus/appname.

Delete the application folder in the above directories.

Delete  wstemp content in both appserver as well as in dmgr.

Restart dmgr and jvm.Try installing your application again.

Monday, August 1, 2016

Error404 class java.lang.ClassNotFoundException: _ibmjsp._login

When login to WAS admin console in IE if you get the below error


An error occurred while processing request:%2Fibm%2Fconsole%2Flogin.jsp


Message:SRVE0200E: Servlet [_ibmjsp._login]: Could not find required class - class java.lang.ClassNotFoundException: _ibmjsp._login.

Its a browser issue .Please clear the cache and try or go for a  different browser.

Sunday, January 31, 2016

Websphere MQ installation in RHEL Linux

Download the tar file from password advantage.If you want to use a trial version please download from IBM MQ.

The MQ will be installed using rpm package so install rpm if not available in your  linux environment.

Untar the package and  Agree the license before installation using root user.

 ./mqlicense.sh -accept

Licensed Materials - Property of IBM
                
 5724-H72

 (C) Copyright IBM Corporation 1994, 2013 All rights reserved.

US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.



Agreement accepted:  Proceed with install.

Use rpm to install MQ.

 rpm --prefix <install path> -ivh MQSeriesRuntime-*.rpm MQSeriesServer-*.rpm
Preparing...                ########################################### [100%]
   1:MQSeriesRuntime        ########################################### [ 50%]
   2:MQSeriesServer         ########################################### [100%]

We have installed only the MQSeriesRuntime and MQSeriesServer.IF you want to install all the component use rpm -ivh *.rpm.

Refer the RPM useful commands.

To set this installation as primary one.Use the below command.

<installpath>/bin/setmqinst -i -p <install path>118 of 118 tasks have been completed successfuly.
'<installpath> set as the Primary Installation. 

To check the system compatability run mqconfig under bin folder.

./mqconfig

It will check the ulimit and semaphore values .




Tuesday, January 5, 2016

How to do Apache webserver browser caching for static files

When a URL is hit it reaches the webserver and other component and serve you  back the content.Some websites might have more static content like images ,js etc.These  files can be cached at the browser so the next hit from the same browser wont go  to the webserver and it will be served from the browser cache.To do this we need the below setup at the webserver.

Check the below module is loaded in httpd.conf

LoadModule expires_module modules/mod_expires.so 
 
You can check all the modules available in your httpd by executing 
<path to httpd>/httpd -M
 
for ex: /usr/bin/httpd -M
 
Add lines similar to below depending on your need :

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 60 minutes"
  ExpiresByType text/javascript "access 1 year"
  ExpiresByType application/x-javascript "access plus 60 minutes"
  ExpiresByType text/xml "access plus 60 minutes"
</IfModule>
 
If module will check the module is there or not
ExpiresActive On directive will tell the http expire is on 
ExpiresByType will be used to tell which file type need to be cached in browser
 
access 1 year will keep the file type in the browser for a year,unless you clear the browser cache.
 
To check mod_expire is working or not.Hit the URL you wish from the browser.Hit it again
and check your webserver logs.You should not see the request logged in for the filetype
which is cached.
 
Or user Live http header extension for the browser to see the http header.
You will see Expires on field where it will be a future date. 

References:
Apache mod_expire