下载离线安装包
https://github.com/goharbor/harbor/releases 网盘链接:https://pan.baidu.com/s/18ZwKZSlrxj44ql_ZbC9B6A 提取码:HarB
上传服务器解压
tar zxvf harbor-offline-installer-v2.1.3.tgz -C /usr/local/
修改配置文件
cp harbor.yml.tmpl harbor.yml vi harbor.yml hostname: 192.168.10.107 # 修改为本机IP #https: # 未使用 https 所以注释,不然会报错 # # https port for harbor, default is 443 # port: 443 # # The path of cert and key files for nginx # certificate: /your/certificate/path # private_key: /your/private/key/path harbor_admin_password: Harbor12345 # admin 密码
执行安装脚本
./install.sh
安装成功显示结果
设置开机自启动
vim /lib/systemd/system/harbor.service [Unit] Description=Harbor After=docker.service systemd-networkd.service systemd-resolved.service Requires=docker.service Documentation=http://github.com/vmware/harbor [Service] Type=simple Restart=on-failure RestartSec=5 #需要注意harbor的安装位置 ExecStart=/usr/bin/docker-compose -f /usr/local/harbor/docker-compose.yml up ExecStop=/usr/bin/docker-compose -f /usr/local/harbor/docker-compose.yml down [Install] WantedBy=multi-user.target
111
systemctl enable harbor.service --now
标签:service,harbor,部署,usr,https,docker,安装,yml From: https://www.cnblogs.com/hm1825/p/17958240