Downloading Nexus Open Source
To download Nexus Open Source go to http://www.sonatype.org/nexus/go and download the latest Nexus Open Source distribution by clicking on the appropriate button for a ZIP or a Gzip TAR archive (TGZ) shown in Figure 1, “Downloading Nexus Open Source”. Your download will be file named nexus-2.2-01-bundle.zip or nexus-2.2-01-bundle.tar.gz
Older versions can be downloaded following the link at the bottom of Figure 1, “Downloading Nexus Open Source” and selecting a version and archive type in the page displayed in Figure 2, “Selecting a Specific Version of Nexus Open Source to Download”.
Nexus Open Source can also be deployed as a web application in a servlet container like Jetty or Tomcat or an application server like Glassfish or JBoss.
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 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
$ unzip nexus-2.2-01-bundle.zip
And, if you download the GZip’d TAR archive, run:
$ tar xvzf nexus-2.2-01-bundle.tar.gz
For Nexus professional the equivalent commands would be
$ unzip nexus-professional-2.2.1-bundle.zip $ tar xvzf nexus-professional-2.2.1-bundle.tar.gz
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.
Note
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.2.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-2.2-01-bundle.tar.gz /usr/local $ cd /usr/local $ sudo tar xvzf nexus-2.2-01-bundle.tar.gz $ ln -s nexus-2.2-01 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
Running Nexus
When you start Nexus, you are starting a web server on the default port of 0.0.0.0:8081. Nexus runs within a servlet container called Jetty and it is started with a native service wrapper called the Tanuki Java Service Wrapper. This service wrapper can be configured to run Nexus as a Windows service or a Unix daemon. Nexus ships 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 Nexus 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 Nexus with the console command will leave Nexus running in the current shell and display the log output right there.
On Unix system you can start Nexus 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 can then follow the start-up 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, Nexus will be running and listening on all IP addresses (0.0.0.0) that are configured for the current host on port 8081. To use Nexus, fire up a web browser and type in the URL http://localhost:8081/nexus and you should see the Nexus user interface as displayed in Figure 3, “Nexus Application Window”
While we use "localhost" throughout this book, you may need to use the IP Loopback Address of "127.0.0.1" or the IP address assigned to the machine running Nexus..
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. “Nexus Login Dialog (default login/password is admin/admin123)”.
Tip
The default administrator username and password combination is "admin" and "admin123".
The files from Java Service Wrapper 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 conf lib license linux-ppc-64 linux-x86-32 linux-x86-64 macosx-universal-32 macosx-universal-64 solaris-sparc-32 solaris-sparc-64 solaris-x86-32 windows-x86-32 windows-x86-64
Tip
The start-up script nexus supports the common service commands start, stop, restart, status, console and dump.
Change the Administrative Password and Email Address
As a logged in user, you can click on your user name in the top right hand corner of the Nexus user interface to expose a drop down with an option to Logout as well as to access your user Profile displayed in Figure 5, “Drop Down on User Name with Logout and Profile Options”.
Once you have selected to display your profile you will get access to the Summary section of the Profile tab as displayed in Figure 6, “Summary Section of the Profile Tab”.
The Summary section allows you to edit your First Name, Last Name and Email directly in the form.
In addition to changing your name and email, the user profile allows you to change your password by clicking on the Change Password text. The dialog displayed in Figure 7, “Changing Your Nexus Password” will be displayed and allow you to supply your current password, and choose a new password. When you click on Change Password, your Nexus password will be changed.
The password change feature only works with the Nexus built in XML Realm security realm. If you are using a different security realm like LDAP or Crowd, this option will not be visible.







No comments:
Post a Comment