登录 https://github.com/goharbor/harbor/releases/ 找到想要安装的版本,获取offline版本的下载链接
https://goharbor.io/docs/2.4.0/install-config/
# 创建日志存放目录
mkdir -p /data/logs/harbor
cd /root
wget https://github.com/goharbor/harbor/releases/download/v2.4.1/harbor-offline-installer-v2.4.1.tgz
tar -zxvf harbor-offline-installer-v2.4.1.tgz
cd harbor
cp harbor.yml.tmpl harbor.yml
修改配置文件
vi harbor.yml
# 当前服务器ip,安装完成后就可以用这个地址访问web管理页面
hostname: 设置域名或者本机ip
# 域名证书没有的话 将https的所有项注释掉,不开启https访问
https.port.certificate 证书 路径
https.port.private_key 证书私钥路径
# harbor ui后台管理员密码
harbor_admin_password: xxxxx
#必须设置,否则安装后重装时不能修改,除非删除数据库后重新安装
password: xxxx
# harbor日志存放路径
location: /data/logs/harbor
./prepare
./install.sh
在浏览器输入你的服务器地址 http://192.168.1.xx/ 访问管理页面
输入账号:admin 以及配置参数时的管理员密码,就可以正常登录了
docker-compose start
docker-compose stop
registry-mirrors 为加速镜像 insecure-registries 默认http私有仓库不能访问,设置后才可以
vi /etc/docker/daemon.json
{
"insecure-registries": ["http://192.168.2.196"],
"registry-mirrors": ["https://hub-mirror.c.163.com","https://j0kuzp77.mirror.aliyuncs.com"]
}
systemctl restart docker
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有