六.安装harbor

news2024/9/21 18:47:36

1、下载

harbor-offline-installer-v1.9.3

链接:https://pan.baidu.com/s/1dTCy2KPqRhYKxTyE7vlrPg 
提取码:6666

需要安装docker-compose

2、修改配置 

 vim harbor.yml

修改hostname和port

3、安装 

[root@localhost harbor]# ./prepare 
prepare base dir is set to /opt/k8s/devops/harbor/harbor
Unable to find image 'goharbor/prepare:v1.9.3' locally
v1.9.3: Pulling from goharbor/prepare
b950b5dd94ab: Pull complete 
b4a43e6420e8: Pull complete 
23c5a3d9ec9d: Pull complete 
234a8675eb24: Pull complete 
2421ffb0f054: Pull complete 
b6eb06812efc: Pull complete 
70c5107c831f: Pull complete 
Digest: sha256:d7d2117e425fd35f2e92fd9dab95e6041e603c128d93fa312415d53294812064
Status: Downloaded newer image for goharbor/prepare:v1.9.3
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/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
Generated and saved secret to file: /secret/keys/secretkey
Generated certificate, key file: /secret/core/private_key.pem, cert file: /secret/registry/root.crt
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir
[root@localhost harbor]# ./install.sh 

[Step 0]: checking installation environment ...

Note: docker version: 24.0.5

Note: docker-compose version: 2.5.0

