1. How to install bundle in Ubuntu
1.1. Go to the official website to download the installation package: http://www.sonatype.org/nexus/
What I downloaded here is: nexus-2.8.1-01-bundle.zip, which needs to be started in JDK 7
1.2. decompress the package:
sudo unzip nexus-2.8.1-01-bundle.zip
After decompression, I decompress the package to the/opt/nexus/directory. here we can see two directories:
Nexus-2.8.1-01 and sonatype-Work
1.3. configuration file:
Open the configuration file:
sudo vi /opt/nexus/nexus-2.8.1-01/bin/jsw/conf/wrapper.conf
Find the following line:
wrapper.java.command=java
This line must be modified. You need to fill in the complete Java path. Here I write:
wrapper.java.command=/opt/jdk1.7.0_60/bin/java
Java_home is not used to replace/opt/jdk1.7.0 _ 60, because I don't want nexus to run the dependency java_home. We recommend that you configure it like me.
1.4. If you need to use root to start nexus, you also need to modify the script:
sudo vi /opt/nexus/nexus-2.8.1-01/bin/nexus
Modify:
RUN_AS_USER=root
NOTE: If root is used to start nexus, it may fail to start. Check whether the root user has loaded java. You can check this by using sudo Env, if I use the recommended method in 1.3, this can be avoided.
1.5. Start nexus:
Sudo./nexus start under/opt/nexus-2.8.1-01/bin
1.6. Access the web page:
http://hostip:8081/nexus/#welcome