一、nexus2的部署

下载nexus-2.14.2-01-bundle.tar.gz并解压至nexus-2.14.2-01,
在这里插入图片描述
启动nexus进程,注意切换到nexus用户。

sudo -u nexus sh bin/nexus start

在这里插入图片描述

查看进程

ps -ef | grep nexus
在这里插入图片描述
nexus默认端口是8081,但是刚启动的时候,程序并未完成端口监听。

需要你耐心等待一分钟左右,直到8081在下面的窗口里出现后。

在这里插入图片描述

二、访问nexus

1、访问地址

http://{ip}:8081/nexus
在这里插入图片描述
在这里插入图片描述
至于为什么需要加上/nexus,见配置文件conf/nexus.properties

# Jetty section
# 访问端口
application-port=8081
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus

# context-path,在访问nexus的时候,需要加/nexus前缀
nexus-webapp-context-path=/nexus

在这里插入图片描述

2、nexus工作目录

nexus工作目录sonatype-work 和 nexus-2.14.2-01在同一级路径。
在这里插入图片描述
现在回到本文的目标,需要找回admin用户的密码,它是在sonatype-work/nexus/conf目录下。
见文件security.xml。

找到对应的用户ID

    <user>
      <id>deployment</id>
      <firstName>Deployment</firstName>
      <lastName>User</lastName>
      <password>b2a0e378437817cebdf753d7dff3dd75483af9e0</password>
      <status>active</status>
      <email>changeme1@yourcompany.com</email>
    </user>

这里的password是md5后的密文,所以你需找一个在线解密md5的网站,破解它。

登录后,password值的格式将发生变化,如下:

在这里插入图片描述

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部