Monday, December 19, 2016

Add java decompiler to Beyond Compare

Go to
http://www.scootersoftware.com/download.php?zz=moreformats

Select BC version

Select Operating System

Type Keywords as java

Click Go and select one of them

Download selected

In Beyond Compare, pick Tools | Import Settings.
Fill in the downloaded filename, and click Next.
Click Next and then Finish.

Wednesday, November 30, 2016

Upgrading MQ on Solaris

Upgrade MQ 7.1.0.5 to MQ 7.5.0.6 on Solaris platforms

Download the WebSphere MQ 7.5 software  from IBM Passport  site

Copy the installable file WS_MQ_SOL_ON_SPARC_V7.5_IFR2_IMG.tar.Z to MQ server

Stop those services(Application Servers etc.) which are connecting to  the same MQ Queue managers to be  upgraded .
You may just stop those listener ports or Activation Specs connecting to  the Queue Manager if it is not difficult to figure out.

Stop the Queue Managers

run dspmqver and dspmqinf and identify which directories to backup

Take the backup of /var/mqm and /opt/mqm as per the output of above commands.
You may need root access to backup /opt/mqm and /var/mqm. This backup will not be useful for  the restoration from upgraded version but may be useful
for the root cause analysis of any problem faced after upgradation.


Goto the path where installable is copied .
gunzip WS_MQ_SOL_ON_SPARC_V7.5_IFR2_IMG.tar.Z
tar -xvf WS_MQ_SOL_ON_SPARC_V7.5_IFR2_IMG.tar

run the ./mqlicense.sh -text_only
Type 1 to accept the license

run ./crtmqpkg 75 where 75 is suffix (as per your choice) 


This is the most important step which I figured out after trial and error.
After running pkgadd, I kept receiving error
ERROR: WebSphere MQ with package name "mqm" is already installed at "/opt/mqm"

Solution to this problem is to
copy the admin install default file to some  location.
cp /var/sadm/install/admin/default /tmp
 and edit the basedir=/opt/mqm-75 in the default file

Run
 pkgadd -a /tmp/default mqm-75

Ignore the warning and continue Installation
You do not appear to have  a  /var/mqm  filesystem
mounted.  It  is  recommended  that you create and
mount   separate   /var/mqm    and    /var/mqm/log
filesystems before installation.

Continue installation? [y,n,q] : y


 When you get the message , Package will be installed in "/opt/mqm" .
 Choose n and enter the required installation path

 Package will be installed in "/opt/mqm"
        Is this OK? [y,n,?,q] n
        Enter required install location:       
/opt/mqm-75
    Package will be installed in "/opt/mqm-75"
        Is this OK? [y,n,?,q] y

Choose 1(WebSphere MQ Server)  to install

                 1)  WebSphere MQ Server
                 2)  Man pages
                 3)  Sample programs
                 4)  WebSphere MQ Client libraries (including Java, JMS and Web Services support)
                 5)  IBM (c) Java runtime for Solaris(TM)
                 6)  IBM (c) Global Security Kit for WebSphere MQ
                 7)  WebSphere MQ Managed File Transfer Service
                 8)  WebSphere MQ Managed File Transfer Tools
                 9)  WebSphere MQ Managed File Transfer Agent
                10)  WebSphere MQ Managed File Transfer Logger
                11)  WebSphere MQ Advanced Message Security
                12)  Spanish message catalog
                13)  French message catalog
                14)  German message catalog
                15)  Japanese message catalog
                16)  Italian message catalog
                17)  Brazilian Portuguese message catalog
                18)  Traditional Chinese message catalog
                19)  Simplified Chinese message catalog
                20)  Korean message catalog
                21)  Russian message catalog
                22)  Hungarian message catalog
                23)  Polish message catalog
                24)  Czech message catalog
               
Thereafter , Installation is self explanatory . You have to continue selecting y and pressing enter .

In the end , after installation is completed .
Execute the following statement when running as the 'root' user:

    su mqm -c "/opt/mqm-75/bin/mqconfig"

Or change user id to mqm and run /opt/mqm-75/bin/mqconfig

The 'mqconfig' command validates that the system configuration satisfies the
requirements for WebSphere MQ, and ensures that the settings for the 'mqm'
user ID are suitably configured.


Run dspmqinst to list installation
You will see two Installations
Installation1 as MQ 7.1 and Installation2 as MQ 7.5
Change your primary installation by running the below commands as root
uid=0(root) gid=0(root)
root@UAT-MQ # ./setmqinst -x -n Installation1
'Installation1' (/opt/mqm) has been unset as the Primary Installation.
root@UAT-MQ # /opt/mqm-75/bin/setmqinst -i -n Installation2
92 of 92 tasks have been completed successfuly.
'Installation2' (/opt/mqm-75) set as the Primary Installation.

After setting Installation 2 as primary installation , there will be symbolic links created in /usr/bin .
Verify all the symbolic links in  /usr/bin/ are correctly pointed to mqm-75 not mqm

Run the below command to migrate qmgrs to new WebSphere mq version with  mqm id
/opt/mqm-75/bin/setmqm -m -n Installation2

Run the below command to see the status and association
dspmq -o installation -o status

