一 安装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
进入文件夹
$ cd harbor
复制一份配置文件
$ cp harbor.yml.tmpl harbor.yml
执行安装脚本
$ ./install.sh
执行可能会报错,提示
ERROR:root:Please specify hostname,是因为配置文件中未指定hostname,编辑/etc/hosts文件 追加127.0.0.1 harbor.local(或者其他),替换harbor.yml中hostname字段,

image-20210609100830347.png
配置文件默认端口80,但是一般会被其他程序占用,会报错端口冲突,此处修改为
5001,此处为内网部署,不需要https, 将https注释掉,

image-20210609102556752.png
通过浏览器访问
初始用户名密码为,
admin
Harbor12345
可通过修改 harbor.yml 配置文件进行修改

image-20210609113613738.png