The following sections detail the installation process for both Nexus Open Source and Nexus Professional.
Nexus Open Source and Nexus Professional only have one prerequisite, a Java Runtime Environment (JRE) compatible with Java 5 or higher. Nexus is most often run with the JRE that is bundled with a Java Development Kit (JDK) installation, and it can be run with the latest version of Sun's JDK for Java 5 or Java 6. To download the latest release of the Sun JDK, go to http://developers.sun.com/downloads/, and download the latest Java 6 JDK or an older Java 5 JDK, either will work but Java 6 is recommended.
The following instructions are for installing Nexus Open Source as a stand-alone server. Nexus comes bundled with a Jetty instance which listens to all configured IP addresses on a host (0.0.0.0) and runs on port 8081 by default. If you would like to run Nexus Open Source as a web application in an existing application server or servlet container, please refer to the instructions in Section 3.8, “Installing the Nexus WAR”.
Installing Nexus Open Source 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 archive, run:
$ unzip nexus-oss-webapp-1.9.1.1-bundle.zip
And, if you download the GZip'd TAR archive, run:
$ tar xvzf nexus-oss-webapp-1.9.1.1-bundle.tgz
Note
There are some known incompatibilities with the version of tar 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. Please see http://sunsolarisadmin.blogspot.com/2007/03/how-to-install-gnu-tar-in-solaris.html.
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-oss-webapp-1.9.1.1 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-oss-webapp-1.9.1.1-bundle.tgz /usr/local $ cd /usr/local $ sudo tar xvzf nexus-oss-webapp-1.9.1.1-bundle.tgz $ ln -s nexus-oss-webapp-1.9.1.1 nexus
Although it isn't required for Nexus to run, you may want
to set an environment variable NEXUS_HOME in your
environment which points to the installation directory of Nexus. This
chapter will refer to this location as
${NEXUS_HOME}.
The Nexus installation directory
nexus-oss-webapp-1.9.1.1 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
/usr/local, the /usr/local/
directory would also contain a sonatype-work
subdirectory 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/plexus.properties.
The following instructions are for installing Nexus Professional as a stand-alone server. Nexus Professional is bundled with a Jetty instance which listens to all configured IP addresses on a host (0.0.0.0) 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 archive, run:
$ unzip nexus-professional-webapp-1.9.1.1-bundle.zip
And, if you download the GZip'd TAR archive, run:
$ tar xvzf nexus-professional-webapp-1.9.1.1-bundle.tgz
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-professional-webapp-1.9.1.1 with a symbolic
link /usr/local/nexus to the nexus directory. Using
a symbolic link nexus to a directory which holds a specific version of
Nexus is a common practice that makes it easier to upgrade to a newer
version of Nexus.
$ sudo cp nexus-professional-webapp-1.9.1.1-bundle.tgz /usr/local $ cd /usr/local $ sudo tar xvzf nexus-professional-webapp-1.9.1.1-bundle.tgz $ ln -s nexus-professional-webapp-1.9.1.1 nexus
Although it isn't required for Nexus to run, you may want
to set an environment variable NEXUS_HOME in your
environment which points to the installation directory of Nexus. This
chapter will refer to this location as
${NEXUS_HOME}. The Nexus installation directory
nexus-professional-webapp-1.9.1.1 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.