Maven PW Nexus3.x under Linux environment to build operational records

Original Address: https://blog.csdn.net/liupeifeng3514/article/details/79553747

PW introduced

PW refers to the private server is set up in a special LAN remote repository, a remote repository proxy aim is to build and deploy third party. After With PW, when the need to download Maven member, direct request, PW, PW is present on the download to the local repository; otherwise, PW requests the external remote repository, download the member to the PW, and then provided to the local repository to download.

 

 

Nexus Introduction

Nexus is a powerful Maven repository manager, which greatly simplifies maintenance and access to external warehouse inside the local warehouse. If you are using a public Maven repository server, from the component (Artifact) Maven central repository download needed, but this is usually not a good practice. Normal practice is to set up a server in the local Maven repository, namely the use of Nexus can only be in one place, PW will be able to access and full control over the deployment in your warehouse maintained by each of the Artifact.

  • Nexus remote warehouse agents while maintaining a local warehouse, to reduce the load on the central warehouse, saving external network bandwidth and time, Nexus PW to meet such needs.
  • Nexus is a set of "out of the box" system does not require a database, it uses the file system to organize the data Lucene added.
  • Nexus using ExtJS to develop interfaces to provide a complete REST APIs, through the use of integrated Eclipse m2eclipse and use Restlet.
  • Nexus supports WebDAV and LDAP authentication security.
  • Nexus also provides a powerful warehouse management, member search function, which is based on REST, friendly UI is a extjs of REST client, it takes up less memory, based on a simple file system rather than the database.

Why build Nexus PW?

If there are no Nexus PW, we need all of the components are required by Maven repository maven central repository and downloaded to local third parties, and everyone on the team a duplicate from the maven repository download components will undoubtedly increase the load warehouse and external network bandwidth is wasted, if Suman, it will also affect the process of the project. In many cases the development projects are carried out, including the network, do not connect maven how warehouse it? The development of public members how to make use of other projects? This time we have to build your team maven PW own, saving network bandwidth will accelerate the process of building the project, of course, a prerequisite is that you have all the components in the PW needed for the project.

In short, the benefits of local building nexus PW are:

  1. Accelerate the building;
  2. Save bandwidth;
  3. Save bandwidth maven central repository;
  4. Stable (cope with the problem once the central server);
  5. Control and audit;
  6. It can be deployed to third member;
  7. You can create a local internal warehouse;
  8. You may establish a public warehouse

These advantages make increasingly become the most popular Nexus Maven repository manager.

Nexus installation

Install: JDK and Maven. You can refer to: the JDK installation (the tar.gz) , the Linux installation under Maven

Nexus installation implemented in two ways:

1) war installation package

Download: https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.14.2-01.war
directly to the war package on the tomcat root directory, you can use the start tomcat

2) Source Installation

Download: https://www.sonatype.com/download-oss-sonatype

[root @ peipei3514 /] # cd / usr / local / src / 
# download Nexus 
[root @ peipei3514 src] # wget https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-3.9. unix.tar.gz-0-01 

# extract to the specified directory 
[root @ peipei3514 src] # tar -zvxf nexus-3.9.0-01-unix.tar.gz -C /usr/local/nexus-3.9.0- 01 / 

# launch Nexus 
[root @ peipei3514 src] # /usr/local/nexus-3.9.0-01/nexus-3.9.0-01/bin/nexus start

After starting the console output:

WARNING: ************************************************************
WARNING: Detected execution as "root" user.  This is NOT recommended!
WARNING: ************************************************************
Starting nexus

The above warning appears during startup: not recommended for root users to start. This warning does not affect normal access and use of nexus.

After # nexus service starts successfully, you need to wait a long time, up until 8081 port 
[root @ peipei3514 src] # lsof -i: 8081 
the COMMAND PID the USER FD the TYPE the DEVICE SIZE / OFF NODE NAME 
the Java root 766u IPv4 1979 TCP * 26,972 0t0 : tproxy (LISTEN) 
the Java root 770u 1979 26974 0t0 IPv4 TCP peipei3514: tproxy-> 192.168.1.1:54767 (the ESTABLISHED) 
the Java root 771u 1979 27418 0t0 IPv4 TCP peipei3514: tproxy-> 192.168.1.1:54768 (the ESTABLISHED) 
the Java root 1979 27419 0t0 IPv4 TCP peipei3514 772u: tproxy-> 192.168.1.1:54783 (the ESTABLISHED) 
the Java root 773u 1979 27420 0t0 IPv4 TCP peipei3514: tproxy-> 192.168.1.1:54784 (the ESTABLISHED)  
the Java root 774u 1979 27421 0t0 IPv4 TCP peipei3514: tproxy -> 192.168.1.1:54785 (ESTABLISHED)
the Java root 775u 1979 27422 0t0 IPv4 TCP peipei3514: tproxy -> 192.168.1.1:54786 (ESTABLISHED)

Access Nexus: http://192.168.1.128:8081/

 

 

Appears above the page, the configuration nexus success! Top right, click "Log in", enter the default user name (admin) and the default password (admin123).

 

Guess you like

Origin www.cnblogs.com/dyh004/p/11579959.html