设为首页 收藏本站
查看: 842|回复: 0

[经验分享] CentOS安装nexus

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2016-4-20 09:10:56 | 显示全部楼层 |阅读模式
1, Nexus 下载
Nexus 官方下载, 最新版下载: nexus-2.4.0-09-bundle.tar.gz
Nexus war下载: nexus-2.4.0-09.war

nexus有两种安装实现方式,一种是war包的方式,将它直接放在例如tomcat下就可以启用的,还有一种源码的方式,做为一个运维还是喜欢源码方式的说哈。开始吧。。。


2, Nexus 安装
解压tar.gz文件:
#cd /home/tools
#tar zxvf nexus-2.4.0-09-bundle.tar.gz
移动目录
#mv nexus-2.4.0-09 /usr/local/nexus

3, Nexus 启动
nexus启动是在bin目录下,首先看一下启动/关闭/重启等命令, 输入命令:
#cd /usr/local/nexus/bin
#./nexus
出现如下选项:


[iyunv@test01 bin]# ./nexus
Usage: ./nexus { console | start | stop | restart | status | dump }

启动nexus:
#./nexus  start


关闭nexus:
#./nexus  stop


4, Nexus 验证
启动nexus后,在本机浏览器输入地址: http://localhost:8081/nexus
20130527004154533.jpg

出现上述页面,说明配置nexus成功!

点击右上角“Log in”, 输入用户名和密码(默认用户名:admin      密码: admin123)登录


5.设置
1.点击左侧 Repositories将所有Type 是 proxy 的 configuration配置选项中的 Download Remote Index 配置改为 True
  如果需要代理将配置最下面的Override Http Proxy Setting 勾上并填写代理服务器地址和端口,最后保存设置
2.然后在列表中分别右键点击 ReIndex
3、添加自己的jar到nexus
  选中 3rd party , Artifact Upload 标签
  GAV Definition 选择GAV Parameters
  填写 Group Artifact version packaging
  然后选择jar包 上传提交即可。




nexus私服linux搭建问题
2、这时候提示:
****************************************
WARNING – NOT RECOMMENDED TO RUN AS ROOT
****************************************
If you insist running as root, then set the environment variable RUN_AS_USER=root before running this script.

大概意思就是要在环境配置export RUN_AS_USER=root,临时配置
在命令行下输入:
export RUN_AS_USER=root
然后执行,就不会再提示了
./nexus start

3、也可以在系统里面永久配置
vi /etc/profile  加入export RUN_AS_USER=root

三、启动之后查看日志(日志路径:nexus/logs)
报:
wrapper  | Reloading Wrapper configuration...
wrapper  | Launching a JVM...
wrapper  | JVM exited while loading the application.
jvm 5    | Exception in thread "main" java.lang.UnsupportedClassVersionError: org/sonatype/nexus/bootstrap/jsw/JswLauncher : Unsupported major.minor version 51.0
jvm 5    |     at java.lang.ClassLoader.defineClass1(Native Method)
jvm 5    |     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
jvm 5    |     at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
jvm 5    |     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
jvm 5    |     at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
jvm 5    |     at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
jvm 5    |     at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
jvm 5    |     at java.security.AccessController.doPrivileged(Native Method)
jvm 5    |     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
jvm 5    |     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
jvm 5    |     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
jvm 5    |     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
jvm 5    | Could not find the main class: org.sonatype.nexus.bootstrap.jsw.JswLauncher.  Program will exit.
wrapper  | There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.
wrapper  |   There may be a configuration problem: please check the logs.
wrapper  | <-- Wrapper Stopped

网上解释是要JAVA7才行。


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-206307-1-1.html 上篇帖子: ubuntu 12.4 close the touchpad sudo rmmod psmouse 下篇帖子: svn: No worthy mechs found nexus
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表