[root@registry harbor]# cp harbor.yml.tmpl harbor.yml [root@registry harbor]# vi harbor.yml
修改主机明并添加一行:ui_url_protocol: http (使用http协议)
[root@registry ~]# tar zxf harbor-offline-installer-v2.0.0-rc2.tgz [root@registry ~]# ls aa.sh anaconda-ks.cfg harbor harbor.git harbor-master.zip harbor-offline-installer-v2.0.0-rc2.tgz volume.tar volume.tar.gz [root@registry ~]# cd harbor [root@registry harbor]# ls common.sh harbor.v2.0.0.tar.gz harbor.yml.tmpl install.sh LICENSE prepare [root@registry harbor]# ./prepare prepare base dir is set to /root/harbor no config file: /root/harbor/harbor.yml [root@registry harbor]# sh install.sh [Step 0]: checking if docker is installed ... Note: docker version: 19.03.8 [Step 1]: checking docker-compose is installed ... Note: docker-compose version: 1.25.5 [Step 2]: loading Harbor images ... 101133a0a2e6: Loading layer [==================================================>] 8.441MB/8.441MB e39d2d9c94f1: Loading layer [==================================================>] 3.584kB/3.584kB c2e360a8b27f: Loading layer [==================================================>] 20.94MB/20.94MB 93470411005c: Loading layer [==================================================>] 3.072kB/3.072kB c89994baf6a8: Loading layer [==================================================>] 8.721MB/8.721MB ebf72d894168: Loading layer [==================================================>] 30.48MB/30.48MB Loaded image: goharbor/harbor-registryctl:v2.0.0 bd70463b9e5a: Loading layer [==================================================>] 8.441MB/8.441MB 20760d94e1e3: Loading layer [==================================================>] 3.584kB/3.584kB 28da4717e574: Loading layer [==================================================>] 3.072kB/3.072kB 361b6549eee3: Loading layer [==================================================>] 9.71MB/9.71MB 2ed9fbab68a1: Loading layer [==================================================>] 10.53MB/10.53MB Loaded image: goharbor/clair-adapter-photon:v2.0.0 68eef015ceb6: Loading layer [==================================================>] 2.56kB/2.56kB 7d5e5728050b: Loading layer [==================================================>] 1.536kB/1.536kB d5d8dc7fe43e: Loading layer [==================================================>] 18.43kB/18.43kB 580a5269b684: Loading layer [==================================================>] 3.751MB/3.751MB 474ff2a9d5b5: Loading layer [==================================================>] 249.3kB/249.3kB Loaded image: goharbor/prepare:v2.0.0 4076b322e7f5: Loading layer [==================================================>] 49.89MB/49.89MB c3ad42ad12fe: Loading layer [==================================================>] 3.584kB/3.584kB 8f506f95bd04: Loading layer [==================================================>] 3.072kB/3.072kB fa1bcaa5ae28: Loading layer [==================================================>] 2.56kB/2.56kB 2bfbf2302f67: Loading layer [==================================================>] 3.072kB/3.072kB cf8108e3b602: Loading layer [==================================================>] 3.584kB/3.584kB 963ef45f3fd9: Loading layer [==================================================>] 12.29kB/12.29kB aaf57cdc7fc7: Loading layer [==================================================>] 5.632kB/5.632kB Loaded image: goharbor/harbor-log:v2.0.0 497d39fd8ed4: Loading layer [==================================================>] 10.28MB/10.28MB Loaded image: goharbor/nginx-photon:v2.0.0 15f399ca8b42: Loading layer [==================================================>] 8.441MB/8.441MB fa4a59d0b4e2: Loading layer [==================================================>] 3.584kB/3.584kB df0933651bc5: Loading layer [==================================================>] 3.072kB/3.072kB 1c821969faa2: Loading layer [==================================================>] 20.94MB/20.94MB 4a84e9f18c9e: Loading layer [==================================================>] 21.76MB/21.76MB Loaded image: goharbor/registry-photon:v2.0.0 464d98f962d2: Loading layer [==================================================>] 115.2MB/115.2MB 650908f403fb: Loading layer [==================================================>] 12.15MB/12.15MB e355c89dce14: Loading layer [==================================================>] 3.072kB/3.072kB 7a9db1efdc48: Loading layer [==================================================>] 49.15kB/49.15kB 79b851cb6990: Loading layer [==================================================>] 3.584kB/3.584kB b53affaef1d5: Loading layer [==================================================>] 13.03MB/13.03MB Loaded image: goharbor/clair-photon:v2.0.0 c9ad3414e408: Loading layer [==================================================>] 63.57MB/63.57MB 0aea7ae12d77: Loading layer [==================================================>] 60.58MB/60.58MB 15ccec1fa5cf: Loading layer [==================================================>] 5.632kB/5.632kB f36118640274: Loading layer [==================================================>] 2.048kB/2.048kB b709d8f91780: Loading layer [==================================================>] 2.56kB/2.56kB 55dbc64ad9fa: Loading layer [==================================================>] 2.56kB/2.56kB 105e5ec718aa: Loading layer [==================================================>] 2.56kB/2.56kB cd8ce4ea4a01: Loading layer [==================================================>] 10.24kB/10.24kB Loaded image: goharbor/harbor-db:v2.0.0 1f3458bb7308: Loading layer [==================================================>] 8.435MB/8.435MB b27bb9a16e48: Loading layer [==================================================>] 6.317MB/6.317MB a7ad0595cc5c: Loading layer [==================================================>] 16.04MB/16.04MB df7bcc89bc07: Loading layer [==================================================>] 28.25MB/28.25MB d0f70fb87020: Loading layer [==================================================>] 22.02kB/22.02kB 85ca3ac3c2a4: Loading layer [==================================================>] 50.6MB/50.6MB Loaded image: goharbor/notary-server-photon:v2.0.0 d7d83ab3c03b: Loading layer [==================================================>] 14.61MB/14.61MB 8a855572dfa3: Loading layer [==================================================>] 28.25MB/28.25MB 9134a08da8c6: Loading layer [==================================================>] 22.02kB/22.02kB 0be0b2b04fa9: Loading layer [==================================================>] 49.17MB/49.17MB Loaded image: goharbor/notary-signer-photon:v2.0.0 9fefe33a31db: Loading layer [==================================================>] 9.741MB/9.741MB 16cc29c5a985: Loading layer [==================================================>] 3.584kB/3.584kB 1d15cc21e06b: Loading layer [==================================================>] 3.072kB/3.072kB ad6409526882: Loading layer [==================================================>] 20.34MB/20.34MB b22d2b29d1d1: Loading layer [==================================================>] 9.317MB/9.317MB f71d01efdefa: Loading layer [==================================================>] 30.48MB/30.48MB Loaded image: goharbor/trivy-adapter-photon:v2.0.0 935e17d700d1: Loading layer [==================================================>] 8.44MB/8.44MB b71cf78fe2f3: Loading layer [==================================================>] 42.3MB/42.3MB a7c308cb3b8e: Loading layer [==================================================>] 3.072kB/3.072kB bef2187ed210: Loading layer [==================================================>] 3.584kB/3.584kB 68d53a3007d1: Loading layer [==================================================>] 43.12MB/43.12MB Loaded image: goharbor/chartmuseum-photon:v2.0.0 2128feaae029: Loading layer [==================================================>] 10.28MB/10.28MB ac62645e70d7: Loading layer [==================================================>] 8.479MB/8.479MB 70da487efca9: Loading layer [==================================================>] 178.7kB/178.7kB f635415ebcd2: Loading layer [==================================================>] 157.2kB/157.2kB 10867582e161: Loading layer [==================================================>] 33.28kB/33.28kB afa2ec15ce15: Loading layer [==================================================>] 17.41kB/17.41kB bd7c682df133: Loading layer [==================================================>] 15.36kB/15.36kB 298fdc3eb786: Loading layer [==================================================>] 3.584kB/3.584kB Loaded image: goharbor/harbor-portal:v2.0.0 db89bcd4a7aa: Loading layer [==================================================>] 12.22MB/12.22MB 15b000f7938d: Loading layer [==================================================>] 3.072kB/3.072kB 7960aa20b1c1: Loading layer [==================================================>] 2.56kB/2.56kB a0ca2a5ba221: Loading layer [==================================================>] 46.5MB/46.5MB ab1136d1c351: Loading layer [==================================================>] 5.632kB/5.632kB 583ca889f826: Loading layer [==================================================>] 51.2kB/51.2kB 2873031338ef: Loading layer [==================================================>] 47.32MB/47.32MB 60816590515b: Loading layer [==================================================>] 2.56kB/2.56kB Loaded image: goharbor/harbor-core:v2.0.0 ad0a4ed99dd0: Loading layer [==================================================>] 12.22MB/12.22MB 4ab85b47a7db: Loading layer [==================================================>] 3.072kB/3.072kB 026385304658: Loading layer [==================================================>] 2.56kB/2.56kB 013d85251d20: Loading layer [==================================================>] 35.68MB/35.68MB 9b6d3afeda89: Loading layer [==================================================>] 36.5MB/36.5MB Loaded image: goharbor/harbor-jobservice:v2.0.0 da380ff7675f: Loading layer [==================================================>] 39.44MB/39.44MB 200fe721a5fc: Loading layer [==================================================>] 3.072kB/3.072kB 07a2de4353f7: Loading layer [==================================================>] 59.9kB/59.9kB 5a508668092e: Loading layer [==================================================>] 61.95kB/61.95kB Loaded image: goharbor/redis-photon:v2.0.0 [Step 3]: preparing environment ... [Step 4]: preparing harbor configs ... prepare base dir is set to /root/harbor WARNING:root:WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https Generated configuration file: /config/log/logrotate.conf Generated configuration file: /config/log/rsyslog_docker.conf Generated configuration file: /config/nginx/nginx.conf Generated configuration file: /config/core/env Generated configuration file: /config/core/app.conf Generated configuration file: /config/registry/config.yml Generated configuration file: /config/registryctl/env Generated configuration file: /config/registryctl/config.yml Generated configuration file: /config/db/env Generated configuration file: /config/jobservice/env Generated configuration file: /config/jobservice/config.yml loaded secret from file: /data/secret/keys/secretkey Generated configuration file: /compose_location/docker-compose.yml Clean up the input dir [Step 5]: starting Harbor ... Creating network "harbor_harbor" with the default driver Creating harbor-log ... done Creating harbor-portal ... done Creating registryctl ... done Creating redis ... done Creating registry ... done Creating harbor-db ... done Creating harbor-core ... done Creating nginx ... done Creating harbor-jobservice ... done ✔ ----Harbor has been installed and started successfully.----