Visit my.sonatype.com for documentation on Nexus Repository version 2.
You can run a Nexus Repository 2 install in a read-only location, but you'll need to make a few modifications first.
First, edit $NEXUS_HOME/bin/nexus and uncomment and set the PIDDIR line:
# Location of the pid file.
#PIDDIR="."
This specifies where the file that holds the currently running Nexus Repository 2 process ID will be created. This file is used by the Nexus Repository 2 watchdog process to control the main Nexus Repository 2 executable.
Next, edit $NEXUS_HOME/bin/jsw/conf/wrapper.conf. Look for this line:
wrapper.java.additional.2=-Djava.io.tmpdir=./tmp
Set this to the location of a directory where Nexus Repository 2 can create temporary files.
Finally, in the same file, look for this:
wrapper.logfile=logs/wrapper.log
Set this to a full path where you want the log file for the Nexus Repository 2 watchdog process (the "wrapper") to be created.
Note that the above applies only to the Nexus Repository 2 installation directory (e.g. nexus-2.11.3, nexus-professional-2.11.3). Nexus needs full read/write access to the work-directory (sonatype-work/nexus).