Visit my.sonatype.com for documentation on Nexus Repository version 2.
If Nexus Repository 2 is requesting for license to be installed every time it is restarted, then it is most probably due to the OS user that Nexus Repository 2 is started as has no home directory defined.
The license details is stored in java preference store. In Linux this would be $USER_HOME/.java/.userPrefs/com/sonatype/nexus/professional/prefs.xml.
There are two options to resolve the issue:
Option 1) Create a home directory for the Nexus Repository 2 process user (ensure that Nexus process user can write to the home directory).
Option 2) Add a property java.util.prefs.userRoot to the file $NEXUS_HOME/bin/jsw/conf/wrapper.conf to define the location to store the java preference store (ensure that Nexus process user can write to this directory). Below are the steps to set to implement this.
wrapper.java.additional.1=-XX:MaxPermSize=192m wrapper.java.additional.2=-Djava.net.preferIPv4Stack=true wrapper.java.additional.3=-Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl" wrapper.java.additional.3.stripquotes=TRUE
Add a new line below them, like this:
wrapper.java.additional.4=-Djava.util.prefs.userRoot=<path-to-directory-location-where-prefs-should-be-stored>
Note: Be sure to set the sequence number (shown here as "4") to the next unused sequence number in the wrapper.java.additional list.
Nexus Repository 2 should then be restarted and license will need to be installed, which will then be stored in the java preference store. This should then prevent license install request on subsequent restarts.