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

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


'''配置:'''
'''配置:'''
# 端口配置:“./nexus-3.36.0-01/etc/nexus-default.properties”;(默认 8081)
# 端口配置:“./nexus-2.14.20-02/conf/nexus.properties”;(默认 8081)
#(其他配置:“./nexus-3.36.0-01/bin/nexus.vmoptions”);
#(其他配置:“./nexus-2.14.20-02/bin/jsw/conf/wrapper.conf”);???


'''启动:'''(两种方法)
'''启动:'''(两种方法)
第30行: 第30行:
# 通过命令行:
# 通过命令行:
#: <syntaxhighlight lang="bash" highlight="">
#: <syntaxhighlight lang="bash" highlight="">
# 在“./nexus-3.36.0-01/bin”目录
# 在“./nexus-2.14.20-02/bin”目录
nexus.exe /run
nexus.exe /run
</syntaxhighlight>
</syntaxhighlight>
第36行: 第36行:


'''访问:'''
'''访问:'''
: http://localhost:8080/
: http://localhost:8090/
* <s>默认的用户名/密码:'''admin/admin123'''</s>
* 默认的用户名/密码:'''admin/admin123'''
* 默认生成的密码,位于“./'''sonatype-work/nexus3/admin.password'''”文件中。<!-- 已修改为:@eijux -->
 
== 服务管理 ==
Nexus 2 通过以下命令管理其服务:
: <syntaxhighlight lang="bash" highlight="">
# 安装
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>
</syntaxhighlight>
* 命令均在安装目录(“./nexus-2.14.20-02/bin”)执行。


== 更新 ==
== 更新 ==

2021年12月20日 (一) 03:28的版本


关于

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


安装

安装:

  1. 下载:
    https://www.sonatype.com/thanks/repo-oss?submissionGuid=35aa362b-077c-455b-b7b1-c77b3244c94e,获取压缩包(如:“nexus-3.36.0-01-win64.zip”);
  2. 解压:
    到目录(如:“D:\Program Files\Nexus”),包含两个文件夹“nexus-3.36.0-01”、“sonatype-work”;
  3. 注册服务:
    # 在“./nexus-3.36.0-01/bin”目录
    nexus.exe /install Nexus3
    
    • 如果提示“Could not open SCManager”,则需要:以管理员身份运行 cmd,然后重新执行。
    Nexus:注册服务.png

配置:

  1. 端口配置:“./nexus-2.14.20-02/conf/nexus.properties”;(默认 8081)
  2. (其他配置:“./nexus-2.14.20-02/bin/jsw/conf/wrapper.conf”);???

启动:(两种方法)

  • 启动需要几分钟的时间;
  1. 通过服务:启动注册的服务即可;
  2. 通过命令行:
    # 在“./nexus-2.14.20-02/bin”目录
    nexus.exe /run
    
    Nexus:cmd启动.png

访问:

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”)执行。

更新

参考:
1、 https://support.sonatype.com/hc/en-us/articles/115000350007-Upgrading-Nexus-Repository-Manager-3
2、 https://help.sonatype.com/repomanager3/installation-and-upgrades/upgrading-a-standalone-instance

更新 Nexus 3,只需要替换其“安装目录”即可:

  1. 从官方下载的最新安装程序包。
  2. 准备安装:
    1. 解压新的程序包;
    2. 比较新的程序包与现有安装包的“nexus-3.x/bin/nexus.vmoptions”文件:
      • 如果更改了数据目录的默认位置,修改“-Dkaraf.data=../sonatype-work/nexus3”;
      • 如果更改了临时目录的默认位置,修改“-Djava.io.tmpdir=../sonatype-work/nexus3/tmp”;
      • 如果更改了 Java 虚拟机最大堆内存,修改“-Xmx1200M”;
      • 如果已启用 Jetty HTTPS 访问权限,确保“etc/jetty/jetty-https.xml”的 SSL 密钥库位置仍然可用于新安装;
      • 如果手动调整了“./etc”下任何其他安装文件,需要手动执行旧文件和新文件之间的差异,并将更改应用于新版本(如果适用)。
  3. 执行安装:
    1. 对现有数据目录和任何自定义 blobstore 位置进行最新备份;
    2. 停止并卸载已有 nexus 服务;
      • (通过“./bin”下脚本,或系统服务)
    3. 安装并启动新的 nexus 服务;
      • (通过“./bin”下脚本,或系统服务)
    4. 检查日志文件中是否存在任何可能的问题,并登录服务器以确认一切正常。
      • (默认日志路径在 sonatype-work/nexus3/log 下)

升级到 3.x