Nexus部署

环境准备

部署jdk8
yum -y install openjdk-8-jdk 或 自定义部署

部署maven
yum -y install maven 或 自定义部署

下载安装

官网地址:https://help.sonatype.com/repomanager3/product-information/download

解压安装包
tar zxf nexux-3.14.0-04-unix.tar.gz -C /opt/nexus

解压完成后,会在nexus-3.40.1文件夹生成两个目录:
nexus-3.40.1-01和sonatype-work,
通过虚拟机配置文件:/home/xindaqi/software/install/nexus-3.40.1/nexus-3.40.1-01/bin/nexus.vmoptions
可知,sonatype-work是nexus的运行时数据(如日志,pid等)存储目录。

修改Nexus配置
vim etc/nexus-default.properties
application-port=18081   # 运行端口
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

nexus.hazelcast.discovery.isEnabled=true

启停操作

# 后台启动(守护进程)nexus
cd nexus-3.14.0-04/bin/
./nexus start

# 前台启动
./nexus run

# 停止服务
./nexus stop

用户名和密码
成功访问web界面后,会在路径sonatype-work/nexus3/admin.password
生成admin初始密码 进行登陆初始化 登陆成功