💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] > [教程](https://wiki.eryajf.net/pages/1b25e5/#_4-%E6%AD%A3%E5%BC%8F%E5%BA%94%E7%94%A8) ## 概述 - Nexus Repository 是一个用于存储和管理构件(如软件库、二进制文件和其他任何与软件开发相关的文件)的工具。 - 它旨在提供一个集中式的存储库,使团队能够共享和管理这些资源。 - 使用 Nexus Repository,开发人员可以轻松地访问他们需要的构件,并确保他们使用的是最新版本。 - Nexus Repository 还包括一组强大的功能,例如缓存和代理远程存储库、支持多种软件包管理器(如 Maven、Gradle、npm 等)、安全性和访问控制等,使其成为一个非常有用的工具。 **仓库类型** - 代理仓库(Proxy) - 当PC访问中央仓库的时候,先通过Proxy下载到Nexus仓库,然后再从Nexus仓库下载到PC本地。 这样的就可以大大节约外部宽带,只要其中一个人从中央仓库下来了,以后大家都是从Nexus仓库上进行下载。 - 宿主仓库(Hosted) - 用于将第三方的包或者我们自己的包,放到自己的Nexus仓库上。 - 仓库组(Group) - 能把多个仓库合成一个仓库来使用。把上几步创建的代理仓库和宿主仓库都加入到同一仓库组中,这样可以让仓库同时支持代理和自己上传。 ## 安装 ``` wget https://sonatype-download.global.ssl.fastly.net/repository/downloads-prod-group/3/nexus-3.37.0-01-unix.tar.gz ``` 注册成服务 ``` # cat /etc/systemd/system/nexus.service [Unit] Description=nexus service After=network.target [Service] Type=forking LimitNOFILE=65536 ExecStart=/data/services/nexus-8081/bin/nexus start ExecStop=/data/services/nexus-8081/bin/nexus stop User=nexus Restart=on-abort [Install] WantedBy=multi-user.target ``` ## 迁移 ``` nohup rsync -vuazrtpP --progress --delete --exclude="blobs/docker-registry-sea" -e 'ssh' root@10.80.42.138:/data/nexus3data/nexus3/ /data/nexus3data/nexus3/ > /tmp/rsync.log 2>&1 & ``` ### 其他教程 Nexus系列文章 * [使用nexus3配置docker私有仓库](https://wiki.eryajf.net/pages/1816.html) * [使用nexus3配置maven私有仓库](https://wiki.eryajf.net/pages/1815.html) * [使用nexus3配置npm私有仓库](https://wiki.eryajf.net/pages/1956.html) * [使用nexus3配置yum私有仓库](https://wiki.eryajf.net/pages/2002.html) * [使用nexus3配置Python私有仓库](https://wiki.eryajf.net/pages/3167.html) * [使用nexus3配置golang私有仓库](https://wiki.eryajf.net/pages/3623.html)