[Step 1]: loading Harbor images ...
f93c083be5bc: Loading layer [==================================================>]  9.009MB/9.009MB
bf1b03029526: Loading layer [==================================================>]  44.41MB/44.41MB
3395eb0db37a: Loading layer [==================================================>]  2.048kB/2.048kB
630606b67737: Loading layer [==================================================>]  3.072kB/3.072kB
b59ccb3639e4: Loading layer [==================================================>]  44.41MB/44.41MB
Loaded image: goharbor/chartmuseum-photon:v0.9.0-v1.9.3
Loaded image: goharbor/prepare:v1.9.3
e80aab7b0662: Loading layer [==================================================>]  63.49MB/63.49MB
f8b3d119e8a9: Loading layer [==================================================>]  54.42MB/54.42MB
5f496dd4633b: Loading layer [==================================================>]  5.632kB/5.632kB
9a2858fea72d: Loading layer [==================================================>]  2.048kB/2.048kB
b7501a88cd95: Loading layer [==================================================>]   2.56kB/2.56kB
c82e3969a2e2: Loading layer [==================================================>]   2.56kB/2.56kB
7cac869555ad: Loading layer [==================================================>]   2.56kB/2.56kB
cca577be763d: Loading layer [==================================================>]  10.24kB/10.24kB
Loaded image: goharbor/harbor-db:v1.9.3
9a508de7d2b7: Loading layer [==================================================>]  9.005MB/9.005MB
508382d944be: Loading layer [==================================================>]  3.072kB/3.072kB
6e9e3cb5d33e: Loading layer [==================================================>]   2.56kB/2.56kB
73ddaf5bf2d0: Loading layer [==================================================>]  21.76MB/21.76MB
9a276490655f: Loading layer [==================================================>]  21.76MB/21.76MB
Loaded image: goharbor/registry-photon:v2.7.1-patch-2819-2553-v1.9.3
4a0251807cc9: Loading layer [==================================================>]  9.004MB/9.004MB
897af7ff7b63: Loading layer [==================================================>]  6.239MB/6.239MB
3f4123d93010: Loading layer [==================================================>]   14.9MB/14.9MB
4e0bdb09cba5: Loading layer [==================================================>]  29.21MB/29.21MB
29c5283b24ee: Loading layer [==================================================>]  22.02kB/22.02kB
6f09075fda1a: Loading layer [==================================================>]  50.34MB/50.34MB
Loaded image: goharbor/notary-signer-photon:v0.6.1-v1.9.3
756ffb58fa91: Loading layer [==================================================>]  7.037MB/7.037MB
733009a88a23: Loading layer [==================================================>]  196.6kB/196.6kB
5cc05e9a6a60: Loading layer [==================================================>]    172kB/172kB
eabe1b3a567b: Loading layer [==================================================>]  15.36kB/15.36kB
dd83cfe76436: Loading layer [==================================================>]  3.584kB/3.584kB
28bde9e732c9: Loading layer [==================================================>]  10.84MB/10.84MB
Loaded image: goharbor/harbor-portal:v1.9.3
0eb10921ee80: Loading layer [==================================================>]  78.25MB/78.25MB
74a7ce2b0571: Loading layer [==================================================>]  3.072kB/3.072kB
7d193a1c54ab: Loading layer [==================================================>]   59.9kB/59.9kB
d45413cea5ea: Loading layer [==================================================>]  61.95kB/61.95kB
Loaded image: goharbor/redis-photon:v1.9.3
7c53cafac35a: Loading layer [==================================================>]  337.9MB/337.9MB
c6bad7449208: Loading layer [==================================================>]  119.8kB/119.8kB
Loaded image: goharbor/harbor-migrator:v1.9.3
4bb3c8da2619: Loading layer [==================================================>]   50.3MB/50.3MB
fa60bb5fba7f: Loading layer [==================================================>]  3.584kB/3.584kB
12a81f321c68: Loading layer [==================================================>]  3.072kB/3.072kB
a94dcd551900: Loading layer [==================================================>]   2.56kB/2.56kB
c684117da188: Loading layer [==================================================>]  3.072kB/3.072kB
f14e11ea2c25: Loading layer [==================================================>]  3.584kB/3.584kB
2e2e439cb618: Loading layer [==================================================>]  12.29kB/12.29kB
Loaded image: goharbor/harbor-log:v1.9.3
99ce145e19e6: Loading layer [==================================================>]  10.84MB/10.84MB
Loaded image: goharbor/nginx-photon:v1.9.3
da7ad744c6fd: Loading layer [==================================================>]   16.4MB/16.4MB
a03cee9d5ed3: Loading layer [==================================================>]  29.21MB/29.21MB
f5f37ba098b1: Loading layer [==================================================>]  22.02kB/22.02kB
c6e237d0effb: Loading layer [==================================================>]  51.85MB/51.85MB
Loaded image: goharbor/notary-server-photon:v0.6.1-v1.9.3
01d39dbfbd65: Loading layer [==================================================>]  115.7MB/115.7MB
6d1186763503: Loading layer [==================================================>]  12.31MB/12.31MB
293c8dc3d8c6: Loading layer [==================================================>]  2.048kB/2.048kB
d0ffe0bb8b6b: Loading layer [==================================================>]  48.13kB/48.13kB
c9f0ab7d8bbb: Loading layer [==================================================>]  3.072kB/3.072kB
75c4044a879b: Loading layer [==================================================>]  12.36MB/12.36MB
Loaded image: goharbor/clair-photon:v2.1.0-v1.9.3
b2329d5f99cf: Loading layer [==================================================>]  12.77MB/12.77MB
17c27eb4f7f8: Loading layer [==================================================>]   55.4MB/55.4MB
3c10f4815fc0: Loading layer [==================================================>]  5.632kB/5.632kB
5fb810768754: Loading layer [==================================================>]  36.35kB/36.35kB
376871497fae: Loading layer [==================================================>]   55.4MB/55.4MB
Loaded image: goharbor/harbor-core:v1.9.3
2c38bb39e841: Loading layer [==================================================>]  12.77MB/12.77MB
20ef2473aa7f: Loading layer [==================================================>]  48.13MB/48.13MB
Loaded image: goharbor/harbor-jobservice:v1.9.3
bc526ee3d965: Loading layer [==================================================>]  9.005MB/9.005MB
d880cff24505: Loading layer [==================================================>]  3.072kB/3.072kB
adc7407dd64d: Loading layer [==================================================>]  21.76MB/21.76MB
aa1f551082be: Loading layer [==================================================>]  3.072kB/3.072kB
97bd8288c3d1: Loading layer [==================================================>]  8.661MB/8.661MB
f184a9da0594: Loading layer [==================================================>]  30.42MB/30.42MB
Loaded image: goharbor/harbor-registryctl:v1.9.3


[Step 2]: preparing environment ...
prepare base dir is set to /opt/k8s/devops/harbor/harbor
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/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/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/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
loaded secret from file: /secret/keys/secretkey
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir



[Step 3]: starting Harbor ...
[+] Running 10/10
 ⠿ Network harbor_harbor        Created                                                                                                                                               0.1s
 ⠿ Container harbor-log         Started                                                                                                                                               0.9s
 ⠿ Container harbor-portal      Started                                                                                                                                               2.4s
 ⠿ Container harbor-db          Started                                                                                                                                               2.3s
 ⠿ Container redis              Started                                                                                                                                               2.4s
 ⠿ Container registry           Started                                                                                                                                               2.3s
 ⠿ Container registryctl        Started                                                                                                                                               2.1s
 ⠿ Container harbor-core        Started                                                                                                                                               2.7s
 ⠿ Container nginx              Started                                                                                                                                               3.4s
 ⠿ Container harbor-jobservice  Started                                                                                                                                               3.5s

