• 欢迎访问显哥博客,本网站纯属学习技术,绝无商业用途,欢迎小伙伴们共同学习!研究技术!QQ:52249909 加我QQ
  • 世界75亿人,这么小的概率,能认识你,是我一生的幸运,不妨加个QQ接触一下:52249909 加我QQ

Maven私有仓库Nexus3的部署和使用【显哥出品,必为精品】

Nexus lixian 3年前 (2021-07-13) 20927次浏览 0个评论 扫描二维码
文章目录[隐藏]

一、环境准备

1.java环境
2. nexus软件包:nexus-3.30.1-01-unix.tar.gz

二、部署nexus

1.上传软件包并解压

mkdir /usr/local
tar xf nexus-3.30.1-01-unix.tar.gz -C /usr/local/nexus/

2.目录介绍

如果修改数据存储路径、端口、IP、访问根目录、内存大小,文件目录:bin\nexus.vmoptions

-Xms2703m
-Xmx2703m
-XX:MaxDirectMemorySize=2703m
-XX:+UnlockDiagnosticVMOptions
-XX:+LogVMOutput
-XX:LogFile=../sonatype-work/nexus3/log/jvm.log
-XX:-OmitStackTraceInFastThrow
-Djava.net.preferIPv4Stack=true
-Dkaraf.home=.
-Dkaraf.base=.
-Dkaraf.etc=etc/karaf
-Djava.util.logging.config.file=etc/karaf/java.util.logging.properties
-Dkaraf.data=../sonatype-work/nexus3      #工作目录
-Dkaraf.log=../sonatype-work/nexus3/log 
-Djava.io.tmpdir=../sonatype-work/nexus3/tmp
-Dkaraf.startLocalConsole=false
-Djdk.tls.ephemeralDHKeySize=2048

如果修改IP、端口、访问根目录,文件目录:etc/nexus-default.properties

application-port=8081
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

3.启动

cd /usr/local/nexus/nexus-3.30.1-01/bin/
./nexus start
WARNING: ************************************************************
WARNING: Detected execution as "root" user.  This is NOT recommended!
WARNING: ************************************************************
Starting nexus

#这个报错是只是建议你不要用root用户,可以去掉这个报错
#即编辑vim nexus,里面有一句:run_as_root=true ,原来是此处直接给拦死了,故只要改成run_as_root=false 就可以了,或者直接执行下面个命令也行
sed -ie '/^run_as_root/ s#true#false#g' nexus

#重启nexus
./nexus restart

4.登录

浏览器访问http://ip:8081/
Maven私有仓库Nexus3的部署和使用【显哥出品,必为精品】

根据提示查看密码,默认用户是admin

cat /usr/local/nexus/sonatype-work/nexus3/admin.password

Maven私有仓库Nexus3的部署和使用【显哥出品,必为精品】


本站博主 , 版权所有丨如未注明 , 均为原创
转载请注明原文链接:Maven私有仓库Nexus3的部署和使用【显哥出品,必为精品】
喜欢 (0)

您必须 登录 才能发表评论!