Install Nexus in CentOS and import existing Component Libraries

Source: Internet
Author: User
Tags sonatype sonatype nexus

Nexus is the Maven Repository Manager used to build a local repository server. The main advantage of this is to save network resources and speed up. All Maven in the development team can share this local repository, download shared usage once. Another advantage is that it provides a building component for your organization. This article describes how to install and configure Nexus in CentOS and how to import existing component repositories.
 
1. Software
 
A) download Nexus address: http://www.sonatype.org/downloads/nexus-2.1.2-bundle.tar.gz
B) Unless otherwise stated, the operating user of this document is nexus.
C) The default administrator username and password for nexus are admin/admin123.
 
2. Installation
 
A) decompress

$ Tar zxvf nexus-2.1.2-bundle.tar.gz
B) Move to another directory
 
$ Mv nexus-2.1.2/home/nexus
C) set as system self-starting service (use root user)
 
# Cd/etc/init. d/
# Cp/home/nexus/bin/jsw/linux-x86-64/nexus
 
 
Edit the/etc/init. d/nexus file and add the following variable definitions:
NEXUS_HOME =/home/nexus
PLATFORM = linux-x86-64
PLATFORM_DIR = "$ {NEXUS_HOME}/bin/jsw/$ {PLATFORM }"
 
Modify the following variables:
 
WRAPPER_CMD = "$ {PLATFORM_DIR}/wrapper"
WRAPPER_CONF = "$ {PLATFORM_DIR}/../conf/wrapper. conf"
PIDDIR = "$ {NEXUS_HOME }"
Modify the following variables to set the startup user to nexus:

RUN_AS_USER = nexus
Run the command to add the nexus self-starting service
 
# Chkconfig-add nexus
# Chkconfig-levels 345 nexus on
Run the following command to start and stop the nexus service:
 
# Service nexus start
# Service nexus stop
 
 
D) Check whether startup is successful
 
Access URL: http: // localhost: 8081/nexus in the local browser
The Nexus welcome page appears.
Note: If you want to remotely access through a browser, enter http: // <ip>: 8081/nexus in the remote browser
<Ip> you can enter the command ifconfig on the local machine to view
If you fail to access the nexus welcome page, you need to check whether port 8081 is enabled in the firewall settings of the local machine.
 
E) modify the configuration
 
The configuration file is in nexus/conf/nexus. properties. The configuration example is as follows:

# 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
Runtime =$ {bundleBasedir}/nexus/WEB-INF.
Pr. encryptor. publicKeyPath =/apr/public-key.txt

Main configuration parameters:
 
Application-port: nexus startup port
Nexus-work: Specify the storage location of the Component Library

  • 1
  • 2
  • Next Page

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.