Prerequisites for installing JDK version 1.8 or later
1 Downloads
Http://www.sonatype.org/nexus/archived/Select the appropriate version
2 Copy to/usr/local under unzip
sudo cp nexus-2.14.2-01-bundle.tar.gz /usr/local
sudo tar-xzvf nexus-2.14.2-01-bundle.tar.gz
3 Set Run Permissions
sudo chown user name nexus-2.14.2-01
sudo chown user name Sonatype-work
sudo chmod 777 nexus-2.14.2-01
sudo chmod 777 Sonatype-work
4 Setting environment variables (optional)
sudo gedit/etc/profile
Join (can also add a soft link)
Export $NEXUS _home=/usr/local/nexus-2.14.2-01
If you want to be convenient, you can join path
Path= $NEXUS _home/bin
5 Run
Nexus start
If the Nexus console shuts down, it stops.
6 log in to the foreground view (default settings below)
127.0.0.1:8081/nexus
User name: admin
Password: admin123
7 Download and update the index
Index file wget http://repo.maven.apache.org/maven2/.index/nexus-maven-repository-index.gz
Indexed properties File wget http://repo.maven.apache.org/maven2/.index/nexus-maven-repository-index.properties
Index Decompression Tool :wget https://repo1.maven.org/maven2/org/apache/maven/indexer/indexer-cli/5.1.1/ Indexer-cli-5.1.1.jar
copy three files to /usr/local/sonatype-work/nexus/indexer/central-ctx
Extract the properties file into the Central-ctx directory
Unzip the index file (note to match the downloaded file name, see the Run command Java-jar indexer-cli-5.1.0on the web. Jar I didn't pay attention to it at first. Error:unable to access Jarfile)
Java-jar indexer-cli-5.1.1.jar-u nexus-maven-repository-index.gz-d/.
-D/. Indicates decompression to the current path ( /usr/local/sonatype-work/nexus/indexer/central-ctx )
8 Restart Nexus and check in front desk
Nexus restart
Login-repositories-pulic Repositories-browse Index Expand the following central if you see the index list, you are successful.
9 Use:
Eclipse configures the corresponding warehouse address in the setting.xml under M2, and the address is the corresponding repository Path
Like public repositories's http://127.0.0.1:8081/nexus/content/groups/public/.
<mirror>
<id>mynexus</id>
<mirrorOf>cntral</mirrorOf>
<name>my-maven</name>
<url>http://127.0.0.1:8081/nexus/content/groups/public/</url>
</mirror>
ID and name, fill it out for yourself.
Android-studio
Maven {
URL "http://localhost:8081/nexus/content/groups/public/"
}
Above from the Internet, only for personal notes.
Ubuntu build Maven Library 2.14.2-01 and configure the off-cue file