For more information about how to install the Nexus service, see the official website: Ghost.
For more information about installing the Nexus service, see Official Site: http://www.sonatype.com/books/nexus-book/reference/install-sect-install.html.
Related reading:
Ubuntu Maven installation and configuration http://www.linuxidc.com/Linux/2011-07/38964.htm
1. Download and install Nexus
Download the latest version of Nexus on Ubuntu 11.10 server. Unlike the official documentation, I put nexus in the/usr directory instead of the/usr/local directory.
Wget http://nexus.sonatype.org/downloads/nexus-oss-webapp-1.9.2.4-bundle.tar.gz
Music nexus-oss-webapp-1.9.2.4-bundle.tar.gz/usr/
Cd/usr
Tar zxvf nexus-oss-webapp-1.9.2.4-bundle.tar.gz
Ln-s nexus-oss-webapp-1.9.2.4 nexus
For future convenience, follow the instructions in the official documentation to set an environment variable and add the following script ~ /. Bashrc file final
Export NEXUS_HOME =/usr/nexus
2. Run
Go to the/usr/nexus-oss-webapp-1.9.2.4/bin/jsw/linux-x86-64 directory and run the following command:
./Nexus start
Starting Nexus OSS...
Started Nexus OSS.
By default, The nexus uses the built-in jetty as the web server and listens to the local port 8081. You can test the connection by opening the webpage http: // yourserver: 8081/nexus. The default username and password are admin/admin123.
3. Create a system service
Copy the script that comes with Nexus to the/etc/init. d directory.
Root @ ubuntu1110:/etc/init. d # cp $ NEXUS_HOME/bin/jsw/linux-x86-64/nexus ./
Add several variables to the nexus script NEXUS_HOME =/usr/nexusPLATFORM = linux-x86-64JAVA_HOME =/usr/jdk1.6.0 _ 30 PATH = "$ JAVA_HOME/bin: $ PATH to modify the values of several variables: APP_NAME = nexusAPP_LONG_NAME = Sonatype Nexus # WrapperWRAPPER_CMD = $ NEXUS_HOME/bin/jsw/$ PLATFORM/wrapperWRAPPER_CONF = $ NEXUS_HOME/bin/jsw/conf/wrapper. conf
# Location of the pid file.
PIDDIR =/var/run
The modified script should be properly saved. It is boring to do this kind of thing again.
Run the following command:
Root @ ubuntu1110:/etc/init. d # update-rc.d nexus ults
Update-rc.d: warning:/etc/init. d/nexus missing LSB information
Update-rc.d: see
Adding system startup for/etc/init. d/nexus...
/Etc/rc0.d/K20nexus-> ../init. d/nexus
/Etc/rc1.d/K20nexus-> ../init. d/nexus
/Etc/rc6.d/K20nexus-> ../init. d/nexus
/Etc/rc2.d/S20nexus-> ../init. d/nexus
/Etc/rc3.d/S20nexus-> ../init. d/nexus
/Etc/rc4.d/S20nexus-> ../init. d/nexus
/Etc/rc5.d/S20nexus-> ../init. d/nexus
OK. Now you can start it through service nexus start,
Then check the startup status through tail-f/usr/nexus/logs/wrapper. log.