在nexus官网下载,我的windows版本是nexus-2.14.5-02-bundle.tar
linux版本是nexus-3.7.0-04-unix.tar.gz
下载地址:https://www.sonatype.com/download-oss-sonatype
linux版本nexus 3.x版本为了集成docter和之前操作不一致,换成2.x版本
nexus依赖maven、jdk。
修改maven的setting文件为如下配置,增加
E:\m2\repository nuoyuan_releases admin admin123 nuoyuan_snapshots admin admin123 jdk-1.8 true 1.8 1.8 1.8 1.8 nuoyuan true true nuoyuan nuoyuan http://localhost:8081/nexus/content/groups/public/ true true central http://maven.aliyun.com/nexus/content/repositories/central/ true daily false never nuoyuan nuoyuan http://localhost:8081/nexus/content/groups/public/ true true central http://maven.aliyun.com/nexus/content/repositories/central/ true daily false never jdk-1.8 nuoyuan nuoyuan_snapshots admin admin123 jdk-1.8 true 1.8 1.8 1.8 1.8 nuoyuan true true nuoyuan nuoyuan http://localhost:8081/nexus/content/groups/public/ true true central http://maven.aliyun.com/nexus/content/repositories/central/ true daily false never nuoyuan nuoyuan http://localhost:8081/nexus/content/groups/public/ true true central http://maven.aliyun.com/nexus/content/repositories/central/ true daily false never jdk-1.8 nuoyuan
启动maven,windown执行bin/nexus.bat, linux 执行bin/nexus start 或者 run&
访问http://localhost8081/nexus 用户名密码 admin admin123
不登录查看deploy包 http://10.80.111.214:8081/nexus/content/groups/
点击右侧repositories→点击central→点击configuration→download remote indexs 设置为true
修改本机maven的setting文件
nuoyuan_releases
admin
admin123
nuoyuan_snapshots
admin
admin123
加入:
nuoyuan
nuoyuan
http://*.*.*.*:8081/nexus/content/groups/public true never
true always
加入:
nuoyuan
nuoyuan
http://*.*.*.*:8081/nexus/content/groups/public/
true
true
修改pom文件
nuoyuan_releases
core Release Repository
http://*.*.*.*:8081/nexus/content/repositories/releases/
nuoyuan_snapshots
core Snapshots Repository
http://*.*.*.*:8081/nexus/content/repositories/snapshots/
更新
nexus默认安装目录 /usr/local/nexus ,同级目录有个sonatype-work用来存取备份等信息,会越来越大
迁移到挂载目录,修改conf目录下的nexus.properties
#
# Sonatype Nexus (TM) Open Source Version
# Copyright (c) 2008-present 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=/mnt/.m2/sonatype-work/nexus
runtime=${bundleBasedir}/nexus/WEB-INF
# orientdb buffer size in megabytes
storage.diskCache.bufferSize=4096
参考博客:http://blog.csdn.net/atco/article/details/51721271