天天看点

Windows下Sonatype Nexus搭建及配置

Nexus安装

Nexus是Maven仓库管理器,也叫Maven的私服。Nexus是一个强大的Maven仓库管理器,它极大地简化了自己内部仓库的维护和外部仓库的访问。利用Nexus你可以只在一个地方就能够完全控制访问和部署在你所维护仓库中的每个Artifact。Nexus是一套“开箱即用”的系统不需要数据库,它使用文件系统加Lucene来组织数据。

下载地址: https://www.sonatype.com/download-oss-sonatype

使用(例)nexus-3.16.0-01-win64.zip 文件解压至安装路径

目录结构

  • nexus-3.16.0-01:nexus服务器相关的文件
  • sonatype-work:nexus工作数据文件,存放生成的配置文件、日志文件、仓库文件等

程序启动:

以命令执行:nexus.exe /run

显示 Started Sonatype Nexus OSS 启动成功

程序访问:

启动成功后,默认访问地址:https://127.0.0.1:8081

初始账号密码:admin / admin123

注册为服务:

nexus.exe /install #安装

nexus.exe /start #开始

nexus.exe /stop #结束

nexus.exe /uninstall #卸载

端口配置

安装路径etc目录下nexus-default.properties文件

# Jetty section
application-port=8081#访问端口配置
application-host=0.0.0.0#监听配置(不用修改)
nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml
nexus-context-path=/

# Nexus section
nexus-edition=nexus-pro-edition
nexus-features=\
 nexus-pro-feature
           

继续阅读