Installing the Klocwork Server package on Linux
|In this topic:|
Installing the Klocwork Server package on Linux
This page provides instructions for installing the Klocwork Server package using the installer.
Before you begin
Upgrading? See Upgrading from a previous version.
Where do I get the software?
Download the packages from Klocwork Support. 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.
You need a license. See Get a license if you don't already have one.
Running two versions of the Klocwork Servers
If you will be running two sets of the Klocwork Servers, for example to test the Klocwork 2019 Servers while users continue to access your existing servers, you must run them on different projects_root directories.
Check the system requirements
Refer to the System requirements for a list of required packages and dependencies.
- Linux only: There are separate installation packages for 32-bit and 64-bit Java. Make sure you select the one that matches your operating system.
- ulimit -n must be 2048 in order to run the Klocwork Server.
- 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.
- For some Linux installations, if you want to run the Klocwork Server, you may be required to install additional third-party libraries. For example: libaio1, libaio, or libaio.x86_64.
- For AIX and Solaris, the Klocwork Server must be run from a separate Linux machine. For more information, see Klocwork Server Configuration for Mac/AIX/Solaris.
- If you are installing on 64-bit Linux and the target machine has 6 GB or more of memory, the memory settings configuration will be increased to improve performance.
- The Klocwork Server and Database Server need to be running on the same machine.
Running the installation package
Run the following command:
kw-server-installer.19.0.x.x.<platform>.sh [options] <install_directory> [<component ...>]
- <platform> is linux.
- [<options>] are any of the options listed in Command-line options for the Server package.
- <install_directory> specifies the directory in which you want to install Klocwork. Do not specify a subdirectory of the projects_root directory. Note that 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.
Command-line options for the Server package
|--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. See also Using your organization's FlexNet Publisher serverUsing your organization's FlexNet Publisher server.|
|--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: |
|--version||-v||display the version of Klocwork software and exit|
Arguments for Server components
|To install this Server component (feature)...||...enter the argument...|
|Administration and analysis management tools||BuildTools|
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.
Copy the license file
Copy your license file to the following location:
The license file must have the extension .lic.
Start the servers
Start the servers with kwservice start:
kwservice --projects-root <projects_root> start
- where <projects_root> is the projects_root directory you specified during installation
kwservice --projects-root /space/klocwork/projects_root start
You see messages indicating that the servers have been started, showing the server host name and port number and the path to the projects_root. For example:
Using projects root: /space/klocwork/projects_root Local Host is: serverxyz.com [184.108.40.206] Starting License Server [started on serverxyz.com:27000] (projects root is /space/klocwork/projects_root) Starting Database Server [started on serverxyz.com:3306] (projects root is /space/klocwork/projects_root) Starting Klocwork Server [started on serverxyz.com:8080] (projects root is /space/klocwork/projects_root)
Log in to Klocwork Static Code Analysis
username: jsmith password: <empty>For more details on security and authentication methods, see Security and permissions.