✔ ----Harbor has been installed and started successfully.----

Now you should be able to visit the admin portal at http://192.168.3.186. 
For more details, please visit https://github.com/goharbor/harbor .

http://192.168.3.186:8858/     admin  123456

4.docker登录

vim /etc/docker/daemon.json

写入

"insecure-registries":["http://192.168.3.186:8858"]

 

[root@localhost harbor]# systemctl daemon-reload
[root@localhost harbor]# systemctl restart docker
#重启harbor
[root@localhost harbor]# docker-compose restart
[+] Running 9/9
 ⠿ Container harbor-log         Started                                                                                                                                              10.8s
 ⠿ Container registryctl        Started                                                                                                                                              10.9s
 ⠿ Container redis              Started                                                                                                                                               0.7s
 ⠿ Container harbor-db          Started                                                                                                                                              10.9s
 ⠿ Container registry           Started                                                                                                                                              11.0s
 ⠿ Container harbor-portal      Started                                                                                                                                               0.7s
 ⠿ Container harbor-core        Started                                                                                                                                               0.4s
 ⠿ Container harbor-jobservice  Started                                                                                                                                               2.6s
 ⠿ Container nginx              Started  

[root@localhost harbor]# docker login http://192.168.3.186:8858
Username: admin
Password: 
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/815452.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

语音转录成文本:AI Transcription for mac

AI Transcription是一种人工智能技术,它可以将音频和视频文件转换成文本格式。这种技术可以帮助用户快速地将大量的音频和视频内容转换成文本格式,方便用户进行文本分析、搜索和编辑等操作。 以下是AI Transcription的几个特点: 高效性。AI …

【每日一题】142. 环形链表 II

【每日一题】142. 环形链表 II 142. 环形链表 II题目描述解题思路 142. 环形链表 II 题目描述 给定一个链表的头节点 head ,返回链表开始入环的第一个节点。 如果链表无环,则返回 null。 如果链表中有某个节点,可以通过连续跟踪 next 指针…

《Java极简设计模式》第02章:抽象工厂模式(AbstractFactoty)

作者:冰河 星球:http://m6z.cn/6aeFbs 博客:https://binghe.gitcode.host 文章汇总:https://binghe.gitcode.host/md/all/all.html 源码地址:https://github.com/binghe001/java-simple-design-patterns/tree/master/j…

【运维】hive 终端突然不能使用:Hive Schema version does not match metastore‘s schema version

文章目录 一. 问题描述二. 常规排查1. 元数据库2. hive-site.xml相关meta连接信息检查 三. 正解 一. 问题描述 进入hive终端,执行如下命令报错: hive> show tables; FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: …

初学HTML:采用CSS绘制一幅夏天的图

下面代码使用了HTML和CSS来绘制一幅炎炎夏日吃西瓜的画面。其中&#xff0c;使用了伪元素和阴影等技巧来实现部分效果。 <!DOCTYPE html> <html> <head><title>炎炎夏日吃西瓜</title><style>body {background-color: #add8e6; /* 背景颜…

浏览器中的自动化操作插件:Automa

相信很多小伙伴跟我一样&#xff0c;每天都有大量基于浏览器的重复操作&#xff0c;比如&#xff1a;查看任务、查看新闻、查看各种每天要关注的内容&#xff0c;甚至可能还需要对其做一些操作。那么这些任务是否有办法自动化执行呢&#xff1f; 今天就给大家推荐一个浏览器扩…

对角线遍历——力扣498

