Nexus build Maven Private server

Source: Internet
Author: User

In order to develop a demand, operation and maintenance personnel are also hard to carry out, who called the others 6 ... At the same moment, the company's development leadership according to the company's needs, requirements to build the company's own private server maven, why to build a private server, simple summary:

1,maven own Central library access is very slow, in addition to the wall of the kingdom, plugging you.

2, the company developed its own jar package and other code sources, do not want to share publicly, only put on the private server to store.

3, some jar package or code source Central Library does not have, or the version is older, or use the old version of the Central Library does not have, we need a private server to store this data, when used to download the speed will be very fast

Principle: A special remote warehouse is set up in a local area network to broker remote warehouses and deploy third-party components. When Maven needs to download the widget, it can be downloaded to the local repository if it is available, otherwise the remote repository will be requested to download the widget to the local repository.


Build:

Environment: Centos7-x86-64 java1.7

Version: apache-maven-3.0.5 nexus-2.3.1-01

Before installing, please install the Java environment, require JAVA7 environment, not repeat.

1. MAVEN Installation

1.1, Decompression: TAR-ZXVF apache-maven-3.0.5.tar.gz-c/usr/local

Unzip to the development directory

1.2. Configure Environment variables

Add the following configuration in the/etc/profile file

exportMAVEN_HOME=/usr/local/apache-maven-3.0.5

export PATH=$PATH:$MAVEN_HOME /bin

Save exit and reload the configuration file

Source/etc/profile

1.3. Verify that the installation is successful

MVN--version

2. Nexus Installation

2.1. Unzip to the/usr/local/directory

Unzip Nexus-latest-bundle.zip

MV Nexus-2.3.1-01/usr/local/nexus

2.2. Enter the directory and edit the configuration file:

Vim/usr/local/nexus/conf/nexus.properties

Modify ports and IP addresses, and so on.

2.3. Add Nexus Service and boot to system

Cp/usr/local/nexus/bin/jsw/linux-x86-64/nexuss/etc/init.d/nexus

chmod 755/etc/init.d/nexus

Modify the Nexus startup script as follows

Vim/etc/init.d/nexus

Modify Nuxes Absolute Path Nexus_home=/usr/local/nexus

Set Run_as_user=root, if other users, please create in advance.

Platform=linux-x86-64
Platform_dir= "${nexus_home}/bin/jsw/${platform}"
Piddir= "${nexus_home}"

Find and modify

Wrapper_cmd= "${platform_dir}/wrapper"

wrapper_conf= "$NEXUS _home/bin/jsw/conf/wrapper.conf"

Modify to save exit

To add a startup item

Chkconfig--add Nexus

Chkconfig--levels 345 Nexus on

Service Nexus Start

View Log on startup, whether it starts normally

Tail-f/usr/local/nexus/logs/wrapper.log

If there is no error, access Http://IP:8081/nexus with IE browser to view the Nexus interface.

If such error occurs:


Modify the wrapper.conf configuration file, change the Wrapper.java.command=%java_home%/bin/java to the absolute path you installed Java, and restart the service. There are errors because your Java version does not meet the 7 requirements, update the Java version to

This article is from the "Tea Incense" blog, please be sure to keep this source http://chinawu.blog.51cto.com/10692884/1757486

Nexus build Maven Private server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.