Where to place Z/OS license file when push Cloud Foundry PHP app to Bluemix?

五迷三道 提交于 2019-12-18 09:38:51

问题


I would like to connect from Bluemix to Z/OS system, using SecureGatway, but I don't have a Z/OS license file (most probably: db2consv_zs.lic file). I receive SQLSTATE=42968. The SG tunel looks okay.

If I get the license.. where do I have to copy/install it when I push my local project to CIO Bluemix? Shall I copy it to the php buildpack? And will it be registered in the cloud environment? Is there any other way to connect from a Blue Foundry PHP app to a blue zone Z/OS system?


回答1:


1, License DB2 driver on Bluemix for zOS

The license file must be placed into a folder of the PHP instance on the server. The DB2 extension is installed during deployment of the Cloud Foundry app. I found no way to copy the license file during build or deployment. But I found a way to copy the lic file after deployment: I added the lic file to my project and then I copied it over with a php file that I run from browser. This is the line:

$src = '/home/vcap/app/lib/db2consv_zs.lic';    
$dst = '/home/vcap/app/ibmdb_clidriver/license/db2consv_zs.lic';
if (!copy($src, $dst)) {
echo "failed to copy $src...\n";

Secure Gateway also must be set properly to connect from Bluemix to a blue zone zOS DB2. Instructions.

2, License DB2 driver on Local machine in IBM blue zone for zOS

The license problem disappeared when I installed license for DB2 Connect.

"To connect to an IBM mainframe database server you require a licensed DB2 Connect product. You cannot connect directly to an IBM mainframe Data Server using a IBM data server client." link

"You can add DB2 Connect™ capability to any client or driver."

DB2 license files

Use db2licm command to register the license.

How to install DB2 Connect to Bluemix is still open, alternatively Secure Gateway might contain DB2 Connect.. but not sure .. and a connection server can be used also. Will add comments later.



来源:https://stackoverflow.com/questions/50722710/where-to-place-z-os-license-file-when-push-cloud-foundry-php-app-to-bluemix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!