一、下载Habor离线安装包

wget https://github.com/goharbor/harbor/releases/download/v2.7.0/harbor-offline-installer-v2.7.0.tgz

二、解压至指定目录

tar -zxf harbor-offline-installer-v2.7.0.tgz -C /app

三、修改配置文件

[root@node2 ~]# cd /app/habor
[root@node2 harbor]# cp habor.yml.tmpl habor.yml
[root@node2 harbor]# vim habor.yml
# 修改hostname和port:
hostname: 11.0.1.7
http:port: 18080
# 修改admin的默认密码
harbor_admin_password: Harbor12345

四、环境检查

[root@node2 harbor]# ./prepare
prepare base dir is set to /app/harbor
Unable to find image 'goharbor/prepare:v2.7.0' locally
v2.7.0: Pulling from goharbor/prepare
1871d44f4cdb: Pull complete
9e5f23534b75: Pull complete
b234075cadb4: Pull complete
2ee6e5a578c1: Pull complete
0b0e76074063: Pull complete
c4c9b2e450d6: Pull complete
c70804059354: Pull complete
721611d803a1: Pull complete
d53c5290e042: Pull complete
0d8cc28f3d0c: Pull complete
Digest: sha256:47df4e214c8fd9ea0352a903dba884a480fa18f39ef426f7b890cf822f848139
Status: Downloaded newer image for goharbor/prepare:v2.7.0
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/portal/nginx.conf
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
Generated and saved secret to file: /data/secret/keys/secretkey
Successfully called func: create_root_cert
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir

五、开始安装

