To install the Nexus Service documentation, refer to the official site: http://www.sonatype.com/books/nexus-book/reference/install-sect-install.html
Related reading:
Ubuntu maven Installation and configuration http://www.codesky.net/Linux/2011-07/38964.htm
1. Download and install the Nexus
On Ubuntu 11.10 Server, download the latest Nexus version. Unlike official documents, I put the nexus in/usr instead of the/usr/local directory.
wget http://nexus.sonatype.org/downloads/nexus-oss-webapp-1.9.2.4-bundle.tar.gz
MV 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, set an environment variable according to the official documentation and add the following script to the ~/.BASHRC file at the end of the
Export Nexus_home=/usr/nexus
2. Running
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.
The default Nexus uses the built-in jetty as the Web server, listening on local port 8081. By opening the Web page Http://yourserver:8081/nexus to test, the user name and password default is: admin/admin123
3. Create a system service
Copy the Nexus-brought script to the/ETC/INIT.D directory
[Email protected]:/etc/init.d# cp $NEXUS _home/bin/jsw/linux-x86-64/nexus./
Add a few variables to the Nexus script in Nexus_home=/usr/nexusplatform=linux-x86-64java_home=/usr/jdk1.6.0_30path= "$JAVA _home/bin:$ Path modifies 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
This modified script should be well preserved, and it is boring to do it again.
After that, run the command:
[Email protected]:/etc/init.d# update-rc.d Nexus Defaults
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. can now be started via service Nexus Start,
Then check the boot status by Tail-f/usr/nexus/logs/wrapper.log.
Ubuntu 11.10 Server setting up the MAVEN