Installing the Klocwork Server package on Unix
From current
Contents |
Before you begin
Upgrading? See Upgrading from a previous version.
Where do I get the software? You download the Klocwork Server and User packages from https://my.klocwork.com. Typically, only one or two users in an organization have access to my.klocwork. If you don't have a password, contact Klocwork Customer Support.
You need a license. See Getting 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 Insight 9.5 Servers while users continue to access your existing servers, you must run them on different projects_root directories.
Installation notes
- 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.
- 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.
- If your organization uses GCC, make sure the correct version of the compiler is in your PATH before you run the installation program. Including the GCC compiler in your PATH automatically creates default links to standard GCC libraries and defines for all the projects you create. Note that any user can override these defaults for a particular project or build by not including the standard libraries and defines. If your organization does not use GCC, do not include it in your PATH when you run the installation program.
- 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.
- Important: Due to MySQL limitations, the projects_root directory should not be located on NFS. It has a special file locking implementation which is not fully supported by MySQL. See also the warning in the MySQL documentation.
Running the installation package
Run the following command:
kw-server-installer-9.5.x.x.<platform>.sh [options] <install_directory> [component ...]
where
- <platform> is solaris, linux or aix
- [<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. Note that an asterisk in the returned output means the component is already installed.
Example: Installing only the Database Server component on Linux
kw-server-installer-9.5.0.0.linux.sh -p /space/projects_root /opt/klocwork DatabaseServer
where
- /space/projects_root specifies the projects_root location. The default is <Server_install>/projects_root. For more information, see About the projects_root directory.
- IMPORTANT: If you are upgrading, specify the old projects_root directory that you want to migrate.
- /opt/klocwork specifies the directory in which you want to install the Database Server
- DatabaseServer indicates that only the Database Server component is to be installed
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. | |
| --language <language> | Specify the installation language. This affects the language of the installation package and of the help topics for reported issues. Currently, only English (United States) and Japanese are supported. The default is the current system locale; if the current system locale is not supported by Klocwork, English (United States) will be used. Note that you must install all of your Server and User packages in the same language. To specify Japanese, use ja. To specify English, use en. | |
| --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 FLEXlm 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:
IMPORTANT: If you are upgrading, specify the old projects_root directory that you want to migrate. |
| --use-ssl | use a secure Klocwork server connection (HTTPS) | |
| --version | -v | display the version of Klocwork software and exit |
Arguments for Server components
| To install this Server component (feature)... | ...enter the argument... |
| Database Server | DatabaseServer |
| License Server | LicenseServer |
| Klocwork Server | KlocworkServer |
| Administration and analysis management tools | BuildTools |
Add Klocwork to your PATH
On Unix, 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:
- <projects_root>/licenses
The license file must have the extension .lic.
Note: See Customizing licensing for licensing options such as using your organization's license server.
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
Example
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 [13.1.1.142]
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)
Next steps
Now you're ready to analyze your integration build.
See also
- kwupdate - to get a list of installed components or install/uninstall patches
- What to communicate to the team
- Deployment and administration


