Installing the Klocwork Server package on Linux -- Upgrade only

This page provides instructions for installing the Server package if you are upgrading.

Important: This is not the starting point for upgrading. Make sure you start with Upgrading from a previous version.

Before you begin

Where do I get the software?

Download the packages from the Perforce Community Portal. Typically, only one or two users in an organization have access to Klocwork Developer Network. If you don't have access, you can register for a new account.

Installation notes

  • ulimit —n must be 2048 in order to run the Klocwork Server.
  • Do not locate the projects_root directory on NFS to avoid issues with file locking.
  • Ensure that the downloaded .sh file is executable. Use the chmod command to set the appropriate permissions:chmod 755 <kw-installer.sh>
  • To control permissions when you are installing Klocwork, change the value of umask.
  • Install Klocwork software as a non-root user.
  • Ensure that the path in which you install the product is the same path from which users invoke the product. For example, the local path to the installation might be /local/tools/klocwork, but users on other machines have to use the NFS path /opt/tools/klocwork to invoke the product. Therefore, to ensure that users can invoke the product, use the /opt/tools/klocwork path during installation.
  • Due to issues with file locking, user home directories should not be located on NFS. See Failed to lock file or directory: No locks available.
  • The Klocwork Server and Database Server need to be running on the same machine.

Run the installation package

Run the following command:

kw-server-installer-23.3.x.x.<platform>.sh -p <projects_root> [options] <install_directory> [component ...]

where

  • <platform> is linux.
  • <projects_root> is the location of the old projects_root directory that you want to migrate
  • [<options>] are any of the options listed in Command-line options for the Server package
    You do not need to set host names and port numbers for the Klocwork Servers during installation. This information will be picked up from your old projects_root directory when it is migrated.
  • <install_directory> specifies the directory in which you want to install Klocwork. Do not specify a subdirectory of the projects_root directory. If the chosen directory is not empty, you will not be able to continue with the installation.
  • [<component ...>] is any of the arguments from Arguments for Server components. Separate multiple components with spaces. If you do not specify one or more components, the entire package will be installed. You can also see a list of arguments for the various components with the --list option. An asterisk in the returned output means the component is already installed.

Example

kw-server-installer-21.1.0.0.linux.sh -p /space/old_projects_root /opt/klocwork

Command-line options for the Server package

Name Short name Description
--agree -a Agree to license terms and do not display license agreement.
--database-port <port_number>   Specify the port number that you will use to run the Database Server. Default: 3306. This option is equivalent to specifying the port number with kwservice.
--debug   Print debug information
--force -f Install without integrity checks
--help -h Display this help and exit
--klocwork-port <port_number>   Specify the port number that you will use to run the Klocwork Server. Default: 8080. This option is equivalent to specifying the port number with kwservice.
--license-port <port_number>   Specify that the License Server will be run locally, but on a non-default port. Default: 27000. This option is equivalent to specifying the port number with kwservice .
--license-server <host>[:<port>]   Specify a remote License Server host. The host argument is required; the port argument is optional. Default: localhost:27000. This option is equivalent to specifying the host and port with kwservice.
--list -l List available features (components)
--projects-root <directory> -p Specify the complete path to a non-default projects_root directory. Default: <install_directory>/projects_root. The directory you specify must meet one of the following conditions:
  • it does not yet exist
  • it is empty
  • it is a valid projects_root directory created previously Do not specify the same directory as the root Klocwork installation directory you have specified. Do not install Klocwork in a subdirectory of the projects_root directory.

Important: If you are upgrading, specify the old projects_root directory that you want to migrate.

--version -v display the version of Klocwork software and exit

Arguments for Server components

To install this Server component (feature)... ...enter the argument...
License Server LicenseServer
Klocwork Server KlocworkServer

Add Klocwork to your PATH

On Linux, we recommend adding <klocwork_install>/bin to your PATH. Otherwise, you need to execute commands from <klocwork_install>/bin.