08 June 2013

How to setup the DataStage environment to work with the shell

In the past few weeks I had to frequently work on servers where the DataStage environment was not setup to work with the shell. So as a result of this, if you try to run the dsjob command you will get something like this:

$ dsjob
dsjob: error while loading shared libraries: libvmdsapi.so: cannot open shared object file: No such file or directory

Presuming that you have selected the default path names during the installation of your server, the following will setup the environment:



$ export DSHOME=/opt/IBM/InformationServer/Server/DSEngine
$ export PATH=$PATH:$DSHOME/bin:/opt/IBM/InformationServer/Server/PXEngine/bin
$ export APT_CONFIG_FILE=/opt/IBM/InformationServer/Server/Configurations/default.apt
$ . /$DSHOME/dsenv

You could even include the above into the  ~/.bashrc file so they are executed automatically.

How to setup CentOS to work with external DHCP

Last week I had to setup a CentOS 5.5 machine that relied on external DHCP for IP configuration. The default network configuration was:

[root@nhsrv1 /]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=(mac omitted)
ONBOOT=yes
TYPE=Ethernet

Unfortunately the other machines in the network were not able to ping it over host name, but only by IP address. After quick investigation, the solution was found – the last line had to be added to the ifcfg-eth0:

[root@nhsrv1 /]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=(mac omitted)
ONBOOT=yes
TYPE=Ethernet
DHCP_HOSTNAME=nhsrv1
and then restart the configuration:

[root@nhsrv1 /]# /etc/init.d/network restart

Apparently some DHCP servers require the client to specify a hostname before receiving an IP address. And here is the official CentOS page about DHCP_HOSTNAME.

The above is also valid for CentOS 6.