9、Nexus搭建
#1、下载 nexus-latest-bundle.tar.gz 压缩包放到/home/download 目录下
#2、解压nexus压缩包(使用普通用户,不建议root)
[root@localhost opt]# su rogue
[rogue@localhost ~]# tar -zxvf /home/download/nexus-latest-bundle.tar.gz -C /opt
#3、启动nexus
进入nexus的bin目录下启动
[rogue@localhost ~]$ cd /opt/nexus-2.11.2-03/bin/
[rogue@localhost bin]$ ./nexus start
Starting Nexus OSS...
Started Nexus OSS.
#4、访问nexus的web控制台
访问地址:http://192.168.1.110:8081 ,然后登录,默认账号:admin 密码:admin123下
最主要的几个仓库
修改Apache Snapshots和Central
这是nexus就会到远程仓库下载相应的jar包。
nexus相关属性配置文件是conf目录下的nexus.properties,如下:
# Sonatype Nexus
# ==============
# This is the most basic configuration of Nexus.
# Jetty section
application-port=8081 //可以在这里修改访问端口
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/nexus
# Nexus section
nexus-work=${bundleBasedir}/../sonatype-work/nexus
runtime=${bundleBasedir}/nexus/WEB-INF