linux 环境搭建 nexus 私服

1、前言

maven 使用咱们就不多说。那为什么要搭建私服呢?
1、假如我们不用我们的私服,我们项目依赖的jar更新时候都要去中央仓库里获取,慢!慢!一个团队都重复这样的工作何谈效率?
2、另外一点就是、方便我们自己团队的插件、组件管理。比如A小组使用B小组的组件、B小组会不断更新B开发的组件,A只管更新就ok,利于协作开发。

2、 nexus 私服搭建

2.1 nexus下载
http://www.sonatype.org/nexus/archived/#step2top
我使用的是Nexus 2.12.0-01版本的;

2.2 上传安装包
用xshell工具、连接到linux服务器
使用

  rz

2.3 解压

tar -zxvf nexus-2.12.0-01-bundle.tar.gz

[root@localhost nexus# ls

nexus-2.12.0-01  nexus-2.12.0-01-bundle.tar.gz  sonatype-work

nexus-2.12.0-01 是 nexus 核心文件; sonatype-work是用来存放jar包

2.4 修改启动用户

[root@localhost nexus]# cd nexus-2.12.0-01 
[root@localhost nexus-2.12.0-01]# cd bin
[root@localhost bin]# ls
jsw  nexus  nexus.bat
[root@localhost bin]# cp nexus nexus.bak
[root@localhost bin]# vi nexus

将RUN_AS_USER修改为root,不推荐使用root。

保存之后,再次启动nexus,运行命令

[root@localhost bin]# ./nexus start 
[root@localhost bin]# ./nexus console
****************************************
WARNING - NOT RECOMMENDED TO RUN AS ROOT
****************************************
Running Nexus OSS...
Nexus OSS is already running.

Nexus OSS is already running. 表示nexus运行成功;
默认端口8081
默认用户admin 密码 admin123

这里写图片描述

最后:

设置软连接

ls -s /usr/local/nexus/nexus-2.12.0-01/bin/nexus /etc/init.d/nexus

这里写图片描述

设置开机启动

chkconfig --add nexus

查看开机

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值