Linux 使用nexus搭建maven私服

xiaoxiao2025-07-19  6

1.下载 nexus

wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz

 

2.创建目录 并 解压

mkdir /usr/nexus tar -zxvf nexus-2.11.2-03-bundle.tar.gz  -C /usr/nexus cd  /usr/nexus ls

3.编辑 Nexus 的 nexus.properties 文件,配置端口和 work 目录信息(保留默认)

cd nexus-2.11.2-03 ls

4.查看目录结构,jetty 运行

cd conf vi nexus.properties

5.编辑 nexus 脚本, 配置 RUN_AS_USER 参数

vi /usr/nexus/nexus-2.11.2-03/bin/nexus #RUN_AS_USER=

改为:

RUN_AS_USER=root

 

6.防火墙中打开 8081 端口

# vi /etc/sysconfig/iptables

添加:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT

保存后重启防火墙

# service iptables restart

 

7.启动 nexus

# /usr/nexus/nexus-2.11.2-03/bin/nexus start

 

8.浏览器中打开 http://localhost:8081/nexus/

9.maven私服使用教程:https://www.cnblogs.com/muzi1994/p/6026144.html

转载请注明原文地址: https://www.6miu.com/read-5033326.html

最新回复(0)