Install Maven private server (Nexus) and related environment configuration under Linux

Preface

Maven private server is a special remote warehouse. It is a warehouse service set up in the local area network. The private server acts as a proxy for remote warehouses on the WAN for users in the local area network to use. When Maven needs to download a component, it requests it from the private server. If the component does not exist on the private server, it downloads it from an external remote warehouse, caches it on the private server, and then provides services for the download request of Maven

 Official website:  https://www.sonatype.com/

 

premise

Install JDK  https://blog.csdn.net/javanbme/article/details/111573731 

 

installation steps

1. Create a directory

cd /usr/local && mkdir nexus && cd nexus

2. Download the source code

  https://www.sonatype.com/thanks/repo-oss

  Link: https://pan.baidu.com/s/1YBtyxhUc9JEvp70vbgLapw  Password: mvhv Upload to the above directory

3. Unzip the source code

tar -xzvf nexus-3.9.0-01-unix.tar.gz

4. Rename

mv nexus-3.9.0-01 nexus

5. Modify the configuration file (floating according to the machine hardware configuration)

cd nexus/bin/
vi nexus.vmoptions 

  In English input state, press i to enter insert mode, modify the following configuration

-Xms128M
-Xmx256M
-XX:MaxDirectMemorySize=256M

  Press esc to enter  : wq  save and exit 

6. Start

./nexus start

7. Other instructions

  1) The default port of Nexus is 8081, which can be modified in the etc/nexus-default.properties configuration.

  2) The default username and password of Nexus is admin/admin123

  3) When you encounter strange problems, restart nexus, the startup time will be slower and it will take about 1 minute to access.

  4) The working directory of Nexus is sonatype-work (the path is generally under the same level directory of nexus)

8. Visit

http://ip address:8081/

9. Use

https://blog.csdn.net/javanbme/article/details/113345312

 

Guess you like

Origin blog.csdn.net/javanbme/article/details/113336338
Recommended