Nexus for linux安装

安装Nexus

下载安装包

https://www.sonatype.com/download-oss-sonatype


解压缩文件

解压缩文件后生成两个目录。

nexus-3.5.1-02 该目录包含 nexus的运行文件、依赖包等文件。

sonatype-work 该目录包含 nexus生成的配置文件、仓库文件。



启动

./nexus start


验证

http://localhost:8081

Nexus默认的管理员用户名和密码是admin/admin123


在项目中使用

在单个项目中使用

<!-- Nexus私服 -->
<repositories>
<repository>
<id>nexus</id>
<name>Nexus</name>
<url>http://10.0.0.100:8081/repository/maven-public/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Nexus</name>
<url>http://10.0.0.100:8081/repository/maven-public/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>


应用于所有项目

<!--配置镜像-->
<mirror>  
    <id>nexus</id>  
    <mirrorOf>*</mirrorOf>  
    <url>http://10.0.0.100:8081/repository/maven-public/</url> 
</mirror> 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值