nexus 搭建maven私服

1. nexus 下载地址

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

2. 将 安装包上传到 服务器 并解压

tar -zxvf nexus-2.14.4-03-bundle.tar.gz

3. 拷贝解压后的安装包到 /user/local/nexus

mv ./nexus-2.14.4-03 /user/local/nexus

4. 编辑文件 运行用户为root

cd /user/local/nexus/bin

vim nexus

RUN_AS_USER=root

5. 运行

./nexus start

6. 查看是否运行

netstat -anp | grep 8081  # nexus 默认监听的端口为8081,可以在 conf目录下的nexus.profile文件中修改

(http://ip:8081/nexus)访问私服的管理界面,帐号密码默认是  admin  admin123

7. 配置setting.xml 链接maven私服

 

<server>
<id>nexus-releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>nexus-snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>

 

 

<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>Nexus Release Repository</name>
<url>http://www.skywalks.cn:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>http://www.skywalks.cn:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>

 

之后就能试验下了,下载或上传(deploy)个jar包试试

posted @ 2017-07-11 15:50  try_do_it  阅读(253)  评论(0编辑  收藏  举报