“Nexus2:安装、配置”的版本间差异

来自Wikioe
跳到导航 跳到搜索
第7行: 第7行:


== 安装 ==
== 安装 ==
下载地址:
1、最新版:[https://help.sonatype.com/repomanager2/download https://help.sonatype.com/repomanager2/download]
2、历史版本:[https://help.sonatype.com/repomanager2/download/download-archives---repository-manager-oss https://help.sonatype.com/repomanager2/download/download-archives---repository-manager-oss]
'''安装:'''
'''安装:'''
# 下载:
# 下载压缩包(如:“nexus-2.14.20-02-bundle.zip”);
#: [https://www.sonatype.com/thanks/repo-oss?submissionGuid=35aa362b-077c-455b-b7b1-c77b3244c94e https://www.sonatype.com/thanks/repo-oss?submissionGuid=35aa362b-077c-455b-b7b1-c77b3244c94e],获取压缩包(如:“nexus-3.36.0-01-win64.zip”);
#* 或[https://www.sonatype.com/download-oss-sonatype https://www.sonatype.com/download-oss-sonatype]
# 解压:
# 解压:
#: 到目录(如:“D:\Program Files\Nexus”),包含两个文件夹“nexus-3.36.0-01”、“sonatype-work”;
#: 到目录(如:“D:\Program Files\Nexus2”),包含两个文件夹“nexus-2.14.20-02”、“sonatype-work”;
# 注册服务:
# 配置:
#: 端口配置:“./nexus-2.14.20-02/conf/nexus.properties”;(默认 8081)
# 启动:
#: <syntaxhighlight lang="bash" highlight="">
#: <syntaxhighlight lang="bash" highlight="">
# 在“./nexus-3.36.0-01/bin”目录
在“./nexus-2.14.20-02/bin”目录:
nexus.exe /install Nexus3
 
# 启动 nexus,并在 cmd 中展示启动过程
nexus console
 
# 注册服务(好像不能指定服务名称?)
nexus install
# 卸载服务
nexus uninstall
 
# 启动
nexus start
# 停止
nexus stop
# 重启
nexus restart
</syntaxhighlight>
</syntaxhighlight>
#* 如果提示“'''Could not open SCManager'''”,则需要:以管理员身份运行 cmd,然后重新执行。
#* 如果提示“'''Could not open SCManager'''”,则需要:以管理员身份运行 cmd,然后重新执行。
#: [[File:Nexus:注册服务.png|500px]]
#* 或者:
#*: <syntaxhighlight lang="bash" highlight="">
在“./nexus-2.14.13-01/bin/jsw/<对应系统版本的文件夹>”


'''配置:'''
# 启动 nexus,并在 cmd 中展示启动过程
# 端口配置:“./nexus-2.14.20-02/conf/nexus.properties”;(默认 8081)
console-nexus.bat
#(其他配置:“./nexus-2.14.20-02/bin/jsw/conf/wrapper.conf”);???


'''启动:'''(两种方法)
# 注册服务(好像不能指定服务名称?)
:* 启动需要几分钟的时间;
install-nexus.bat
# 通过服务:启动注册的服务即可;
# 卸载服务
# 通过命令行:
uninstall-nexus.bat
#: <syntaxhighlight lang="bash" highlight="">
 
# 在“./nexus-2.14.20-02/bin”目录
# 启动
nexus.exe /run
start-nexus.bat
# 停止
stops-nexus.bat
</syntaxhighlight>
</syntaxhighlight>
#: [[File:Nexus:cmd启动.png|500px]]
 


'''访问:'''
'''访问:'''

2021年12月20日 (一) 04:01的版本


关于

【以下使用 Nexus OSS 3.x 版本】


安装

下载地址:
1、最新版:https://help.sonatype.com/repomanager2/download
2、历史版本:https://help.sonatype.com/repomanager2/download/download-archives---repository-manager-oss

安装:

  1. 下载压缩包(如:“nexus-2.14.20-02-bundle.zip”);
  2. 解压:
    到目录(如:“D:\Program Files\Nexus2”),包含两个文件夹“nexus-2.14.20-02”、“sonatype-work”;
  3. 配置:
    端口配置:“./nexus-2.14.20-02/conf/nexus.properties”;(默认 8081)
  4. 启动:
    在“./nexus-2.14.20-02/bin”目录:
    
    # 启动 nexus,并在 cmd 中展示启动过程
    nexus console
    
    # 注册服务(好像不能指定服务名称?)
    nexus install
    # 卸载服务
    nexus uninstall
    
    # 启动
    nexus start
    # 停止
    nexus stop
    # 重启
    nexus restart
    
    • 如果提示“Could not open SCManager”,则需要:以管理员身份运行 cmd,然后重新执行。
    • 或者:
      在“./nexus-2.14.13-01/bin/jsw/<对应系统版本的文件夹>”
      
      # 启动 nexus,并在 cmd 中展示启动过程
      console-nexus.bat
      
      # 注册服务(好像不能指定服务名称?)
      install-nexus.bat
      # 卸载服务
      uninstall-nexus.bat
      
      # 启动
      start-nexus.bat
      # 停止
      stops-nexus.bat
      


访问:

http://localhost:8090/
  • 默认的用户名/密码:admin/admin123

服务管理

Nexus 2 通过以下命令管理其服务:

# 安装
nexus.exe /install <service-name>
# 卸载
nexus.exe /uninstall <service-name>

# 启动
nexus.exe /start <service-name>
# 停止
nexus.exe /stop <service-name>

# 状态
nexus.exe /status <service-name>
  • 命令均在安装目录(“./nexus-2.14.20-02/bin”)执行。

更新

升级:Nexus 2.x 到 3.x

参考:

  1. Upgrading from Nexus Repository Manager 2
  2. nexus2升级到nexus3