一 安裝harbor
GitHub鏈接 : Releases · goharbor/harbor (github.com)
下載安裝包并解壓 (以v2.2.2版本為例)
$ wget https://github.com/goharbor/harbor/releases/download/v2.2.2/harbor-offline-installer-v2.2.2.tgz
$ tar -zxvf harbor-online-installer-v2.2.2.tgz
進(jìn)入文件夾
$ cd harbor
復(fù)制一份配置文件
$ cp harbor.yml.tmpl harbor.yml
執(zhí)行安裝腳本
$ ./install.sh
執(zhí)行可能會報錯,提示
ERROR:root:Please specify hostname,是因為配置文件中未指定hostname,編輯/etc/hosts文件 追加127.0.0.1 harbor.local(或者其他),替換harbor.yml中hostname字段,

image-20210609100830347.png
配置文件默認(rèn)端口80,但是一般會被其他程序占用,會報錯端口沖突,此處修改為
5001,此處為內(nèi)網(wǎng)部署,不需要https, 將https注釋掉,

image-20210609102556752.png
通過瀏覽器訪問
初始用戶名密碼為,
admin
Harbor12345
可通過修改 harbor.yml 配置文件進(jìn)行修改

image-20210609113613738.png