nexus官网下载地址:

https://www.sonatype.com/products/repository-oss-download#main-content

需要填写用户信息:

邮箱还必须是公司邮箱,点击download

官网下载不了,用了别人下载好的上传百度云的地址:

https://pan.baidu.com/s/1RXvVEXml-LoB3ZN2iOhiew 提取码:5vm0;

本地对应安装包路径:

~/wins&linux迁移工具包/nexus-3.31.1-01-unix.tar.gz

将安装包上传到对应服务器,然后进行解压,解压完成后之前启动就行,如图:

解压tar.gz压缩包

tar -zxvf nexus-3.31.1-01-unix.tar.gz

启动nexus

/opt/nexus-3.31.1-01/bin/nexus start(后台启动)

run(前台启动)

status(查看nexus服务状态)

nexus启动需要安装jdk环境,请先安装jdk环境

配置完成之后就能在bin目录使用./nexus start进行启动了,启动完成后使用 http://192.168.1.241:8081/ 进行登陆,初始登陆密码在后台文件中,使用

less /opt/sonatype-work/nexus3/admin.password

后续登陆完成后这个文件就删除了.注意记住密码

1.创建并设置缓存代理仓库

设置仓库名称和远程仓库代理地址并勾选下面小图标如图:

拖到最后点击保存:

2.设置maven-public的访问顺序:

3.使用控台创建普通账号

先创建普通操作者拥有的角色权限

授予的权限:aliyun、other、releases、snapshots四个仓库的add、browse、edit、read权限还有nx-component-upload权限

配置完成后,点击最后的保存

4.创建用户:

输入账户id以及其他信息,然后授予刚才创建的角色:

点击保存即可完成.

5.使用刚才创建的账号登陆查看,如图:

other和releases拥有手动上传的权限.

阿里云下载的jar包会缓存在上面,如图:

阿里云maven仓库地址: https://developer.aliyun.com/mvn/guide

仓库名称 阿里云仓库地址 阿里云仓库地址(老版) 源地址
central https://maven.aliyun.com/repository/central https://maven.aliyun.com/nexus/content/repositories/central https://repo1.maven.org/maven2/
jcenter https://maven.aliyun.com/repository/public https://maven.aliyun.com/nexus/content/repositories/jcenter http://jcenter.bintray.com/
public https://maven.aliyun.com/repository/public https://maven.aliyun.com/nexus/content/groups/public central仓和jcenter仓的聚合仓
google https://maven.aliyun.com/repository/google https://maven.aliyun.com/nexus/content/repositories/google https://maven.google.com/
gradle-plugin https://maven.aliyun.com/repository/gradle-plugin https://maven.aliyun.com/nexus/content/repositories/gradle-plugin https://plugins.gradle.org/m2/
spring https://maven.aliyun.com/repository/spring https://maven.aliyun.com/nexus/content/repositories/spring http://repo.spring.io/libs-milestone/
spring-plugin https://maven.aliyun.com/repository/spring-plugin https://maven.aliyun.com/nexus/content/repositories/spring-plugin http://repo.spring.io/plugins-release/
grails-core https://maven.aliyun.com/repository/grails-core https://maven.aliyun.com/nexus/content/repositories/grails-core https://repo.grails.org/grails/core
apache snapshots https://maven.aliyun.com/repository/apache-snapshots https://maven.aliyun.com/nexus/content/repositories/apache-snapshots https://repository.apache.org/snapshots/

1.搭建参考博客:

https://www.hangge.com/blog/cache/detail_2844.html# –私服介绍说明

https://www.cnblogs.com/wuzhenzhao/p/13307444.html –私服介绍说明

https://juejin.cn/post/6954983227241005093 –私服介绍说明

https://blog.csdn.net/doubiy/article/details/124267901 –主要参考博客

https://blog.csdn.net/u012854870/article/details/118524347 –创建仓库、角色、账号参考博客