文章目录 题目描述法一 直接模拟 题目描述 法一 直接模拟 class Solution { public:vector<int> findDiagonalOrder(vector<vector<int>>& mat){int mmat.size(), nmat[0].size();vector<int> res;for(int i0;i<mn-1;i){if(i%2){int x i<n …

50家公司Java,C++招聘要求

目录 &#x1f34d;前言 &#x1f34d;总结 &#x1f333;基本要求 &#x1f333;加分项 &#x1f34d;信息 &#x1f442;下一秒&#xff08;电视剧《微微一笑很倾城》插曲&#xff09; - 张碧晨 - 单曲 - 网易云音乐 招聘要求 --> &#x1f34d;信息 &#x1f34d;…

分享一个 VUE 侧边导航共用组建

项目效果图&#xff1a; 项目描述&#xff1a;加载组建时&#xff0c;隐藏&#xff0c;鼠标滑动到指定区域的时候该菜单选中高亮&#xff0c;点击菜单跳转到指定模块&#xff0c;每个页面都适用。 html 部分&#xff1a; 提示&#xff1a;我这里有英文所以有$i18n.localezh…

UniPro助力金融企业数字化转型 强化项目协作与跟踪

根据一份来自Standish Group的研究报告&#xff08;"CHAOS Report"&#xff09;&#xff0c;该报告对美国各行业的项目进行了调查&#xff0c;结果显示仅有不到一半&#xff08;约44%&#xff09;的项目能够成功按时完成&#xff0c;并达到预期的业务目标。其中&…

行云管家荣获CFS第十二届财经峰会 “2023产品科技创新奖”

7月26日至27日&#xff0c;CFS第十二届财经峰会暨2023可持续商业大会在京盛大召开。峰会主题为“激活高质量发展澎湃活力”&#xff0c;超1000位政商领袖、专家学者、企业及媒体代表出席了本次盛会&#xff0c;共同分享新技术新产品新趋势、研判全球新挑战与新变局下企业的机遇…

掌握文件重命名快捷键,使用替换功能轻松删除文件名中的符号!

您是否经常面对繁琐的文件重命名工作&#xff1f;是时候掌握一些文件管理的小技巧&#xff0c;让您的工作更加高效便捷了&#xff01;现在&#xff0c;我们向您介绍一种简单的方法&#xff0c;通过文件重命名快捷键和替换功能&#xff0c;轻松删除文件名中的符号&#xff01; …

【chap6-字符串】用Python3刷《代码随想录》

字符串是由若干字符组成的有限序列&#xff0c;也可以理解为一个字符数组 344. 反转字符串 344. 反转字符串 思路&#xff1a;双指针法。定义两个指针&#xff08;即索引下标&#xff09;&#xff0c;一个从字符串前面&#xff0c;一个从字符串后面&#xff0c;两个指针同时…

机器学习:监督学习、无监督学习、半监督学习、强化学习

1 引言 机器学习是一种人工智能领域的技术&#xff0c;它旨在让计算机通过学习数据和模式&#xff0c;而不是明确地进行编程来完成任务。机器学习分为监督学习&#xff08;Supervised Learning&#xff09;、无监督学习&#xff08;Unsupervised Learning&#xff09;、半监督…

算法笔记(Java)——动态规划

动态规划方法论 动态规划&#xff0c;英文&#xff1a;Dynamic Programming&#xff0c;简称DP&#xff0c;如果某一问题有很多重叠子问题&#xff0c;使用动态规划是最有效的。 所以动态规划中每一个状态一定是由上一个状态推导出来的&#xff0c;这一点就区分于贪心&#x…

网络安全策略应包含哪些?

网络安全策略是保护组织免受网络威胁的关键措施。良好的网络安全策略可以确保数据和系统的保密性、完整性和可用性。以下是一个典型的网络安全策略应包含的几个重要方面&#xff1a; 1. 强化密码策略&#xff1a;采用强密码&#xff0c;要求定期更换密码&#xff0c;并使用多因…

form-data 提交文件请求远程调用

文件请求方法 /*** 上传图文消息内的图片 获取url* 富文本内的图片** param file*/public static String uploadMediaGetUrl(File file) throws IOException {if (!file.exists()) {return null;}String responseData null;try {String url "http://localhost:8503/fil…

Spring Boot集成单元测试调用dao,service

文章目录 Spring Boot集成单元测试调用dao&#xff0c;service1 添加相关依赖2 新建测试类 Spring Boot集成单元测试调用dao&#xff0c;service 1 添加相关依赖 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-st…

VirtualBox配置宿主机和虚拟机网络互通+外网访问

VirtualBox 版本&#xff1a;7.0 虚拟机版本&#xff1a;CentOS-7-x86_64-Everything-1804_2.iso 宿主机版本&#xff1a;Windows 10-21H2 VirtualBox 和 虚拟机安装 省略~ VirtualBox 配置 在虚拟机的【设置】选项中配置两张网卡&#xff0c;图下图所示&#xff0c;网卡一用…

Vue3 基础知识点汇总

1.vue3 基础 1.1vue3基础及创建 npm init vue@latest1.2.熟悉项目目录及关键文字 1.3 组合式API-setup 1.4.组合式 API reactive 和ref 函数 (都是为了生成响应式数据)