1、前置条件
Harbor需要在Docker与Docker-compose组件上运行
docker版本要求1.17版本以上
Docker-compose安装
yum -y install docker-compose
docker安装
curl -fsSL https://get.docker.com/ | sh
2、下载安装包
在https://github.com/goharbor/harbor/releases/ 找到想要安装的版本,获取offline版本的下载链接
如果github无法打开,可以从以下链接下载
链接: https://pan.baidu.com/s/1vhf_nKF0jBzF_j5Iuyy3AA 提取码: 8675
安装包下载到 /usr/local/目录下解压
tar -xf harbor-offline-installer-v2.9.1.tgz
cd harbor/
cp harbor.yml.tmpl harbor.yml
vim harbor.yml
hostname: <你的主机的IP地址>
http:
# port for http, default is 80. If https enabled, this port will redirect to https port
port: 80
#注释https
# https related config
# 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
生成配置
./prepare
安装
./install.sh