Skip to main content

Installing Nexus on HP, AIX and other obscure Unix systems

Posted by johnsmart on March 4, 2009 at 7:26 PM PST

I recently installed Nexus onto an HP build server. While not particularly difficult, this installation did require a few extra steps. This article discusses how it was done - the approach can be applied for any O/S supported by Java Service Wrapper but not delivered out-of-the-box with Nexus, such as HP and AIX.

Nexus uses the JSW (Java Service Wrapper) library to implement its start-up scripts. This is a neat tool which makes it easier to install Java applications as O/S-specific services. This library was originally open source but has now muted into a strange commercial variant (there is a "community edition", but you can't use it on a server(!)), so the version used by Nexus is not the latest version, but the last truely open source one. But I digress..

If you haven't already done so, download the latest Nexus distribution and unpack it in a convenient directory. I usually define an environment variable called NEXUS_HOME that points to this directory.

Nexus comes with scripts for comes bundled with startup scripts for most of the common operating systems. If yours isn't among them, you need to download a wrapper here.

Once downloaded, you need to uncompress the library in the usual manner, e.g.

$ gunzip wrapper-hpux-parisc-64-3.2.3.tar.gz
$ tar xvf wrapper-hpux-parisc-64-3.2.3.tar

Now create a new directory in the nexus/bin/jsw directory, corresponding to your target operating system. For example, for 64 bit Intel HP unix I was using, I created a directory called "hpux-x86-64:"

$mkdir ${NEXUS_HOME}/bin/jsw/hpux-x86-64

Now copy the wrapper script and JSW libraries to this new directory:

$ cp -Rf wrapper-hpux-parisc-64-3.2.3/bin/wrapper ${NEXUS_HOME}/bin/jsw/hpux-x86-64/
$ cp -Rf wrapper-hpux-parisc-64-3.2.3/lib ${NEXUS_HOME}/bin/jsw/hpux-x86-64/

Finally, you need the nexus script itself, which is identical for all operating systems. Just duplicate the nexus script from one of the other JSW directories:

$ cp ${NEXUS_HOME}/bin/jsw/linux-x86-64/nexus ${NEXUS_HOME}/bin/jsw/hpux-x86-64/

That's it: you can now start Nexus normally:

$ ${NEXUS_HOME}/bin/jsw/linux-x86-64/nexus start

"Probably the best training course I've been on."..."Not just how to write Java code but the 'business end' - how to build, test, deploy, manage and monitor"..."One of the best and most useful courses I have attended. And they didn't even try to sell me anything!" - Get up to scratch with the latest in Java tools and best practices! Sign up on the 2009 season of the Java Power Tools Bootcamps.

Comments

Hi John, you may also be interested in the documentation i put together for the Solaris Zone instance I did for Apache: https://docs.sonatype.org/display/Repository/Repository.Zones.Apache.Org... This shows an end to end setup including mod_proxy, https etc.