如题,本篇我们介绍下centos7中搭建nexus私服以及如何上传、下载jar包等。
下载nexus-2.14.4-03-bundle.tar.gz ,上传到centos服务器
(
百度网盘下载, 链接:http://pan.baidu.com/s/1bo5l5Vp 密码:df1t
)
cd installpkg
tar -zxvf nexus-2.14.4-03-bundle.tar.gz -C ../app/
cd ../app
mkdir nexus2
mv nexus-2.14.4-03 nexus2/
mv sonatype-work nexus2/
nexus服务启动、停止等命令 :
cd nexus2/nexus-2.14.4-03/bin
./nexus console 在当前控制台窗口启动,按ctrl+c结束进程
./nexus start 后台进程启动nexus服务,可查看 logs目录中wrapper.log 输出日志
./nexus stop 停止nexus服务。
./nexus restart 重启
./nexus status 查看服务运行状态
注意:启动、停止服务,不要使用root账号(报错),使用一个其他的普通账户即可。
启动 nexus服务后,可使用浏览器访问 http://ip:8081/nexus 进入管理界面。
nexus中存在的内置账号 admin/admin123(管理员) 、 deployment/deployment123(部署员) 。
我们使用admin登录上后,找到左侧repository,找到central仓库
在configuration 中,我们发现 默认的remote storage location 值为: https://repo1.maven.org/maven2/,Download Remote Indexes 为False
我们需要将emote storage location 值改为:http://maven.aliyun.com/nexus/content/repositories/central/ ,Download Remote Indexes 值改为True.
(华为云remote repo : https://mirrors.huaweicloud.com/repository/maven/)
1、上传jar包到nexus私服 ,选择releases仓库,找到artifact upload 选项卡,填写GAV ,上传即可。
注意:选择的本地文件名可以是任意的,因为上传到nexus上后,nexus会根据jar的GAV坐标来重命名并保存起来(建立索引)
1、上传源码jar包到nexus私服 ,选择releases仓库,找到artifact upload 选项卡。填写GAV ,与上传jar相同。上传源码jar包还
需要配置classifier为sources (注意不是source) ,然后点击添加、上传即可。
搜索、找到我们刚上传的 eucp-sms-sdk-1.3.3.jar 和eucp-sms-sdk-1.3.3-sources.jar ,点击download即可下载。
ok!!!
Copyright © 叮叮声的奶酪 版权所有
备案号:鄂ICP备17018671号-1