centos7安装nexus
获取nexus包
https://sonatype-download.global.ssl.fastly.net/nexus/3/latest-unix.tar.gz
https://download.sonatype.com/nexus/3/latest-unix.tar.gz
添加用户
useradd nexus
echo "123456" | passwd nexus --stdin
解压nexus的包
tar -zxvf nexus-3.9.0-01-unix.tar.gz
mv nexus-3.9.0-01 nexus
配置nexus
vi nexus/etc/nexus-default.properties
vi nexus/bin/nexus
设置nexus环境变量
NEXUS_HOME=/usr/local/nexus/bin
PATH=$PATH:$NEXUS_HOME
export PATH NEXUS_HOME
设置开机启动
vi /etc/rc.d/rc.local 添加 /usr/local/nexus/bin/nexus start
chmod 755 /etc/rc.d/rc.local
登录nexus界面
http://192.168.188.133:10000/
默认用户名/密码:admin/admin123
配置docker私有仓库
1.点击设置按钮,2.点击Repositories,3.点击create repository
选择仓库类型
然后输入仓库名称,勾选HTTP并输入端口号,勾选允许交互的API,最后点击create按钮
docker配置:
vi /etc/docker/daemon.json 添加
{
"insecure-registries": ["http://192.168.188.133:10001"]
}
登录仓库
docker login -u admin -p admin123 192.168.188.133:10001
------------------------------------------------------------------------------
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
上传镜像
docker tag quay.io/coreos/configmap-reload:v0.0.1 192.168.188.133:10001/configmap-reload:0.1
docker push 192.168.188.133:10001/configmap-reload:0.1
---------------------------------------------------------------------------------------------
The push refers to repository [192.168.188.133:10001/configmap-reload]
5f70bf18a086: Pushed
91bd48b9e0b0: Pushed
0.1: digest: sha256:50c53db55ece9a6e1a7274e497f308bcc24164bdb4c0885524037c1b8e4e758d size: 734
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 用 C# 插值字符串处理器写一个 sscanf
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· .NET Core内存结构体系(Windows环境)底层原理浅谈
· C# 深度学习:对抗生成网络(GAN)训练头像生成模型
· 趁着过年的时候手搓了一个低代码框架
· 本地部署DeepSeek后,没有好看的交互界面怎么行!
· 为什么说在企业级应用开发中,后端往往是效率杀手?
· 用 C# 插值字符串处理器写一个 sscanf
· 乌龟冬眠箱湿度监控系统和AI辅助建议功能的实现