1 下载nexus安装包  网址:http://www.sonatype.org/nexus/
   建议下载最新的版本,最新的版本支持比较新的jdk版本, 1.6 肯定是不行的,必须是1.7及其以上。

下载所需安装包。http://pan.baidu.com/s/1ntzDWkL
如果读者已经设置jdk 版本,且低于1.7. 则可以配置想要使用的 jdk 版本。 nexus-2.10.0-02\bin\jsw\conf, 目录 wrapper.conf 文件 ,
找到 wrapper.java.command= F:/jdk1.7.0_71/bin/java.exe, 这样配置即可。
2 启动nexus服务
找到当前对应的版本,有32, 64 位。
    进入nexus的文件目录:..\nexus-2.10.0-02\bin\jsw\windows-x86-64下面,
      Installnexus.bat 表示安装nexus服务到window服务中去。
      Startnexus.bat  表示启动nexus服务。
      nexus.bat  表示启动nexus应用程序 。
      Resumenexus.bat  表示重启nexus 。
      Stopnexus.bat  表示停止nexus服务
   启动nexus 无需启动tomcat,只需要点击“nexus.bat "就可以启动。
   启动成功后 在浏览器地址栏中输入:
   http://localhost:8081/nexus/index.html
   如果看到nexus界面 说明启动成功。
3 设置maven的setting.xml文件
   3.1 设置自定义的仓库
   默认仓库会保存在c盘的C:\Users\yjx\.m2下面,如果要使用自定义的仓库,则在setting.xml中添加下面的配置

<localRepository>e:/repository</localRepository>

3.2 设置镜像私服

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

<mirrors>

<!-- mirror

| Specifies a repository mirror site to use instead of a given repository. The repository that

| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used

| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.

|-->

<mirror>

<id>nexus</id>

<mirrorOf>*</mirrorOf>

<name>Nexus Mirror</name>

<url>http://localhost:8081/nexus/content/groups/public</url>

</mirror>

</mirrors>

3.3 设置 profile

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

<profile>

<id>nexus</id>

<repositories>

<repository>

<id>nexus</id>

<name>Nexus</name>

<url>http://localhost:8081/nexus/content/groups/public</url>

<releases><enabled>true</enabled></releases>

<snapshots><enabled>true</enabled></snapshots>

</repository>

</repositories>

<pluginRepositories>

<pluginRepository>

<id>nexus</id>

<name>Nexus</name>

<url>http://localhost:8081/nexus/content/groups/public</url>

<releases><enabled>true</enabled></releases>

<snapshots><enabled>true</enabled></snapshots>

</pluginRepository>

</pluginRepositories>

</profile>

<!--激活配置-->

<activeProfiles>

<activeProfile>nexus</activeProfile>

</activeProfiles>

保存文件。

4 登录nexus  用户名admin  密码 admin123.

进入Repository菜单,修改 Apache Snapshots,Codehaus Snapshots,Maven Central的Download Remote indexs 为true.

并右击每一个仓库的 repair Index  ,进行更新index  并把所有的proxy类型的仓库添加到public repository中去。

自己觉得比较好的其他的代理仓库如下:

添加新的repository 即代理仓库, 代理仓库的remoteurl

http://repository.jboss.org/nexus/content/groups/public/

https://repository.jboss.org/nexus/content/groups/developer/

6 备注

如果你安装的jdk是1.7的版本或者更高,请使用nexus版本2.0以上的版本

7 nexus 服务器的迁移

nexus 他本身会吧要下载好的jar 包存储起来,下次就不会再去下载。

他的storage 存储目录是: sonatype-work\nexus\storage

sonatype-work 这个目录和 nexus 是同级的,nexus-2.10.0-02 与   onatype-work 在同一目录下,是自动创建的,迁移的时候只需要拷贝这些 storage 过去就可以了。

