window系统:
用管理员账户打开CMD界面
执行命令-添加为服务:nexus.exe /install nexus
执行命令-启动:nexus.exe /start
执行命令-停止:nexus.exe /stop
访问地址:http://localhost:8081/
用户名 admin 密码需要去搜索 admin.password 文件中查看 有一个uuid就是密码
linux系统:
./nexus start 启动命令 默认是后台启动
./nexus run 是当前界面启动 会打印日志 上面start方式则日志是在后台
常见问题:如果正常启动但是界面访问不了,可能是防火墙没有关
配置:
<!-- 配置nexus用户名密码 -->
<servers>
<server>
<id>nexus</id>
<username>admin</username>
<password>123456</password>
</server>
</servers>
<!-- repository中的ID需要对应server中的ID -->
<profiles>
<profile>
<id>dev</id>
<repositories>
<repository>
<!--仓库id,repositories可以配置多个仓库,保证id不重复-->
<id>nexus</id>
<!--仓库地址,即nexus仓库组的地址-->
<url>http://localhost:8081/repository/3rd_test/</url>
<!--是否下载releases构件-->
<releases>
<enabled>true</enabled>
</releases>
<!--是否下载snapshots构件-->
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<!-- 激活文件-->
<activeProfiles>
<activeProfile>dev</activeProfile>
</activeProfiles>
如果需要批量导入jar包参考下面链接添加链接描述:https://blog.youkuaiyun.com/qq_36318234/article/details/103525048