一、 前期准备
1、window环境(演示为win10)
2、安装jdk环境(1.8版本以上)
3、nexus3最新安装包 下载并解压
二、环境配置
1、jdk环境检查
java -version ##若无法识别 则环境变量需要设置
2、修改配置文件
##坐标
解压路径\nexus-3.7.1-02-win64\nexus-3.7.1-02\etc\nexus-default.properties
##配置参数
## DO NOT EDIT - CUSTOMIZATIONS BELONG IN $data-dir/etc/nexus.properties
##
# Jetty section
application-port=8081 ##端口号
application-host=0.0.0.0 ##ip 需要改为实际ip才可远程访问 否则为本地使用
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
三 、部署与验证
1、用管理员身份启动cmd
2、切换到软件工作目录
cd /d F:\mysoft\nexus-3.7.1-02-win64\nexus-3.7.1-02\bin ##解压目录因人而异
3、启动(基于2步骤)
################### 前台运行nexus ###########################
nexus.exe /run ##控制台启动
################### 后台运行nexus ###########################
nexus.exe /install ##安装为windows服务
nexus.exe /start ##启动nexus服务
nexus.exe /run ##运行
备注:第一次使用前台运行 则切换后台出现如上 不能删除的提示 直接双击该目录下nexus.exe运行nexus服务
修改配置文件,均为第一次为主,运行后配置文件被转移保存到
F:\mysoft\nexus-3.7.1-02-win64\sonatype-work\nexus3\etc\nexus.properties
可以以此文件核对启动配置
若修改配置:这需要缓存文档重新配置
################### 其他nexus命令 ###########################
nexus.exe /uninstall ##卸载服务 默认停止服务
nexus.exe /stop ##停止服务
4、验证nexus启动
http://ip:port/ ##配置文件默认 为/ 做根路径
5、若后台启动服务则,查看服务状态
找到nexus,右键属性可以对服务进行查看
祝你成功