Skip to content

Installing the scripts

Refer to download-the-scripts for download urls. You can download the scripts as a zip from github.com, or you can clone the repository.

I prefer to clone the repository with:

Bash
git clone https://github.com/stoeps13/ibmcnx2

Extract or clone the scripts

Linux

Clone the repository to any path on your Deployment Manger Host.

Then create a symlink ibmcnx within %WAS_HOME%/profiles/Dmgr01/bin to this folder.

I cloned the repository to '/opt/IBM/ibmcnx2' and created the link:

Bash
cd /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin
ln -s /opt/IBM/ibmcnx2/ibmcnx ./

Windows

Download or clone the repository to any path (e.g. D:\IBM\ibmcnx2), you can create a symlink on ntfs too:

Bash
mklink /d <link> <target>

mklink /d D:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin\ibmcnx D:\IBM\ibmcnx2\ibmcnx

Copy ibmcnx_sample.properties

Now copy ibmncx/ibmcnx_sample.properties to ibmcnx/ibmcnx.properties and edit it with your prefered editor. This helps you to update the scripts, whithout overwriting the properties through git.

Edit ibmcnx.properties

2014-06-12_12-53-52

In the moment there are 3 parts: Generic, Database and Tuning.

Generic

You should change the values within Generic of all j2ee.* parameters and put your administration users and groups in it. This part is used to set the J2EE Security Roles and you save typing in the values each time.

Database

The User scripts (checking ExId, Deactivate) are using the db* parameters and you can put the User, password, host and so on.

Tuning

These parameters are used for DataSource performance tuning and are set to the values provided in the IBM Connections Performance Tuning Guide. That's a good starting point, but you should check them in your environment.

Additional tasks to load JDBC Drivers within Jython

When you want to use the member scripts, you have to load a jdbc driver. To achieve this you must call wsadmin.sh with following command:

Linux

Bash
./wsadmin.sh -lang jython -username wasadmin -password password -javaoption -Dcom.ibm.ws.scripting.classpath=/opt/IBM/jdbc/db2jcc4.jar -f ibmcnx/menu/cnxmenu.py

Create ibmcnx.sh in ibmcnx-folder with following content (change the path to your jdbc driver!):

startscript

After this you can start the scripting menu from DMGR_BIN with:

Bash
ibmcnx/ibmcnx.sh -username wasadmin -password password -f ibmcnx/menu/cnxmenu.sh

Thanks to Martin Vogel for the tipp, i overread this option.

Windows

Bash
wsadmin.bat -lang jython -username wasadmin -password password -javaoption -Dcom.ibm.ws.scripting.classpath=d:/IBM/jdbc/db2jcc4.jar -f ibmcnx/menu/cnxmenu.py

I will add a example script to the github repo to call wsadmin with javaoption.