Nexus仓库管理器

Nexus

Nexus 是一个强大的 Maven 仓库管理器,它极大地简化了自己内部仓库的维护和外部仓库的访问

官方 maven 仓库:
http://repo.maven.apache.org

https://www.sonatype.com/download-oss-sonatype

官方下载页面
https://help.sonatype.com/repomanager3/download

https://help.sonatype.com/repomanager3/download/download-archives—repository-manager-3

部署 nexus

内存推荐 4G 或以上
内存太小会出现以下错误

root@nexus-server:/usr/local/nexus# ./bin/nexus run
WARNING: ************************************************************
WARNING: Detected execution as "root" user. This is NOT recommended!
WARNING: ************************************************************
Java HotSpot(TM) 64-Bit Server VM warning: INFO: 
os::commit_memory(0x0000000717000000, 1890582528, 0) failed; error='Cannot 
allocate memory' (errno=12)

启动 nexus

root@nexus-server:/usr/local/src# tar xf nexus-3.20.1-01-unix.tar.gz

root@nexus-server:/usr/local/src# ln -sv /usr/local/src/nexus-3.20.1-01  /usr/local/nexus

root@nexus-server:/usr/local/src# cd /usr/local/nexus

# ./bin/nexus --help
# ./bin/nexus run
# ./bin/nexus start

在这里插入图片描述

登录 web 界面

在这里插入图片描述

设置向导

在这里插入图片描述

设置密码

在这里插入图片描述

匿名下载
启用匿名访问将默认允许未经授权的下载,浏览和搜索存储库内容,可以通过编辑分配给匿名用户的角色来更改未经身份验证的用户的权限

在这里插入图片描述
验证默认仓库
在这里插入图片描述
在这里插入图片描述

https://github.com/pdurbin/maven-hello-world.git

使用 nexus 示例

内网 yum 源示例

通过 nexus 作为公司内网 yum 仓库,通过阿里云镜像安装包

阿里云镜像地址
https://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/7/x86_64/

Create repository—yum(proxy)
在这里插入图片描述
在这里插入图片描述

centos 7.x 配置 yum 仓库

cat /etc/redhat-release 
CentOS Linux release 7.7.1908 (Core)

[root@localhost ~]# cat /etc/yum.repos.d/zabbix.repo 
[zabbix-nexus]
name=zabbix
baseurl=http://172.31.0.105:8081/repository/zabbix-proxy/
enabled=1
gpgcheck=0

centos7.x 安装 zabbix 测试

yum install zabbix-agent zabbix-get --nogpgcheck

验证 nexus 数据

在这里插入图片描述

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值