Installing KCML on Unix


Installation prerequistites

Some combinations of KCML versions and operating systems may require packages installing before installing KCML:

Operating systemKCML versionsRequired packages
AIXAllKorn Shell /usr/bin/ksh
HP-UXKCML 6.0 & 6.20None
Linux (32-bit kernel)Allncompress, cpio, bc & xinetd
Linux (64-bit kernel)All32-bit runtime libraries, ncompress, cpio, bc & xinetd
Solaris 8KCML 6.0 & 6.20None
Solaris 10KCML 6.20 & 7Korn Shell /usr/bin/ksh, libgcc_s1 & libstdc++6, see Installing KCML for Solaris 10
UnixwareKCML 6.0 & 6.20None

Some 64-bit Linux distributions will require 32-bit run-time libraries to be installed.

Modern Linux distributions may require extra packages to be installed

Packages like PAM & OpenSSL will require secondary dependencies to be installed.


Preparation

Select the appropriate version of KCML for your Unix server.

The downloads for Unix servers are in the form of a compressed cpio archive, called an Image file. Download this file to a temporary directory, typically /tmp, on your Unix server. The image file should then be uncompressed using the command

uncompress IMAGE.Z

Next, you will now need to extract the installation script, kcmlinst.
All versions of KCML on Linux or KCML7

$ cpio -iv kcmlinst <IMAGE
KCML 6.00, 6.20 & 6.90 on non-Linux systems:
$ cpio -icv kcmlinst <IMAGE

Make sure this script has execute permission

$ chmod +x kcmlinst

Server installation

To install KCML as a server you will need to be the root super-user. Execute the install script using

$ su -
Password: ******
$ ./kcmlinst

For Linux systems that do not have a root password, eg Ubuntu, you will need to execute the install script using sudo:

$ sudo ./kcmlinst

The install script will configure a network service for the Connection Manager. This can be verified after installtion by connecting a web browser to a URL of the form http://host:790

Starting from KCML 7.14, build 22166, the pathname to the installation directory will have secure permissions:-

Write access permission for the owner will also be enforced by the Connection Manager.


Non-root installtion

KCML 7.05 (or later) & KCML 06.20 (from build 19344) for AIX 5.3 & Linux 2.6 can be installed using a normal user account, however operations that require super-user privileges will not be performed:

Prior to installing the script will check that you want to proceed without super-user privileges:-
Working .....
Warning: Network services will not be configured when installing without
super-user privileges, continue? (y/n) :
As the install script will no longer has permission to create a directory in /usr/local, the default installation directory is derived from $BASE, $SYSADDR or the user's home directory. Upgrades will also check $KCMLDIR.

Unlike standard KCML installations, the permissions of the kcml utility will have the setuid bit enabled so that utilities like bkstat can signal another user's partition.

However, the $LD_LIBRARY_PATH & $LIBPATH environment variables do not affect setuid programs, so instead shared libraries are located using a path defined in the RPATH attribute of the executable's header. The install script constructs a suitable library search path, including the KCML directory, and then uses the krpath utility to set the RPATH attribute. If an Oracle client has been detected, then the library search path will also include the directory that contains the Oracle client library.


Executing the install script

When the install script is executed it will display a menu of options

KCML Administration program Version 2.5
================================================================================
Interrupt key = ^c
                KCML administration menu
		========================
		1       INSTALL the KCML Development system
		2       UPGRADE the KCML Development system
		3       REMOVE the KCML Development system
		4       INSTALL/UPGRADE licence file
		9       Exit
		Enter option number (1-9) :

Installation

To install KCML take option (1). You will now be prompted for the location of the Image file. Just press <Return> for the default of /tmp/IMAGE or enter the full filename of the image file if it is in a different location. Next the script will prompt for an automatic installation which will choose default settings for the installation:-

Would you like this installation to run automatically? (y/n) :
Enter N for a manual installation or Y for the automatic installation. The kcmlinst script will now install KCML, after this has completed the script will run the getid program to display your server's unique machine ID. Use this number when ordering a KCML licence.


Manual Installation

The manual installation allows the user to tailor the installation to their needs. First the script will prompt for the installtion directory. When installing as a super-user the default directory will be /usr/local/kcml otherwise it is derived from the $BASE, $SYSADDR or the user's home directory. You can just press <Return> to use the default directory, or enter a suitable pathname.

Enter the directory name in which to install the KCML utilities
Press RETURN for /usr/local/kcml :

Super-users have to option to set the owner and group of the installed files which can then be upgraded by that user:-