[root@node2 harbor]# ./install.sh [Step 0]: checking if docker is installed ...Note: docker version: 20.10.21[Step 1]: checking docker-compose is installed ...Note: docker-compose version: 1.22.0[Step 2]: loading Harbor images ...
Loaded image: goharbor/prepare:v2.7.0
716575e41c45: Loading layer [==================================================>]  145.8MB/145.8MB
af0525d96b0b: Loading layer [==================================================>]  16.72MB/16.72MB
939977d7cbf6: Loading layer [==================================================>]   5.12kB/5.12kB
005530be0f99: Loading layer [==================================================>]  6.144kB/6.144kB
9764bccefdd0: Loading layer [==================================================>]  3.072kB/3.072kB
38fe09b6e0e7: Loading layer [==================================================>]  2.048kB/2.048kB
9d659849215a: Loading layer [==================================================>]   2.56kB/2.56kB
bee3f2947ec7: Loading layer [==================================================>]   2.56kB/2.56kB
e4e05d8658d3: Loading layer [==================================================>]   2.56kB/2.56kB
e7991cc39265: Loading layer [==================================================>]  9.728kB/9.728kB
Loaded image: goharbor/harbor-db:v2.7.0
d79110caaa26: Loading layer [==================================================>]  8.902MB/8.902MB
b8cddfca4e88: Loading layer [==================================================>]  3.584kB/3.584kB
071b47da1d9b: Loading layer [==================================================>]   2.56kB/2.56kB
d22932d9f6c7: Loading layer [==================================================>]  84.83MB/84.83MB
b2f2e9cbceac: Loading layer [==================================================>]  5.632kB/5.632kB
53cce0f5bd54: Loading layer [==================================================>]    108kB/108kB
40a6c61dcc44: Loading layer [==================================================>]  44.03kB/44.03kB
6d7dba633513: Loading layer [==================================================>]  85.77MB/85.77MB
44309ebcfcf7: Loading layer [==================================================>]   2.56kB/2.56kB
Loaded image: goharbor/harbor-core:v2.7.0
cebcabcec86e: Loading layer [==================================================>]    127MB/127MB
f3a76df94b70: Loading layer [==================================================>]  3.584kB/3.584kB
ac9852cda3ce: Loading layer [==================================================>]  3.072kB/3.072kB
a5bab3cf8af7: Loading layer [==================================================>]   2.56kB/2.56kB
d52202b6a929: Loading layer [==================================================>]  3.072kB/3.072kB
bd8a7ca8438d: Loading layer [==================================================>]  3.584kB/3.584kB
a6a054173348: Loading layer [==================================================>]  20.99kB/20.99kB
Loaded image: goharbor/harbor-log:v2.7.0
1a3b490c3dc4: Loading layer [==================================================>]  8.902MB/8.902MB
7cbd50b78394: Loading layer [==================================================>]  25.65MB/25.65MB
7119ae84be31: Loading layer [==================================================>]  4.608kB/4.608kB
c9c5875f25c8: Loading layer [==================================================>]  26.44MB/26.44MB
Loaded image: goharbor/harbor-exporter:v2.7.0
c8c89cfdc06a: Loading layer [==================================================>]  119.1MB/119.1MB
Loaded image: goharbor/nginx-photon:v2.7.0
59736e375413: Loading layer [==================================================>]  5.759MB/5.759MB
6cc787909b61: Loading layer [==================================================>]  91.75MB/91.75MB
a56e97e08300: Loading layer [==================================================>]  3.072kB/3.072kB
57925eac82a6: Loading layer [==================================================>]  4.096kB/4.096kB
6e36a605c736: Loading layer [==================================================>]  92.54MB/92.54MB
Loaded image: goharbor/chartmuseum-photon:v2.7.0
175f4dc2d45f: Loading layer [==================================================>]  119.1MB/119.1MB
4e26408b204b: Loading layer [==================================================>]  6.143MB/6.143MB
f2e93a87e40b: Loading layer [==================================================>]  1.249MB/1.249MB
e5cceb0b0435: Loading layer [==================================================>]  1.194MB/1.194MB
Loaded image: goharbor/harbor-portal:v2.7.0
b887c32c40a7: Loading layer [==================================================>]  8.902MB/8.902MB
938a7e3c75f5: Loading layer [==================================================>]  3.584kB/3.584kB
5a5a28182655: Loading layer [==================================================>]   2.56kB/2.56kB
ebab1e49abda: Loading layer [==================================================>]  103.3MB/103.3MB
4ce14e0439d9: Loading layer [==================================================>]    104MB/104MB
Loaded image: goharbor/harbor-jobservice:v2.7.0
fbaa7a10893c: Loading layer [==================================================>]  5.759MB/5.759MB
c688ac7b41fa: Loading layer [==================================================>]  4.096kB/4.096kB
d7c1e408fc7d: Loading layer [==================================================>]  17.41MB/17.41MB
55958792b639: Loading layer [==================================================>]  3.072kB/3.072kB
a914e1c2d3e7: Loading layer [==================================================>]  30.69MB/30.69MB
b91233145a72: Loading layer [==================================================>]  48.89MB/48.89MB
Loaded image: goharbor/harbor-registryctl:v2.7.0
4bfd949c2891: Loading layer [==================================================>]  5.759MB/5.759MB
7fd746eb54cc: Loading layer [==================================================>]  4.096kB/4.096kB
026a4a79ef61: Loading layer [==================================================>]  3.072kB/3.072kB
4e8dca75f609: Loading layer [==================================================>]  17.41MB/17.41MB
7e017925a772: Loading layer [==================================================>]   18.2MB/18.2MB
Loaded image: goharbor/registry-photon:v2.7.0
bd6904b66a79: Loading layer [==================================================>]  5.754MB/5.754MB
4bea14657109: Loading layer [==================================================>]  8.987MB/8.987MB
629d40c48f45: Loading layer [==================================================>]  15.88MB/15.88MB
48d73b35455c: Loading layer [==================================================>]  29.29MB/29.29MB
fe12338e806d: Loading layer [==================================================>]  22.02kB/22.02kB
dcbe4fc18411: Loading layer [==================================================>]  15.88MB/15.88MB
Loaded image: goharbor/notary-server-photon:v2.7.0
cc039d70dda6: Loading layer [==================================================>]  119.9MB/119.9MB
c128fc8dd5aa: Loading layer [==================================================>]  3.072kB/3.072kB
e030017184f0: Loading layer [==================================================>]   59.9kB/59.9kB
f7a67f51f6d5: Loading layer [==================================================>]  61.95kB/61.95kB
Loaded image: goharbor/redis-photon:v2.7.0
c4c80dff091a: Loading layer [==================================================>]  5.754MB/5.754MB
26f51848acfb: Loading layer [==================================================>]  8.987MB/8.987MB
fb0e59f893b6: Loading layer [==================================================>]  14.47MB/14.47MB
e17fcd490db6: Loading layer [==================================================>]  29.29MB/29.29MB
f0f3d13b4bdf: Loading layer [==================================================>]  22.02kB/22.02kB
73965e1762cb: Loading layer [==================================================>]  14.47MB/14.47MB
Loaded image: goharbor/notary-signer-photon:v2.7.0
2d831b255ec9: Loading layer [==================================================>]  6.287MB/6.287MB
603534b77185: Loading layer [==================================================>]  4.096kB/4.096kB
edbbda0ede29: Loading layer [==================================================>]  3.072kB/3.072kB
11ccb87ea0a3: Loading layer [==================================================>]  180.6MB/180.6MB
13afce1af948: Loading layer [==================================================>]  13.22MB/13.22MB
b05259901192: Loading layer [==================================================>]  194.6MB/194.6MB
Loaded image: goharbor/trivy-adapter-photon:v2.7.0[Step 3]: preparing environment ...[Step 4]: preparing harbor configs ...
prepare base dir is set to /app/harbor
WARNING:root:WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https
Clearing the configuration file: /config/portal/nginx.conf
Clearing the configuration file: /config/log/logrotate.conf
Clearing the configuration file: /config/log/rsyslog_docker.conf
Clearing the configuration file: /config/nginx/nginx.conf
Clearing the configuration file: /config/core/env
Clearing the configuration file: /config/core/app.conf
Clearing the configuration file: /config/registry/passwd
Clearing the configuration file: /config/registry/config.yml
Clearing the configuration file: /config/registryctl/env
Clearing the configuration file: /config/registryctl/config.yml
Clearing the configuration file: /config/db/env
Clearing the configuration file: /config/jobservice/env
Clearing the configuration file: /config/jobservice/config.yml
Generated configuration file: /config/portal/nginx.conf
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 dirNote: stopping existing Harbor instance ...
Removing network harbor_harbor
WARNING: Network harbor_harbor not found.[Step 5]: starting Harbor ...
Creating network "harbor_harbor" with the default driver
Creating harbor-log ... done
Creating registry      ... done
Creating harbor-db     ... done
Creating harbor-portal ... done
Creating redis         ... done
Creating registryctl   ... done
Creating harbor-core   ... done
Creating nginx             ... done
Creating harbor-jobservice ... done
✔ ----Harbor has been installed and started successfully.----

