maven private server construction

        Maven private server is a special kind of remote warehouse, generally a private server is deployed in a company local area network, which is used to proxy the remote warehouse on the Internet, and is shared by the project developed within the company after deployment.

        The following are the steps to install maven private server in Linux environment

 

1 Download the maven private server installation package, the download page is as follows: https://support.sonatype.com/hc/en-us

The latest version is 3:00. The download here is nexus-2.11.2-04-bundle.tar.gz. The download link is as follows:

https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-04-bundle.tar.gz

 

2 Create the nexus directory with the following commands:

   mkdir nexus

 

3 Put the downloaded installation package into the created nexus directory and unzip it

   tar -zxvf nexus-2.11.2-04-bundle.tar.gz

 

4 After decompression, the directory structure is as follows:

   

 Among them, nexus-2.11.2-04 is the web service provided by the private server, which contains an embedded jetty, which provides a web page to manage the private server; sonatype-work is the default local warehouse address, which stores various warehouses created and Managed builds

 

5 If necessary, modify the local warehouse storage path and web service port information

   cd nexus-2.11.2-04/conf

   vim nexus.properties

   The contents are as follows:

   

# Sonatype Nexus (TM) Open Source Version
# Copyright (c) 2008-2015 Sonatype, Inc.
# All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions.
#
# This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0,
# which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html.
#
# Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks
# of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
# Eclipse Foundation. All other trademarks are the property of their respective owners.
#

# Sonatype Nexus
# ==============
# This is the most basic configuration of Nexus.

# Jetty section
application-port=8081
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/nexus

# Nexus section
nexus-work=${bundleBasedir}/../sonatype-work/nexus
# nexus-work=/home/ywu/mvnRepository/
runtime=${bundleBasedir}/nexus/WEB-INF

    The default web service port is 8081, and the web service context path is nexus, which can be modified if necessary

 

6 Start/Stop

   Go to the bin directory

   Start: ./nexus start

   stop: ./nexus stop

 

7 visit

   Enter the url in the browser: http://ip:port/nexus

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326183749&siteId=291194637