linux Maven+nexus3服務搭建
阿新 • • 發佈:2018-03-16
Maven+nexus3Maven
下載包:http://maven.apache.org/download.cgi
wget http://apache.fayea.com/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz
tar xf apache-maven-3.5.0-bin.tar.gz
mv apache-maven-3.5.0 /usr/local/maven
Nexus
下載包:https://www.sonatype.com/download-oss-sonatype
tar xf nexus-3.3.2-02-unix.tar.gz
mv nexus-3.3.2-02/ sonatype-work/ /opt
cd /opt
mv nexus-3.3.2-02 nexus3
下載包:http://maven.apache.org/download.cgi
wget http://apache.fayea.com/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz
tar xf apache-maven-3.5.0-bin.tar.gz
mv apache-maven-3.5.0 /usr/local/maven
編譯/etc/profile 添加系統變量
MAVEN_HOME=/usr/local/maven
export MAVEN_HOME
export PATH=${PATH}:${MAVEN_HOME}/bin
source /etc/profile #重新讀取變量
#驗證
[root@localhost maven]# mvn -v
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T03:39:06+08:00)
Maven home: /opt/java/maven
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /opt/java/jdk1.8.0_131/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-514.el7.x86_64", arch: "amd64", family: "unix"
下載包:https://www.sonatype.com/download-oss-sonatype
tar xf nexus-3.3.2-02-unix.tar.gz
mv nexus-3.3.2-02/ sonatype-work/ /opt
cd /opt
mv nexus-3.3.2-02 nexus3
#啟動
/opt/nexus3/bin/nexus start &
#配置文件 /opt/nexus3/etc/nexus-default.properties
#修改數據存儲路徑文件 /opt/nexus3/bin/nexus.vmoptions
訪問:端口默認8081
linux Maven+nexus3服務搭建