六、检查运行情况

[root@node2 harbor]# docker-compose psName                     Command                  State                 Ports
---------------------------------------------------------------------------------------------
harbor-core         /harbor/entrypoint.sh            Up (healthy)
harbor-db           /docker-entrypoint.sh  13        Up (healthy)
harbor-jobservice   /harbor/entrypoint.sh            Up (healthy)
harbor-log          /bin/sh -c /usr/local/bin/ ...   Up (healthy)   127.0.0.1:1514->10514/tcp
harbor-portal       nginx -g daemon off;             Up (healthy)
nginx               nginx -g daemon off;             Up (healthy)   0.0.0.0:18080->8080/tcp
redis               redis-server /etc/redis.conf     Up (healthy)
registry            /home/harbor/entrypoint.sh       Up (healthy)
registryctl         /home/harbor/start.sh            Up (healthy)

七、登录测试
使用浏览器访问http://11.0.1.7:18080
用户名:admin
密码:Harbor12345

Habor镜像仓库的搭建相关推荐

  1. 你必须知道的Docker镜像仓库的搭建

    近期工作中发现用到的容器镜像越来越多(不多的时候没考虑过镜像仓库的问题),同一个容器镜像也存在多个版本,那么镜像仓库的搭建需求就涌现出来,本文就目前的几个常用镜像仓库的搭建进行介绍,我们可以根据需要选 ...

  2. Docker 私有镜像仓库的搭建及认证

    转自乐字节 DockerHub 为我们提供了很多官方镜像和个人上传的镜像,我们可以下载机构或个人提供的镜像,也可以上传我们自己的本地镜像,但缺点是: 由于网络的原因,从 DockerHub 下载和上传 ...

  3. Habor镜像仓库的使用

    环境 Habor仓库:阿里云Ubuntu18(阿里云安装Habor有很多教程,很容易搭建起来) docker:Ubuntu16虚拟机 流程 1.保证启动habor 2.虚拟机进入daemon.json ...

  4. 分分钟搞定阿里云私有Docke镜像仓库的搭建

    前言: 所谓私有仓库,也就是在本地(局域网)搭建的一个类似公共仓库的东西,搭建好之后,我们可以将自己的镜像提交到私有仓库中.这样我们既能使用 Docker 来运行我们的项目镜像,也避免了商业项目暴露出 ...

  5. 打docker镜像_分分钟搞定阿里云私有Docke镜像仓库的搭建

    前言:  所谓私有仓库,也就是在本地(局域网)搭建的一个类似公共仓库的东西,搭建好之后,我们可以将自己的镜像提交到私有仓库中.这样我们既能使用 Docker 来运行我们的项目镜像,也避免了商业项目暴露 ...

  6. habor镜像仓库部署

    以后在开发测试调试时,会经常反复通过kolla-ansible拉取openstack等相关docker镜像部署云环境,因此,为了稳定版本和快速部署的需求,需要在本地部署一个镜像仓库,这里通过开源项目h ...

  7. 企业—habor docker镜像仓库的搭建

    一.Harbor核心组件解释 Proxy:他是一个nginx的前端代理,代理Harbor的registry,UI, token等服务. db:负责储存用户权限.审计日志.Dockerimage分组信息 ...

  8. Docker 镜像仓库 -- Harbor 搭建

    环境说明 # cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core)# docker -v Docker version 1.12.6 ...

  9. Docker搭建私有镜像仓库

    一. 常见镜像仓库服务 镜像仓库(Docker Registry)有公共的和私有的两种形式: 公共仓库:例如Docker官方的Docker Hub,国内也有一些云服务商提供类似于Docker Hub的 ...

