扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
1.下载 nexus-3.19.1-01-unix.tar.gz
2.下载 jdk-8u161-linux-x64.tar.gz
备注:nexus3.19必须运行在jdk1.8以上
3.解压: #tar -zvxf nexus-3.19.1-01-unix.tar.gz
4.默认配置文件:../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 section
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
[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指定jdk8
INSTALL4J_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
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流