简单的搭建安装nexus

说说我这个怎么安装的吧,因为现在着急使用,我就从一个已经上线的nexus环境中,直接远程拷贝过来。把日志删了,临时环境删了差不多就能使用了。只是现在在启动过程中有以下两个报错:

1.首次启动报错

wrapper  | --> Wrapper Started as Daemon
wrapper  | Launching a JVM...
wrapper  | Unable to start JVM: No such file or directory (2)
wrapper  | JVM exited while loading the application.
wrapper  | Reloading Wrapper configuration...

这是主要是两个原因,意识没有JDK环境,需要安装以下JDK。另外需要将nexus的目录改成777权限,(我现在还没有好好研究这点,为什么需要这么高的权限,后期抽出时间要把这个问题给解决了。)

安装好JDK后,使用java -version查看一下版本信息,然后指定一下java的位置(which java可以查看)。

需要修改这个配置文件:nexus-XXXX\bin\jsw\conf\wrapper.conf,然后修改这一字段:

wrapper.java.command=java,改为wrapper.java.command=改成你的java命令的路径

2.再次启动报错:

wrapper  | Launching a JVM...
jvm 1    | Exception in thread "main" java.lang.UnsupportedClassVersionError: org/sonatype/nexus/bootstrap/jsw/JswLauncher : Unsupported major.minor version 51.0
jvm 1    | 	at java.lang.ClassLoader.defineClass1(Native Method)
jvm 1    | 	at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
jvm 1    | 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
jvm 1    | 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
jvm 1    | 	at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
jvm 1    | 	at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
jvm 1    | 	at java.security.AccessController.doPrivileged(Native Method)
jvm 1    | 	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
jvm 1    | 	at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
jvm 1    | 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
jvm 1    | 	at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
jvm 1    | Could not find the main class: org.sonatype.nexus.bootstrap.jsw.JswLauncher. Program will exit.
wrapper  | JVM exited while loading the application.
wrapper  | Reloading Wrapper configuration...


这是因为我使用yum源安装的jdk版本太老不支持,于是去官网下载1.8的jdk,下载jdk-8u65-linux-i586.rpm(根据你的服务器平台下载),使用rpm安装,我的没有提示其他的依赖关系,如果存在再手动解决。

使用which查看一下java位置,会发现其实和yum安装是一样的。然后重启nexus,再次从浏览器中访问即可。


注意:nexus的默认端口号是8081,也可以修改,配置文件:

\nexus2.11.1-01\nexus-2.11.1-01\conf\nexus.properties

修改:找到application-port=8081这一句,直接修改端口为8181(任意你想要且没有使用的,且大于1024的)。


浏览器访问:http://IP:8081/nexus即可



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值