步骤
我这里使用的是最新版。
wget https://sonatype-download.global.ssl.fastly.net/repository/downloads-prod-group/3/nexus-3.80.0-06-linux-x86_64.tar.gz
tar xvf nexus-3.80.0-06-linux-x86_64.tar.gz
mv nexus-3.80.0-06 nexus
adduser nexus
chown -R nexus:nexus nexus
chown -R nexus:nexus sonatype-work
cd nexus/bin/
vim nexus.rc
run_as_user="nexus"
nohup ./nexus run &>/dev/null &
登录dashboard,访问 IP:8081
,登录,admin密码位于:sonatype-work/nexus3/admin.password
,修改密码后该文件会被删除。
修改配置
登录成功后,点击设置,System,Capabilities,Outreach: Management。
修改为Disable。否则dashboard页面就会去连接 links.sonatype.com:443,rhc.sonatype.com:443
使用阿里云仓库代理
点击设置,Repository,Repositories,maven-central,修改proxy中的remote storage地址为https://maven.aliyun.com/repository/public
:
点击保存。