Running as a Windows Service
Prerequisites
Note
The instructions on this page do not apply to the Sonatype IQ Server with bundled JDK. Use the non-bundled version downloadable version (Sonatype IQ Server).
Ensure you have already installed a supported JDK on the target system and the system meets our other system requirements.
Download and extract the clm-jsw.zip file into a directory path that does not contain spaces.
clm-jsw.zip is available for download at our support site.
Replace the extracted
./conf/config.yml
with the config.yml file from the current server installation.Check the "sonatypeWork" property in the copied version to make sure it is correct.
Copy the nexus-iq-server-<version>.jar file from your installation into the
./lib/
directory.This should be the only .jar file in the directory. Remove all older server .jar files from this folder.
Start the Service
The service will run as the SYSTEM user. The server requires the use of a temporary directory.
The SYSTEM user will use %systemroot%\System32\config\systemprofile\Temp
as the temporary directory.
On some versions of Windows, this directory does not exist by default. Create it manually if it does not.
Login as an administrator and run
.\bin\clm install
Run
.\bin\clm start
to start the service. You can also start the service from the Windows Service Manager.Verify that on restarting the host, the application will successfully restart itself.
Optional Settings
Change the Java executable to launch the server
Change the Java executable to launch the server
You can explicitly specify the path to the java.exe file to launch the server using the following steps:
Edit
./bin/jsw/conf/wrapper.conf
Find the un-commented line containing
wrapper.java.command=java
and change its value to include the include the absolute path of the Java executable, using forward slashes as path separators even on Windows.Example
wrapper.java.command=F:/Software/Java/jdk-11.0.15/bin/java.exe
You can edit the arguments of the java.exe file when the server is launched. These are parameter for the Java virtual Machine (JVM).
To change arguments passed to the java.exe program:
Edit
./bin/jsw/conf/wrapper.conf
Find references to
wrapper.java.additional.<n>
properties.Add or remove lines with new properties as specified in the Java service wrapper documentation.
Example: Configure a custom outbound truststore
To override the default Java truststore:
Edit
./bin/jsw/conf/wrapper.conf
Specify
wrapper.java.additional.<n>
properties defining the trustStore and its password.NOTE: Make sure all paths specified use forward slashes. If the value requires a space, then the entire value must be in quotes.
wrapper.java.additional.4=-Djavax.net.ssl.trustStore=/<replace_with_absolute_full_path>/nexus-iq-server-outbound.jks wrapper.java.additional.5=-Djavax.net.ssl.trustStorePassword=changeit