搭建Nexus本地仓库的更多相关文章

  1. 使用Nexus搭建Maven本地仓库

    阅读目录 序 Nexus 本文版权归mephisto和博客园共有,欢迎转载,但须保留此段声明,并给出原文链接,谢谢合作. 文章是哥(mephisto)写的,SourceLink 序 在工作中可能存在有 ...

  2. nexus 搭建maven本地仓库

    使用Nexus搭建Maven本地仓库   阅读目录 序 Nexus 序 在工作中可能存在有些开发机器不能上网,大量的机器获取jar包会导致公司网络很慢,还有时候公司会自己发布自己的项目版本,其他的项目 ...

  3. Linux 用脚本编写搭建yum本地仓库

    Linux 用脚本编写搭建yum本地仓库 源码如下: #!/bin/bash #该脚本用于自动化搭建本地yum仓库 #挂载光盘 #作者:雨中落叶 #博客:https://www.cnblogs.com ...

  4. 搭建YUM本地仓库

    本文介绍如何利用CentOS 7 ISO光盘镜像搭建YUM本地仓库. 环境准备: (1)VMware15.5版本虚拟机 (2)CentOS-7-x86_64-DVD-1908光盘镜像文件 1. 搭建Y ...

  5. maven上传jar到nexus本地仓库

    一.nexus新增本地仓库 Hosted Repository:本地仓库,部署组织内部的版本内容 Proxy Repository:代理仓库,代理远程的公共仓库,如maven中央仓库 Virtual ...

  6. 搭建maven本地仓库,idea应用本地maven仓库

    提环境: 安装好tomcat.maven.jdk.idea. 打开maven安装目录,在目录下新建 maven仓库文件夹(名子随便): 打开conf\setting.xml 加入<localRe ...

  7. 使用 satis 搭建 composer 本地仓库

    环境 windows nginx php composer 安装 拉取 satis 项目包,并拉取项目依赖 composer create-project composer/satis --stabi ...

  8. Maven搭建Nexus私有仓库

    下载压缩包nexus-2.13.0-01-bundle.tar.gz 解压后有两个目录 进入程序目录启动 ./nexus start 启动告警(确认用root启动把以下加入到环境变量) export ...

  9. 使用Nexus2搭建Maven本地仓库

    由于OS为WindowsXP,而Nexus3forWindows为x64版本,只能选择安装nexus2了. Windows(x86)平台,Nexus Repository Manager OSS 2. ...

随机推荐

  1. 莫烦课程Batch Normalization 批标准化

    for i in range(N_HIDDEN): # build hidden layers and BN layers input_size = 1 if i == 0 else 10 fc = ...

  2. 【技巧总结】Penetration Test Engineer[5]-Operating System Security(SQL Server、MySQL提权)

    4.数据库安全基础 4.1.MSSQL 数据库角色权限 sysadmin:执行SQL Server中的任何动作 db_owner:可以执行数据库中技术所有动作的用户 public:数据库的每个合法用户 ...

  3. 2 - django-urls路由系统基本使用

    目录 1 路由系统(urls控制) 1.1 正则字符串参数 1.2 url的分组 1.2.1 无名分组 1.2.2 有名分组 1.3 URLconf 在什么上查找 1.4 include(路由分发) ...

  4. Linux下编译安装qemu和libvirt【转】

    转自:http://www.cnblogs.com/findumars/p/5679742.html 目录 [hide] 1 安装qemu 1.1 qemu介绍 1.2 下载源文件 1.3 编译安装 ...

  5. strace使用详解(未研究)

    (一) strace 命令    用途:打印 STREAMS 跟踪消息. 语法:strace [ mid sid level ] ... 描述:没有参数的 strace 命令将所有的驱动程序和模块中的 ...

  6. java基础31 List集合下的Vector集合

    单例集合体系: ---------| collection  单例集合的根接口--------------| List  如果实现了list接口的集合类,具备的特点:有序,可重复       注:集合 ...

  7. UFLDL 教程学习笔记(三)

    教程地址:http://ufldl.stanford.edu/tutorial/supervised/SoftmaxRegression/ logstic regression是二分类的问题,如果想要 ...

  8. Ubuntu 搭建ELK

    一.简介 官网地址:https://www.elastic.co/cn/ 官网权威指南:https://www.elastic.co/guide/cn/elasticsearch/guide/curr ...

  9. gtk+学习笔记(四)

    今天看了下单选按钮的设置,实现起来还是挺简单的,就是自己太不熟练 radio=gtk_radio_button_new_with_label(NULL,"a"); //第一次创建单 ...

  10. java中举例说明对象调用静态成员变量

    package org.hanqi.zwxx; public class Test { static int i=47; public void call() { System.out.println ...