Skip to main content

Running Nexus Repository 2

Nexus Repository 2

When you start the repository manager, you are starting a web server on the default port It runs within a servlet container called Eclipse Jetty, and it is started with a native service wrapper called the Tanuki Java Service Wrapper. This service wrapper can be configured to run the repository manager as a Windows service or a Unix daemon. Nexus Repository Manager Pro and Nexus Repository Manager OSS ship with generic startup scripts for Unix-like platforms called nexus and for Windows platforms called nexus.bat in the

$NEXUS_HOME/bin folder. To start the repository manager on a Unix-like platform like Linux, MacOSX or Solaris use:

cd /usr/local/nexus
./bin/nexus console 

Similarly, starting on Windows can be done with the nexus.bat file. Starting the repository manager with the console command will leave it running in the current shell and display the log output.

On Unix systems, you can start the repository manager detached from the starting shell with the start command even when not yet installed as a service.

./bin/nexus start 

When executed you should see a feedback message and then you can follow the startup process viewing the log file logs/wrapper.log changes.

Starting Nexus Repository Manager...
Started Nexus Repository Manager.
$ tail -f logs/wrapper.log 

At this point, the repository manager will be running and listening on all IP addresses ( that are configured for the current host on port 8081. To use the user interface, fire up a web browser and type in the URL http://localhost:8081/nexus. You should see the user interface as displayed in Figure 3.5, “Application Window”.

While we use localhost throughout this book, you may need to use the IP Loopback Address of, the IP address or the DNS hostname assigned to the machine running the repository manager.

If using Nexus Repository Manager Pro, you are first presented with a form that allows you to request a trial activation. This page displayed in Figure 3.1, “Trial Activation Form” contains a link to the license activation screen in Figure 3.2, “License Activation”.


Figure 3.1. Trial Activation Form

After submitting the form for your trial activation, you will receive a license key via email that you can use in the license activation screen to activate Nexus Repository Manager Pro.

If you already have a license key or license file, you can use the same screen to upload the file and register your license. Alternatively, you could use the Already have a license? link from the page shown in Figure 3.1, "Trial Activation Form".


Figure 3.2. License Activation

Once you have agreed to the End User License Agreement you will be directed to the Nexus Repository Manager Pro Welcome screen displayed in Figure 3.3, “Nexus Repository Manager Pro Welcome Screen”.


Figure 3.3. Nexus Repository Manager Pro Welcome Screen

Click on the Log In link in the upper right-hand corner of the web page, and you should see the login dialog displayed in Figure 3.4, “Log In Dialog (default login/password is admin/admin123)”.


The default administrator username and password combination is admin and admin123 .


Figure 3.4. Log In Dialog (default login/password is admin/admin123)

When you are logged into your evaluation version of Nexus Repository Manager Pro, you will see some helpful links to the Nexus Repository Manager Pro Evaluation Guide, Sample Projects and the Knowledge base below the search input on the Welcome screen.

With a full license for Nexus Repository Manager Pro these links will be removed and you will get the application window displayed in Figure 3.5, “Application Window”.

Nexus Repository Manager OSS will not need to be activated with a license key and will display a number of links to resources and support on the Welcome screen to logged in users.


Figure 3.5. Application Window

The files from Java Service Wrapper (JSW) used for the start up process can be found in $NEXUS_HOME/bin/jsw and are separated into generic files like the wrapper.conf configuration file in conf and a number of libraries in lib. An optional wrapper.conf include allows you to place further configuration optionally in $NEXUS_HOME/conf/wrapper-override.conf .

The platform-specific directories are available for backwards compatibility with older versions only and should not be used. A full list of directories follows:

$ cd /usr/local/nexus/bin/jsw
$ ls -1

The wrapper.conf file is the central configuration file for the startup of the Jetty servlet container running the repository manager on a Java virtual machine and therefore includes configuration for things such as the java command to use, Java memory configuration, logging configuration and other settings documented in the configuration file.

Typical modifications include adapting the maximum memory size to your server hardware and usage requirements e.g. 2000 MB up from the default 768 and other JVM related configurations.

You can configure JSW to use a specific Java installation and not just the Java command found on the PATH by setting JAVA_HOME in the wrapper.conf file and using it for the startup command.


A typical use case is using a custom installation of the Oracle JDK instead of OpenJDK that is preinstalled as part of the Linux distribution.

Additional configuration in the wrapper.conf file includes activation of further Jetty configuration file for monitoring the repository manager via JMX or using HTTPS.


The startup script nexus supports the common service commands start, stop, restart , status, console and dump.