Linux系统 安装maven私有库教程详解

linux部署安装maven私有库

官网下载地址: http://pan.baidu.com/s/1dFJv5wl

本地下载地址:https://download.csdn.net/download/qq_36961226/13067106

在/usr/etc 目录下创建   mkdir nexus 文件夹

将安装包上传至linux系统 上传至nexus文件夹内

解压安装包

[[email protected] nexus]# tar -zxvf nexus-2.14.8-01-bundle.tar.gz

会解压出2个文件夹

nexus-2.14.2-01(nexus服务,启动也是这个)

sonatype-work(私有库目录)

进入到   nexus-2.14.8-01/conf/  目录下  编辑 nexus.properties 文件

[[email protected] nexus]# cd nexus-2.14.8-01/conf/

[[email protected] conf]# vim nexus.properties

application-port=8081(启动后访问的端口号,可以自行修改)

application-host=0.0.0.0(访问限制,0.0.0.0表示任何地址都可以访问)

我们保持默认不变,继续。。。

进入到   nexus-2.14.8-01/bin 目录下    编辑 nexus 文件  

[[email protected] bin]# vim nexus

默认是下面这一条:

# RUN_AS_USER=

修改成:

RUN_AS_USER=root

linux防火墙打开8081端口:

 vi /etc/sysconfig/iptables

重启防火墙:

 service iptables restart

启动nexus

nexus-2.14.8-01/bin/nexus start

访问Nexus

访问地址:http://192.168.226.130:8081/nexus  注意ip地址是linux系统ip地址