本篇文章主要介绍的是nexus私服搭建、配置及使用。
wget -P /usr/local https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-3.9.0-01-unix.tar.gz
mkdir /usr/local/nexus
tar -zxvf nexus-3.9.0-01-unix.tar.gz -C /usr/local/nexus
vim /usr/local/nexus/nexus-3.9.0-01/etc/nexus-default.properties
启动nexus:/usr/local/nexus/bin/nexus start
关闭nexus:/usr/local/nexus/bin/nexus stop
浏览器打开http://localhost:8081/
,端口可以更改,登录nexus
初始账号:admin,初始密码:admin123
然后保存。
在maven的setting文件中配置镜像
<mirror>
<id>nexus</id>
<name>hqx-nexus</name>
<url>http://localhost:8888/repository/maven-public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<repositories>
<!-- 配置nexus远程仓库 -->
<repository>
<id>nexus</id>
<name>Nexus Snapshot Repository</name>
<url>http://localhost:8888/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
CSDN:https://blog.csdn.net/qq_27682773
简书:https://www.jianshu.com/u/e99381e6886e
博客园:https://www.cnblogs.com/lixianguo
个人博客:https://www.lxgblog.com
原文:https://www.cnblogs.com/lixianguo/p/12518375.html