星期五, 5月 26, 2017

PM85864: SYMBOLIC LINK UNDER INSTALLEDAPPS DIRECTORY DOES NOT GET RETAINED AFTER APPLICATION UNINSTALL AND RE-INSTALL

PM85864: SYMBOLIC LINK UNDER INSTALLEDAPPS DIRECTORY DOES NOT GET RETAINED AFTER APPLICATION UNINSTALL AND RE-INSTALL
http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg1PM85864

Any symbolic links that exist in the application installation directory will be deleted when the application is uninstalled or updated.

Problem conclusion
The code has been modified to allow you to set the custom property

com.ibm.websphere.management.application.sync.deleteSymbolicLinks 
on the JVM to false to override the default setting of true.

1) To enable the System Property in the administrative
console: a) In a Network Deployment edition, the system
property needs to be set on the nodeagent. System
administration --> Node agents --> nodeagent --> Java and
Process Management --> Process definition --> Java Virtual
Machine --> Custom properties Name:
com.ibm.websphere.management.application.sync.deleteSymbolicLinks 
Value: true/false

*** both node agent and application server must restart to take effect 

b) In a Base edition, the system property is set on the
server. Servers --> Application Servers --> server1 --> Java
and Process Management --> Process Definition --> Java Virtual
Machine --> Custom Properties Name:
com.ibm.websphere.management.application.sync.deleteSymbolicLinks 
Value: true/false

*** Restrictions: ***
Do not use symbolic links on Microsoft Windows operating systems as they are not supported.


The fix for this APAR is currently targeted for inclusion in
fix pack 8.0.0.7 and fix pack 8.5.5.1.

How to determine if a browser is using an SSL or TLS connection?

https://security.stackexchange.com/questions/19096/how-to-determine-if-a-browser-is-using-an-ssl-or-tls-connection


Chrome:
右鍵 -> 檢查 ->


Security 頁面即有連線使用SSL或TLS的版本資訊。



Firefox:

右鍵 -> 檢視頁面資訊 -> 安全


IE:

右鍵 -> 內容







星期三, 5月 10, 2017

MQv8.0.0.2 - Support for MQ C++ applications built using Visual Studio 2005-10 Compilers

https://www.ibm.com/developerworks/community/blogs/messaging/entry/mqv8_0_0_2_support_for_mq_c_applications_built_using_visual_studio_2005_10_compilers?lang=en

 At version 8.0.0.0, MQ updated it's C/C++ compiler to Visual Studio 2012. This updated meant that any MQ C++ application built using Visual Studio 2010 or below required a recompilation. This was documented also. Now with version 8.0.0.2 MQ supports C++ applications built using Visual Studio 2005/2008/2010. In V8.0.0.2 MQ C++ libraries built using Visual Studio 2005 are now installed bin\VS2005 (32 bit) and bin64\VS2005 (64 bit).

How to point your application to use MQ C++ libraries built using Visual Studio 2005?

There are couple of ways:

1) Prefix the PATH environment variable with path to MQ C++ libraries as below

     SET PATH=C:\Program Files\IBM\WebSphere MQ\bin\VS2005;%PATH%

2) If updating PATH environment variable is not an option, then a batch file can be used to launch the application

    A sample batch file content can be

    SETLOCAL

    SET PATH=C:\Program Files\IBM\WebSphere MQ\bin\VS2005;%PATH%

    app.exe <= Your application name

    ENDLOCAL



Important point to note here: Do not enclose the path in double quotes like "C:\Program Files\IBM\WebSphere MQ\bin\VS2005" because DLL search logic does not handle correctly if the path is enclosed in double quotes. Please see an useful discussion here.


https://www.ibm.com/developerworks/community/blogs/messaging/entry/mqv8_0_0_2_support_for_mq_c_applications_built_using_visual_studio_2005_10_compilers?lang=en

星期三, 5月 03, 2017

How to pass password to su

su command only accept password from terminal in normal case. The following is using "expect" command to overcome this restriction. However this is not secure.

You must install expect package before using this command.

http://blog.roodo.com/ystuan/archives/6128305.html
https://blog.longwin.com.tw/2011/07/expect-shell-auto-linux-2011/

We can use autoexpect tool to help us to build the script.

#!/usr/bin/expect -f
set timeout -1
spawn su -c {cp /tmp/a.txt /tmp/b.txt}
match_max 100000
expect -exact "Password: "
send -- "your_root_password\r"
expect eof


However this is not secure, it will leave your root_password in this file.
We should use sudo -S to do this job.

http://blog.roodo.com/ystuan/archives/6128305.html
https://blog.longwin.com.tw/2011/07/expect-shell-auto-linux-2011/



How can I migrate MQ cluster full repository queue managers to new servers?

https://developer.ibm.com/answers/questions/183882/how-can-i-migrate-mq-cluster-full-repository-queue.html

Q:
I want to move my MQ cluster full repository queue managers to new servers. What's the best way to migrate to new servers without causing any downtime or cluster errors?

ANS:
We have to be careful with how we do this since the goal is to make the change as transparent to users as much as possible and also preserve cluster information integrity as much as we can. So if there are multiple full repositories, we can move each repository over from one box to another ONE at a time. Please move full repositories to new location first and then follow up with partials.

1. Alter QM1 to be a partial repository 
   alter qmgr repos(' ')
   
2. suspend QM1 from the cluster
   suspend qmgr cluster(cluster name)
   
3. alter cluster receiver on QM1 to take it out of a cluster 
   alter channel (channel name) chltype(clusrcvr)cluster (' ') 
   - stop channel 
   - delete channel
   
4. alter cluster sender to QM2 to take it out of the cluster 
   alter channel (channel name) chltype(clussdr)cluster (' ') 
   - stop channel 
   - delete channel 
   NOTE: At this point cluster has only one full repository QM2 and QM1 is out of the cluster. 
   All partial repositories will be able to function as they have 
   established connections to remaining full repository queue managers.

5. Issue RESET cluster command on QM2 and reference queue manager 
   name as QM1 to take all info about this queue manager from the 
   cluster out. This step will delete all information about QM1 including
   autodefined cluster sender channels in the cluster 
   reset cluster (cluster name) qmname(QM1) action(forceremove) queues(yes) 
   Issue display clusqmgr(*) to make sure that QM1 is no longer in the 
   cluster.
   
6. Take steps to define this queue manager on a new box and configure it to join your cluster. 
   Once queue manager is created on a new box: 
   - fill in REPOS attribute of a queue manager with the cluster name 
   - create a cluster receiver 
   - create a cluster sender channel pointing to QM2 
   NOTE: at this point, cluster has two full repositories again: one on a
   new box and one on an old box. Two full repositories will sink up 
   cluster information.

7. Repeat steps 1 - 5 for queue manager QM2 
   Reset cluster will have to be issued on QM1 referencing QM2 
   NOTE: At this point, cluster has only one full repository QM

8. Create QM2 on a new box and configure it to join cluster (by 
   this time NAT'd table changes should take place to service routing to 
   this new box if one is used) 
   Once queue manager is created on a new box 
   - fill in REPOS attribute of a queue manager with the cluster name 
   - create a cluster receiver 
   - create a cluster sender channel pointing to QM1 on a new box. 
   NOTE:Cluster has two new full repositories now that are connected to 
   each other!

9. Manually defined cluster sender channels from partial to full 
   repositories will have to be altered to contain a new conname that 

   points to a new location of a full repository of choice. 

https://developer.ibm.com/answers/questions/183882/how-can-i-migrate-mq-cluster-full-repository-queue.html