千家信息网

centos7 安装sonatype nexus3.19

发表于:2024-11-21 作者:千家信息网编辑
千家信息网最后更新 2024年11月21日,1.下载 nexus-3.19.1-01-unix.tar.gz2.下载 jdk-8u161-linux-x64.tar.gz备注:nexus3.19必须运行在jdk1.8以上3.解压:
千家信息网最后更新 2024年11月21日centos7 安装sonatype nexus3.19
1.下载    nexus-3.19.1-01-unix.tar.gz2.下载    jdk-8u161-linux-x64.tar.gz备注:nexus3.19必须运行在jdk1.8以上3.解压: #tar  -zvxf    nexus-3.19.1-01-unix.tar.gz4.默认配置文件:../nexus-3.19.1-01/etc/nexus-default.properties[cqs@centos7 etc]$ cat nexus-default.properties ## DO NOT EDIT - CUSTOMIZATIONS BELONG IN $data-dir/etc/nexus.properties# Jetty sectionapplication-port=8081application-host=0.0.0.0nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xmlnexus-context-path=/# Nexus sectionnexus-edition=nexus-pro-editionnexus-features=\ nexus-pro-featurenexus.hazelcast.discovery.isEnabled=true[cqs@centos7 etc]$ pwd/home/cqs/data/nexus/nexus-3.19.1-01/etc备注:默认的java环境是1.7,nexus3 需要使用jdk1.8 ,下载jdk1.8 的tar.ga 包. 放入到  /home/java8 目录下,解压,不用再重新配置环境变量,修改nexus3 bin下的nexus 文件  vi    /home/nexus/nexus-3.0.1-01/bin/nexus#nexus指定jdk8INSTALL4J_JAVA_HOME_OVERRIDE=/data/jdk1.8.0_91否则会提示:Please define INSTALL4J_JAVA_HOME to point to a suitable JVM

4.运行nexus

        [cqs@centos7 bin]$ ./nexus start        Starting nexus        [cqs@centos7 bin]$ ps -ef |grep nexus        cqs       11069      1 99 19:20 pts/0    00:00:45 /home/cqs/data/jdk/jdk1.8.0_161/bin/java -server -Dinstall4j.jvmDir=/home/cqs/data/jdk/jdk1.8.0_161 -Dexe4j.moduleName=/home/cqs/data/nexus/nexus-3.19.1-01/bin/nexus -XX:+UnlockDiagnosticVMOptions -Dinstall4j.launcherId=245 -Dinstall4j.swt=false -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -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 -Djava.endorsed.dirs=lib/endorsed -Di4j.vpt=true -classpath /home/cqs/data/nexus/nexus-3.19.1-01/.install4j/i4jruntime.jar:/home/cqs/data/nexus/nexus-3.19.1-01/lib/boot/nexus-main.jar:/home/cqs/data/nexus/nexus-3.19.1-01/lib/boot/activation-1.1.1.jar:/home/cqs/data/nexus/nexus-3.19.1-01/lib/boot/jaxb-api-2.2.7.jar:/home/cqs/data/nexus/nexus-3.19.1-01/lib/boot/jaxb-core-2.2.7.jar:/home/cqs/data/nexus/nexus-3.19.1-01/lib/boot/jaxb-impl-2.2.7.jar:/home/cqs/data/nexusnexus-3.19.1-01/lib/boot/org.apache.karaf.main-4.2.6.jar:/home/cqs/data/nexus/nexus-3.19.1-01/lib/boot/org.osgi.core-6.0.0.jar:/home/cqs/data/nexus/nexus-3.19.1-01/lib/boot/org.apache.karaf.specs.activator-4.2.6.jar:/home/cqs/data/nexus/nexus-3.19.1-01/lib/boot/org.apache.karaf.diagnostic.boot-4.2.6.jar:/home/cqs/data/nexus/nexus-3.19.1-01/lib/boot/org.apache.karaf.jaas.boot-4.2.6.jar com.install4j.runtime.launcher.UnixLauncher start 9d17dc87 0 0 org.sonatype.nexus.karaf.NexusMain

5.访问登入:http://localhost:8081

用户名:admin密码:通过../nexus/sonatype-work/nexus3查看密码,登入后修改admin密码

[cqs@centos7 sonatype-work]$ cd nexus3/
[cqs@centos7 nexus3]$ ls
admin.password cache elasticsearch generated-bundles karaf.pid lock orient restore-from-backup
blobs db etc instances keystores log port tmp
[cqs@centos7 nexus3]$ cat admin.password
ff3ca76a-2956-4153-8a48-70d760a73625

0