In the last step , check whether in the previous installation , were there any mqm local environment variables pointing to
/opt/mqm version , if yes then modify it to /opt/mqm-75 .
Mostly, you may just need to modify mqm .profile file to point to updated mq installation path .



Now coming to applying the fix pack 6 


Copy the fix pack file to MQ server
gunzip 7.5.0-WS-MQ-SolarisSparc64-FP0006.tar.Z
tar -xvf 7.5.0-WS-MQ-SolarisSparc64-FP0006.tar

Create package
./crtmqfp mqm-75

Execute pkgadd -a /tmp/default and select 2

root@UAT-MQ # pkgadd -a /tmp/default

The following packages are available:
  1  mqm-75                 IBM WebSphere MQ for Solaris
                            (sparcv9) 7.5.0.5
  2  mqm-75-07-05-00-06     IBM WebSphere MQ for Solaris - U200647
                            (sparcv9) 7.5.0.6

Thereafter , Installation is self explanatory . You have to continue selecting y and pressing enter .

After fixpack upgrade is completed , start the QMGR
strmqm or
strmqm -x if its a multiinstance QMGR

Wednesday, September 7, 2016

Disabling WebSphere administrative security

Earlier I used to go to 
WAS_INSTALL_DIR/profiles/PROFILE_NAME/config/cells/CELLNAME/
and vi the security.xml , search for first string enabled and make enabled="false"
Now, there is no need to edit the security.xml to disable security .

You can just follow the below procedure.
cd WAS_INSTALL_DIR/profiles/PROFILE_NAME/bin/

If you have multiple profiles , then its necessary to run wsadmin.sh from the profile where you want to disable the security.

./wsadmin.sh -conntype NONE
wsadmin> securityoff 
wsadmin>  exit 
Restart the servers.

IBM WebSphere QMGR certificate label name


IBM WebSphere MQ specifies requirements for the queue manager and clients personal certificate label names

QMGR Certificate label name has to be 
ibmwebspheremq+QMGR Name where QMGR Name has to be in lower case

In case , the user has created the certificate request file with wrong label , then the label name can be easily changed via ikeyman tool .


Open the kdb file , View the personal certificate and rename it

Tuesday, September 6, 2016

Password recovery from stash file

Copy the below contents to a file and save as unstash.pl

use strict;

die "Usage: $0 \n" if $#ARGV != 0;

my $file=$ARGV[0];
open(F,$file) || die "Can't open $file: $!";

my $stash;
read F,$stash,1024;

my @unstash=map { $_^0xf5 } unpack("C*",$stash);

foreach my $c (@unstash) {
    last if $c eq 0;
    printf "%c",$c;
}
printf "\n";



Run
perl unstash.pl key.sth
where key.sth is your stashed password

Sunday, August 14, 2016

What has changed after you became atheist

I am completely a different person after I have become an atheist. My outlook towards life has changed. I am from a developing nation and our daily routine is full of challenges. Every day, when I woke up from the bed, I may have to face a new problem. My house water supply would have stopped or maybe the power is cut. There may have been a theft last night and my car tires would have been stolen or my car stereo is missing. I may be earning just enough to care of necessary expenses. I know that I will never be able to buy a house. The problems are endless.

   In such an atmosphere, whether you believe in god or not makes a lot of difference. When you believe in god, you believe in fate. Then you accept the problem as it is, you don't take steps to solve the problem or the process of solving the problem becomes much slower because you believe that this was bound to happen. Your daily routine is also affected. You go to the temple daily to pray to your god to make life easier for you but that never happens. And this infinite cycle goes on.

     Your decision-making skills are also affected. Taking risk is another thing but submitting yourself to a wrong decision with a hope that God will fix everything for you.  And once again, that never happens and the life goes on with the false hope and an imaginary god who does not exist.

    You waste a lot of time in praying to god, going to temples, performing rituals. This wasted time, you could have used to solve your problems instead.

    Living with false hope and an imaginary god is much more dangerous than living struggling with problems.

    The day when you understand this, then you feel more relaxed and confident. You start to plan things. You start to become more organized. You start giving time to more important things such as your fitness. You start to learn new things which you always dreamt about. You start giving time to yourself.

   The day when you become an atheist may come to you all of a sudden but it takes time for this thought to mature. Gradually, you start to understand the true meaning of living a life without God, without fancy things which you always believed to be true. I wish I would have learned this truth much before.  I would have enjoyed my life even more.

But whatever has happened has happened, I am a happy atheist now.

I am an atheist. I am not nationalist. I am not immoral.  I like to take care of the people around me. I want my society to progress. I want everyone around me to be happy. I don't like to ridicule you. It does not matter to me whether you believe in god or not but what matters to me is that you are unhappy because of your belief in god. You have not taken the responsibility of your own problems. Life is short and you have to fight your own problems.

 

Friday, January 15, 2016

ignore directories while creating tar on solaris

Create a file excludes.txt or name it anything as you wish.

Write the name of file or directory into the file excludes.txt which you want to exclude

cat excludes.txt
XYZ/abc


tar -Xcvf ./excludes.txt XYZ.tar XYZ


The above command will exclude the abc directory(or file) inside the XYZ directory.

If you want to exclude more directories (or files) , add their names to excludes.txt separated by lines.


The above procedure is tested on Solaris.