LINUX Install nexus Private Server and Use

Posted by bqheath on Mon, 20 Jan 2020 20:02:19 +0100

Download and unzip the nexus package

#This download version 2.14.3-02 can be updated to 3.13.0-01
# wget ""
# tar xfvz nexus-2.14.3-02-bundle.tar.gz

Configuring nexus environment variables

# cd /etc
# vi profile

i Enter edit mode, add environment variable configuration at the bottom of the file

export RUN_AS_USER=root

export JAVA_HOME=/usr/local/software/jdk1.8.0_161 //jdk directory

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar


esc exits edit mode, shift+z+z saves exits

esc exits edit mode, shift+z+z saves exits

Modify Default Port (8081)

# cd /usr/local/software/nexus/nexus-2.14.3-02/conf
# VI //19 line application-port=8081 can be specified instead

Make sure firewalls and server rules open the configured interfaces

Start nexus

# cd /usr/local/software/nexus/nexus-2.14.3-02/bin
# ./nexus start

nexus management interface

Access address: http://ip:port/nexus

Local MAVEN uses private Nexus

Configure setting s file

<?xml version="1.0" encoding="UTF-8"?>     
<settings   xmlns=""    
    <localRepository>G:\singlecase\repository\</localRepository> <!--Local warehouse -->
    <username>admin</username>        <!--Private User Name -->
          <name>Public Repositories</name>
         <name>Public Repositories</name>

pom file configuration

             <name>User Project Release</name>

Upload jar to private service

Quote Private Server jar


Topics: nexus Maven Apache SSL