下载
如果浏览器下载不了,可以用迅雷下载
https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-3.12.0-01-unix.tar.gz
安装目录
mkdir -p /data/nexus
cd /data/nexus
tar -zxvf nexus-3.12.0-01-unix.tar.gz
./bin/nexus start
ps -ef|grep nexus
进入启动相关配置文件:
cd /data/nexus/nexus-3.12.0-01/etc
cat nexus-default.properties
application-port=8081 #应用启动端口
nexus-context-path=/ #应用启动上下文
http://192.168.xxx.xxx:8081/
默认用户名密码:admin/admin123、登录进去自行修改管理员密码
maven-central:maven中央库,默认从https://repo1.maven.org/maven2/拉取jar
maven-releases:私库发行版jar
maven-snapshots:私库快照(调试版本)jar
maven-public:仓库分组,把上面三个仓库组合在一起对外提供服务,
Nexus仓库类型介绍
hosted(宿主仓库库) :存放本公司开发的jar包(正式版本、测试版本)
proxy(代理仓库):代理中央仓库、Apache下测试版本的jar包
group(组仓库):使用时连接组仓库,包含Hosted(宿主仓库)和Proxy(代理仓库)
添加阿里云proxy代理仓库地址:
http://maven.aliyun.com/nexus/content/groups/public
添加阿里云仓库到piblic
创建角色
创建用户
不允许匿名访问下载
把 Allow anonymous users to access the server 打勾去掉点击保存
最后附上启动和关闭命令
启动nexus:
./nexus start
关闭nexus:
./nexus stop
deploy上传替换jar maven-releases 修改为Allow redeploy