Repository Management with Nexus

3.3. Installing Nexus

The following instructions are for installing Nexus Open Source or Nexus Professional as a stand-alone server. Nexus comes bundled with a Jetty instance that listens to all configured IP addresses on a host ( and runs on port 8081 by default.

Installing Nexus is straightforward. Unpack the Nexus web application archive in a directory. If you are installing Nexus on a local workstation to give it a test run, you can install it in your home directory or wherever you like. Nexus doesn’t have any hard coded directories. It will run from any directory. If you downloaded the ZIP

$ unzip

And, if you download the GZip’d TAR archive, run:

$ tar xvzf nexus-2.11.1-01-bundle.tar.gz

For Nexus professional the equivalent commands would be

$ unzip
$ tar xvzf nexus-professional-2.11.1-01-bundle.tar.gz

There are some known incompatibilities with the version of the tar command provided by Solaris and the GZip TAR format. If you are installing Nexus on Solaris, you must use the GNU tar application, or you will end up with corrupted files.


If you are installing Nexus on a server, you might want to use a directory other than your home directory. On a Unix machine, this book assumes that Nexus is installed in /usr/local/nexus-2.11.1-01 with a symbolic link /usr/local/nexus to the nexus directory. Using a generic symbolic link nexus to a specific version is a common practice which makes it easier to upgrade when a newer version of Nexus is made available.

$ sudo cp nexus-2.11.1-01-bundle.tar.gz /usr/local
$ cd /usr/local
$ sudo tar xvzf nexus-2.11.1-01-bundle.tar.gz
$ sudo ln -s nexus-2.11.1-01 nexus

Although it isn’t required for Nexus to run, you may want to set an environment variable NEXUS_HOME in your environment that points to the installation directory of Nexus. This chapter will refer to this location as $NEXUS_HOME.


On Windows you should install Nexus outside Program Files to avoid problems with Windows file registry virtualization. If you plan to run Nexus as a specific user you could install into the AppData\Local directory of that users home directory. Otherwise simply go with e.g., C:\nexus or something similar.

The Nexus installation directory nexus-2.11.1-01 or nexus-professional-2.11.1-01 has a sibling directory named sonatype-work. This directory contains all of the repository and configuration data for Nexus and is stored outside of the Nexus installation directory to make it easier to upgrade to a newer version of Nexus.

By default, this directory is always a sibling to the Nexus installation directory. If you installed Nexus in the /usr/local directory it would also contain a sonatype-work subdirectory with a nested nexus directory containing all of the content and configuration. The location of the sonatype-work directory can be customized by altering the nexus-work property in $NEXUS_HOME/conf/