【Nexus】Linux上的Maven私服搭建

【1、安装Nexus】

需要Linux安装JDK运行,Nexus2版本JDK7,3版本JDK8

首先需要Nexus服务器文件

nexus-2.12.0-01-bundle.tar.gz

解压

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

把解压后的目录放在/usr/local/目录下面

cp -r nexus-2.12.0-01 /usr/local/

编辑bin目录下面的nexus启动文件

vim nexus

使用命令模式输入关键字符找到这个一段信息

/RUN_AS_USER

可以找到这个注释信息:

# NOTE - This will set the user which is used to run the Wrapper as well as
#  the JVM and is not useful in situations where a privileged resource or
#  port needs to be allocated prior to the user being changed.
#RUN_AS_USER=

然后在下面添加一段:【使用root作为用户运行】

RUN_AS_USER=root

并且保存退出...

开始运行nexus

./nexus start

然后运行就会提示不推荐使用root运行

****************************************
WARNING - NOT RECOMMENDED TO RUN AS ROOT
****************************************
Starting Nexus OSS...
Started Nexus OSS.

但是没关系,这是正常的

【2、使用Nexus】

访问Nexus:

http://你的ip地址:8081/nexus/

Nexus默认端口号8081,如果无法访问,检查防火墙是否开放了此端口

另外Nexus需要加载一些静态资源,需要等待一会儿

需要登陆账号:

username : admin
password : admin123

原文地址:https://www.cnblogs.com/mindzone/p/13353682.html