Working .....
Enter the owner of the KCML utilities.
(Press RETURN for bin) : kcc
Enter the group owner of the KCML utilities.
(Press RETURN for bin) : users
However, these installations require that the permissions on the kcml executable have the setuid bit enabled and will use the RPATH attribute to locate shared libraries, see Non-root installation.

You will then be prompted to for additional directories for the library search path. The default value will be the location of the Oracle client library, if it has been detected.

Additional run-time library path
Press RETURN for /usr/lib/oracle/11.2/client/lib: 
The script will then install KCML.


Upgrade

The kcmlinst script should also be used to upgrade a KCML installation. Prior to upgrading it is strongly recommended that all KCML users have logged out and that any background KCML processes have been stopped. This can be verified by executing the bkstat -g command.

After transferring the appropriate image file to your system, extract and then execute the install script. Take option (2) to upgrade and then enter the location of the IMAGE archive, or just hit <Return> to use the default of /tmp/IMAGE. Then enter the location of the KCML directory you wish to upgrade.

The value of RPATH attribute is checked when upgrading non-root owned installations. If the value of the library search path changes, then a warning will be displayed

Warning: Original RPATH was /lib:/usr/lib:/usr/local/lib:/usr/local/kcml.
Do you want to replace it with /lib:/usr/lib:/usr/local/lib:/usr/local/kcml:/usr/lib/oracle/11.1/client/lib (Y/N) ?
Choose N to preserve the original search path or Y to change it to the new value.


Command line options

General form:

kcmlinst [ -n ] [ -d <dir> -t <tmp_dir> ] [-i | -u]

Normally the kcmlinst script executes interactively. Starting with build 17347 of KCML 6.20, 7.03+, installations and upgrades can be automated using the -d, -t and -u or -i options. For example:

$ kcmlinst -d /path/to/kcml/directory -t /tmp -i

Would perform an automatic installation of KCML. That installtion could then be later upgraded using

$ kcmlinst -d /path/to/kcml/directory -t /tmp -u

The location of the IMAGE cpio archive is in the directory specified by the -t option.


Installation errors

If the script fails with

Executable files were not compiled for this operating system!
then make sure that the correct version of KCML has been chosen for your system and that the operating system is up to date. Also make sure that the operating system is up-to-date, and for 64-bit Linux systems, ensure that 32-bit versions of the C/C++ runtime libraries have been installed.

See also:

Installation prerequistites,
Operating system requirements


Operating system notes

Installing KCML for Solaris 10

KCML for Solaris requires the C/C++ runtime libraries from www.opencsw.org which provides a distribution service of pre-compiled open source software. The libgcc_s1 & libstdc++6 packages are installed using OpenCSW's pkgutil package manager which will download and install software from their repository. Package dependencies are automatically resolved:- any extra packages that are required are downloaded and installed. This is very similar to Linux distributions that provide distribution services using package managers like yum or apt-get. It is recommended that Solaris systems are configured to directly use the distribution service as this provides a very simple mechanism for installing packages that are dependent on other components.

The packages KCML requires are available from the OpenCSW's dublin catalogue. To configure pkgutil to use the dublin catalogue you will need to set the mirror location in /etc/opt/csw/pkgutil.conf :-

mirror=http://mirror.opencsw.org/opencsw/dublin

As libgcc_s1 is a pre-requisite for libstdc++6 you can install both using:-

$ pkgutil -i libstdc++6
Solving needed dependencies ...
Solving dependency order ...
1 CURRENT packages:
	CSWcommon-1.5,REV=2010.12.11
Install 2 NEW packages:
	CSWlibgcc-s1-4.6.3,REV=2012.03.06 (csw/dublin)
	CSWlibstdc++6-4.6.3,REV=2012.03.06 (csw/dublin)
Total size: 4.0 MB
2 packages to fetch. Do you want to continue? ([y],n,auto) auto
Turning on automatic mode as if --yes was passed.
=> Fetching CSWlibgcc-s1-4.6.3,REV=2012.03.06 (1/2) ...
=> Fetching CSWlibstdc++6-4.6.3,REV=2012.03.06 (2/2) ...
=> Installing CSWlibgcc-s1-4.6.3,REV=2012.03.06 (1/2) ...
Please see /opt/csw/share/doc/libgcc_s1/license for license information.
Installation of <CSWlibgcc-s1> was successful.
=> Installing CSWlibstdc++6-4.6.3,REV=2012.03.06 (2/2) ...
Please see /opt/csw/share/doc/libstdc++6/license for license information.
Installation of <CSWlibstdc++6> was successful.

Systems that do not have access to OpenCSW's dublin catalogue will need the libgcc_s1 & libstdc++6 packages to be manually downloaded & transferred onto the system. The packages then need to be uncompressed with gunzip before being installed with the Solaris pkgadd utility.