最新文章

  1. 基于PowerShell 3.0的web接口测试
  2. 前端H5怎么切换语言_H5前端和移动APP开发知识点和配套视频
  3. 【云计算】使用nsenter进入Docker容器进行调试
  4. layuiAdmin打开新窗口、新标签页
  5. NameError: name 'long' is not defined
  6. 浙江省计算机二级办公软件高级应用技术考试时间,最新浙江省计算机二级办公软件高级应用技术考试大纲...
  7. python统计句子中单词个数_【python统计单词数量】作文写作问答 - 归教作文网
  8. OpenCV threshold 二值化
  9. 【应急响应】2020应急响应基础-Windows、Linux合集
  10. 一键清理垃圾的bat文件
  11. Mac 没有声音怎么恢复
  12. 传统的期货交易方式为计算机撮合成交,[期货知识]期货价格是怎么形成的-计算机撮合成交 - 南方财富网...
  13. php 一次性动态口令,一次性口令 (OTP) 动态口令身份认证
  14. ENQUEUE_MIGRATED
  15. czl蒻蒟的OI之路7
  16. 信息级联(Information cascade)
  17. SSL证书的加密算法有哪些?
  18. Ant Design Mobile是什么?
  19. 使用python脚本批量修改vc工程文件
  20. CCF201709-2 公共钥匙盒(JAVA)

热门文章

  1. 使用LSV制作KML文件教程
  2. 【暂时性死区(TDZ)】
  3. 概率论:概率空间的基本概念
  4. FPGA实现DDRIP核配置(Memory Interface Solutions)
  5. 使用ipv6内网穿透,实现私有云盘搭建,实现远程控制等功能
  6. 富文本编辑器导出html静态页面和pdf格式文件
  7. FreeCAD Addon Manager的Workbenches为空的解决方法
  8. STM32F103C8t6烧录问题
  9. 图片太多怎么办?教你怎么批量压缩图片大小
  10. [数据结构 算法] A*算法--罗马尼亚度假问题(实验课作业)