当前位置: 首页 > news >正文

安装harbor

目录

1. 安装docker-compose


Compose 项目是 Docker 官方的开源项目,负责实现对 Docker 容器集群的快速编排。使用前面介绍的Dockerfile我们很容易定义一个单独的应用容器。然而在日常开发工作中,经常会碰到需要多个容器相互配合来完成某项任务的情况。例如要实现一个 Web 项目,除了 Web 服务容器本身,往往还需要再加上后端的数据库服务容器;再比如在分布式应用一般包含若干个服务,每个服务一般都会部署多个实例。如果每个服务都要手动启停,那么效率之低、维护量之大可想而知。这时候就需要一个工具能够管理一组相关联的的应用容器,这就是Docker Compose。

  • 下载最新docker-compose地址

  • 拖至root文件夹下,执行一下文件

# 修改名称
mv docker-compose-linux-x86_64 docker-compose
#复制到 /usr/local/bin/
cp -r docker-compose /usr/local/bin
#切换到该目录下
cd /usr/local/bin
#添加权限
sudo chmod +x /usr/local/bin/docker-compose
#查看docker-compose版本(出现版本号,表示安装成功)
docker-compose -v

在这里插入图片描述

2. 安装harbor

Harbor是一个用于存储和分发Docker镜像的企业级Registry服务器,通过添加一些企业必需的功能特性,例如安全、标识和管理等,扩展了开源Docker Distribution。作为一个企业级私有Registry服务器,Harbor提供了更好的性能和安全。提升用户使用Registry构建和运行环境传输镜像的效率。Harbor支持安装在多个Registry节点的镜像资源复制,镜像全部保存在私有Registry中, 确保数据和知识产权在公司内部网络中管控。另外,Harbor也提供了高级的安全特性,诸如用户管理,访问控制和活动审计等,下面进行Harbor的安装实战。

  • 下载harbor

在这里插入图片描述

  • 执行如下命令
# 解压到对应的文件夹下
tar -zxvf harbor-offline-installer-v2.8.3.tgz -C /usr/local
# 切换到该目录下
cd /usr/local/harbor
# 复制出来配置文件
cp harbor.yml.tmpl harbor.yml
# 修改端口号;修改端口,不要重复;注释https内容
vi harbor.yml
# 在该目录执行启动命令
./install.sh

在这里插入图片描述

# harbor启动成功,打印日内容下。(执行命令后,要稍微等一会才会出现下面的日志)
[root@k8s-node harbor]# ./install.sh [Step 0]: checking if docker is installed ...Note: docker version: 20.10.20[Step 1]: checking docker-compose is installed ...Note: docker-compose version: 2.20.2[Step 2]: loading Harbor images ...
0c3d3de3a100: Loading layer  38.43MB/38.43MB
176a9faee2d2: Loading layer  6.176MB/6.176MB
7533b07674a0: Loading layer  4.096kB/4.096kB
9ab27df52911: Loading layer  3.072kB/3.072kB
457b8a810324: Loading layer  17.57MB/17.57MB
8ade677a8a4b: Loading layer  18.36MB/18.36MB
Loaded image: goharbor/registry-photon:v2.8.3
ae6af9dcdf7c: Loading layer  6.171MB/6.171MB
d9b2d282124e: Loading layer  9.098MB/9.098MB
71d01ecf12a5: Loading layer  15.88MB/15.88MB
a93bf4c4de26: Loading layer  29.29MB/29.29MB
d6ccdcf712be: Loading layer  22.02kB/22.02kB
20d0340657f4: Loading layer  15.88MB/15.88MB
Loaded image: goharbor/notary-server-photon:v2.8.3
7076e9de5fb2: Loading layer  6.171MB/6.171MB
06edddd4eeea: Loading layer  9.098MB/9.098MB
4c8df5f33db0: Loading layer  14.47MB/14.47MB
7bf292abe752: Loading layer  29.29MB/29.29MB
ac4de38627ae: Loading layer  22.02kB/22.02kB
687c00954816: Loading layer  14.47MB/14.47MB
Loaded image: goharbor/notary-signer-photon:v2.8.3
ab5bc430313c: Loading layer  90.16MB/90.16MB
dc3ba398e48c: Loading layer  3.584kB/3.584kB
d26b379ad813: Loading layer  3.072kB/3.072kB
93e3e2322706: Loading layer   2.56kB/2.56kB
0bf9c54793f1: Loading layer  3.072kB/3.072kB
2742f8f52b00: Loading layer  3.584kB/3.584kB
299dda8831bd: Loading layer  20.48kB/20.48kB
Loaded image: goharbor/harbor-log:v2.8.3
02ddc8ed9baf: Loading layer   85.6MB/85.6MB
377838d34c47: Loading layer  3.072kB/3.072kB
1bda8bcd6461: Loading layer   59.9kB/59.9kB
90ea325b2c6d: Loading layer  61.95kB/61.95kB
Loaded image: goharbor/redis-photon:v2.8.3
3996ab5000eb: Loading layer  9.188MB/9.188MB
03553e550818: Loading layer  3.584kB/3.584kB
9f2717a623b0: Loading layer   2.56kB/2.56kB
ce715e5a53cf: Loading layer  47.46MB/47.46MB
9505353423e5: Loading layer  48.25MB/48.25MB
Loaded image: goharbor/harbor-jobservice:v2.8.3
a558d1ee4c57: Loading layer  72.76MB/72.76MB
737b36f453c0: Loading layer  38.63MB/38.63MB
62e5d1841e72: Loading layer  19.93MB/19.93MB
0892d5f92493: Loading layer  65.54kB/65.54kB
9c6cbb44da28: Loading layer   2.56kB/2.56kB
29bb9597a5c7: Loading layer  1.536kB/1.536kB
a4a95076ba9e: Loading layer  12.29kB/12.29kB
17f763aeb83a: Loading layer  2.123MB/2.123MB
69aecf98c0b8: Loading layer  416.8kB/416.8kB
Loaded image: goharbor/prepare:v2.8.3
b99dc282b3c7: Loading layer  9.188MB/9.188MB
786372442d5c: Loading layer  3.584kB/3.584kB
c95eff9c3c92: Loading layer   2.56kB/2.56kB
69a6620f70fd: Loading layer  59.22MB/59.22MB
faee135ed65a: Loading layer  5.632kB/5.632kB
b8228ebe38a4: Loading layer  116.7kB/116.7kB
e2db669e8a7c: Loading layer  44.03kB/44.03kB
1d973fccb394: Loading layer  60.17MB/60.17MB
747dd0c43ef1: Loading layer   2.56kB/2.56kB
Loaded image: goharbor/harbor-core:v2.8.3
1122996461e4: Loading layer  6.176MB/6.176MB
c11d210da0c1: Loading layer  4.096kB/4.096kB
7abff3111e9b: Loading layer  17.57MB/17.57MB
569fe4e2f2c9: Loading layer  3.072kB/3.072kB
bca259d7c630: Loading layer  31.01MB/31.01MB
2dda2be83cfd: Loading layer  49.37MB/49.37MB
Loaded image: goharbor/harbor-registryctl:v2.8.3
825a82984415: Loading layer  82.12MB/82.12MB
Loaded image: goharbor/nginx-photon:v2.8.3
39074d649f8c: Loading layer  6.707MB/6.707MB
688b64470d74: Loading layer  4.096kB/4.096kB
320f85b1e3eb: Loading layer  3.072kB/3.072kB
dde1dfb74607: Loading layer  194.8MB/194.8MB
229337a9e8cc: Loading layer   14.1MB/14.1MB
8c74af69019d: Loading layer  209.7MB/209.7MB
Loaded image: goharbor/trivy-adapter-photon:v2.8.3
74b07281d2e5: Loading layer  82.12MB/82.12MB
751e146c3c0f: Loading layer    6.1MB/6.1MB
2cbfa90aca6d: Loading layer  1.233MB/1.233MB
Loaded image: goharbor/harbor-portal:v2.8.3
3a8f210ea3e0: Loading layer  116.2MB/116.2MB
06434a1eae73: Loading layer  25.18MB/25.18MB
0923361e26b9: Loading layer   5.12kB/5.12kB
e4658596b9ef: Loading layer  6.144kB/6.144kB
350bc2e11862: Loading layer  3.072kB/3.072kB
54847be3f348: Loading layer  2.048kB/2.048kB
67296b765de0: Loading layer   2.56kB/2.56kB
136c1f931ee8: Loading layer   2.56kB/2.56kB
c44a36e8102e: Loading layer   2.56kB/2.56kB
60bcea6b0ccb: Loading layer  9.728kB/9.728kB
Loaded image: goharbor/harbor-db:v2.8.3
85c2b8de0e50: Loading layer  9.188MB/9.188MB
1fd29ea96459: Loading layer  26.04MB/26.04MB
9154b665386d: Loading layer  4.608kB/4.608kB
9e173c1e037d: Loading layer  26.83MB/26.83MB
Loaded image: goharbor/harbor-exporter:v2.8.3[Step 3]: preparing environment ...[Step 4]: preparing harbor configs ...
prepare base dir is set to /usr/local/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/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 dirNote: stopping existing Harbor instance ...[Step 5]: starting Harbor ...
[+] Running 10/10✔ Network harbor_harbor        Created                                                   0.1s ✔ Container harbor-log         Started                                                   1.3s ✔ Container harbor-portal      Started                                                   2.9s ✔ Container redis              Started                                                   2.8s ✔ Container registryctl        Started                                                   2.7s ✔ Container registry           Started                                                   3.1s ✔ Container harbor-db          Started                                                   2.9s ✔ Container harbor-core        Started                                                   3.7s ✔ Container harbor-jobservice  Started                                                   4.9s ✔ Container nginx              Started                                                   4.9s 
✔ ----Harbor has been installed and started successfully.----
  • 访问

IP地址+配置的端口号
账号:admin
密码:Harbor12345在这里插入图片描述

相关文章:

安装harbor

目录 1. 安装docker-compose Compose 项目是 Docker 官方的开源项目,负责实现对 Docker 容器集群的快速编排。使用前面介绍的Dockerfile我们很容易定义一个单独的应用容器。然而在日常开发工作中,经常会碰到需要多个容器相互配合来完成某项任务的情况。例…...

kube-prometheus 使用 blackbox-exporter 进行icmp 监控

安装kube-prometheus 后默认在monitoring namespace中有创建 blackbox-exporter deployment。但默认没有icmp的module配置,无法执行ping探测。因为即使有icmp module,默认配置也是无法执行ping探测的(这篇文章要解决的就是这个问题&#xff0…...

【python技巧】文本文件的读写操作

【python技巧】文本文件的读写操作 0. 背景1. file库的文件操作1.1 打开文件---file.open()1.2 读取文件---file.read()1.3 写入文件---file.write()1.4 查找内容---file.seek() 2. re库的文本处理参考资料 0. 背景 最近在写后端接口的时候,需要对.c、.conf等类型的…...

SpringBoot项目(验证码整合)——springboot整合email springboot整合阿里云短信服务

目录 引出springboot整合email配置邮箱导入依赖application.yml配置email业务类测试类 springboot整合阿里云短信服务申请阿里云短信服务测试短信服务获取阿里云的accessKeyspringboot整合阿里云短信导包工具类 总结 引出 1.springboot整合email,qq邮箱,…...

缓存穿透,击穿,雪崩之间的区别与联系

1、缓存数据基本流程 通常来说,我们是从数据库将数据查询出来之后,如果数据不为空,则将数据存储在缓存中,下次查询时就直接从缓存查询了,只有查询不到才会从数据库查询。 2、缓存穿透 核心在穿透两个字,穿透了,就说明在查询数据时没有遇到阻碍,直接就查询到了数据库。…...

Vue项目npm run dev 启动报错TypeError: Cannot read property ‘upgrade‘ of undefined

vue项目启动报错 TypeError: Cannot read property upgrade of undefined 由于我的vue.config.js文件 里面的代理target为空导致的 修改: 结果就可以正常运行了 参考原文: vue项目运行时报Cannot read property ‘upgrade’ of undefined错误_cannot r…...

dji uav建图导航系列(二)导航

文章目录 1、导航节点launch文件1.1、节点参数1.2、模拟器节点1.3、无人机雷达-底盘节点1.4、地图服务器节点1.5、AMCL节点1.6、move_base节点1.7、rviz可视化节点2、导航测试2.1、导航实测2.2、动态参数配置 rqt_reconfigure1、导航节点launch文件 导航节点启动文件 uav_navi…...

24.Netty源码之合理管理堆内存

highlight: arduino-light 合理管理 Netty 堆外内存 内存使用目标 •内存占用少(空间) •应用速度快(时间) 即多快好省 对 Java 而言:减少 Full GC 的 STW(Stop the world)时间 内存使用技巧 • 减少对象本身大小 md 例 1:用基本类型就不要用包装类。 例…...

如何自学(黑客)网络安全

前言: 想自学网络安全(黑客技术)首先你得了解什么是网络安全!什么是黑客! 网络安全可以基于攻击和防御视角来分类,我们经常听到的 “红队”、“渗透测试” 等就是研究攻击技术,而“蓝队”、“…...

【vue】vue基础知识

1、插值表达式&属性绑定 <!--template展示给用户&#xff0c;相当于MVVM模式中的V--> <template><div class"first_div">//插值表达式<p>{{ message }}</p>//这里的参数是从父组件的template里传过来的<p>{{data_1}}</p…...

第一百一十一回 如何实现屏幕适配

文章目录 概念介绍实现方法示例代码 我们在上一章回中介绍了动画相关的内容&#xff0c;本章回中将介绍 如何适配屏幕.闲话休提&#xff0c;让我们一起Talk Flutter吧。 概念介绍 我们平常使用的手机屏幕大小不同&#xff0c;App运行在这些大小不同的屏幕上时效果却相同&…...

免费实用的日记应用:Day One for Mac中文版

Day One for Mac是一款运行在Mac平台上的日记软件&#xff0c;你可以使用Day One for mac通过快速菜单栏条目、提醒系统和鼓舞人心的信息来编写更多内容&#xff0c;day one mac版还支持Dropbox同步功能&#xff0c;想要day one mac中文免费版的朋友赶紧来试试吧&#xff01; …...

HCIP的BGP基础实验

一、实验需求 除R5的5.5.5.0环回外&#xff0c;其他所有的环回均可互相一访问。 二、实验步骤 1.配置ip 2.建立邻居关系 2.1 R1和R2建立直连的EBGP邻居关系 [r1]bgp 1 [r1-bgp]router-id 1.1.1.1 [r1-bgp]peer 12.1.1.2 as-number 2 要建的话双方都要建下面配置R2 [r2]bgp…...

centos7编译安装升级python3.11

编译安装python3.11 准备步骤解压编译替换升级 准备步骤 yum -y install gcc zlib zlib-devel libffi libffi-devel bzip2-devel yum -y install openssl-devel openssl11 openssl11-devel yum -y install readline-devel解压编译 wget https://www.python.org/ftp/python/3.…...

win10安装mysql和c++读取调用举例

一、下载mysql8.rar解压到C盘(也可以解压到其他位置) 在系统环境变量添加JAVA_HOMEC:\myslq8&#xff0c;并在path中添加%JAVA_HOME%\bin; 二、以管理员身份进入命令窗口 三、修改配置文件指定安装路径和数据库的存放路径 四、键入如下命令初始化并启动mysql服务,然后修改登录…...

计算机竞赛 opencv python 深度学习垃圾图像分类系统

0 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; opencv python 深度学习垃圾分类系统 &#x1f947;学长这里给一个题目综合评分(每项满分5分) 难度系数&#xff1a;3分工作量&#xff1a;3分创新点&#xff1a;4分 这是一个较为新颖的竞…...

通讯协议037——全网独有的OPC HDA知识一之聚合(六)实际时间最小值

本文简单介绍OPC HDA规范的基本概念&#xff0c;更多通信资源请登录网信智汇(wangxinzhihui.com)。 本节旨在详细说明HDA聚合的要求和性能。其目的是使HDA聚合标准化&#xff0c;以便HDA客户端能够可靠地预测聚合计算的结果并理解其含义。如果用户需要聚合中的自定义功能&…...

【Freertos基础入门】freertos任务的优先级

文章目录 前言一、任务优先级1.Tick2.修改任务优先级 总结 前言 本系列基于stm32系列单片机来使用freerots 任务管理是实时操作系统&#xff08;RTOS&#xff09;的核心功能之一&#xff0c;它允许开发者以并发的方式组织和管理多个任务。FreeRTOS 是一个流行的开源RTOS&…...

【报错】ModuleNotFoundError: No module named ‘websocket‘

1 报错 ModuleNotFoundError: No module named websocket 2 解决方法 pip install websocket 1 报错 AttributeError: module websocket has no attribute enableTrace 2 分析 一般是由于websocket的依赖包没有安装造成的。websocket.enableTrace()方法是在websocket-cli…...

[Leetcode] [Tutorial] 多维动态规划

文章目录 62. 不同路径Solution 62. 不同路径 一个机器人位于一个 m ∗ * ∗ n 网格的左上角 &#xff08;起始点在下图中标记为 “Start” &#xff09;。 机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角。 问总共有多少条不同的路径&#xff1f; 示例…...

Python爬虫实战:研究MechanicalSoup库相关技术

一、MechanicalSoup 库概述 1.1 库简介 MechanicalSoup 是一个 Python 库,专为自动化交互网站而设计。它结合了 requests 的 HTTP 请求能力和 BeautifulSoup 的 HTML 解析能力,提供了直观的 API,让我们可以像人类用户一样浏览网页、填写表单和提交请求。 1.2 主要功能特点…...

观成科技:隐蔽隧道工具Ligolo-ng加密流量分析

1.工具介绍 Ligolo-ng是一款由go编写的高效隧道工具&#xff0c;该工具基于TUN接口实现其功能&#xff0c;利用反向TCP/TLS连接建立一条隐蔽的通信信道&#xff0c;支持使用Let’s Encrypt自动生成证书。Ligolo-ng的通信隐蔽性体现在其支持多种连接方式&#xff0c;适应复杂网…...

Python:操作 Excel 折叠

💖亲爱的技术爱好者们,热烈欢迎来到 Kant2048 的博客!我是 Thomas Kant,很开心能在CSDN上与你们相遇~💖 本博客的精华专栏: 【自动化测试】 【测试经验】 【人工智能】 【Python】 Python 操作 Excel 系列 读取单元格数据按行写入设置行高和列宽自动调整行高和列宽水平…...

3.3.1_1 检错编码(奇偶校验码)

从这节课开始&#xff0c;我们会探讨数据链路层的差错控制功能&#xff0c;差错控制功能的主要目标是要发现并且解决一个帧内部的位错误&#xff0c;我们需要使用特殊的编码技术去发现帧内部的位错误&#xff0c;当我们发现位错误之后&#xff0c;通常来说有两种解决方案。第一…...

无法与IP建立连接,未能下载VSCode服务器

如题&#xff0c;在远程连接服务器的时候突然遇到了这个提示。 查阅了一圈&#xff0c;发现是VSCode版本自动更新惹的祸&#xff01;&#xff01;&#xff01; 在VSCode的帮助->关于这里发现前几天VSCode自动更新了&#xff0c;我的版本号变成了1.100.3 才导致了远程连接出…...

使用分级同态加密防御梯度泄漏

抽象 联邦学习 &#xff08;FL&#xff09; 支持跨分布式客户端进行协作模型训练&#xff0c;而无需共享原始数据&#xff0c;这使其成为在互联和自动驾驶汽车 &#xff08;CAV&#xff09; 等领域保护隐私的机器学习的一种很有前途的方法。然而&#xff0c;最近的研究表明&…...

srs linux

下载编译运行 git clone https:///ossrs/srs.git ./configure --h265on make 编译完成后即可启动SRS # 启动 ./objs/srs -c conf/srs.conf # 查看日志 tail -n 30 -f ./objs/srs.log 开放端口 默认RTMP接收推流端口是1935&#xff0c;SRS管理页面端口是8080&#xff0c;可…...

什么?连接服务器也能可视化显示界面?:基于X11 Forwarding + CentOS + MobaXterm实战指南

文章目录 什么是X11?环境准备实战步骤1️⃣ 服务器端配置(CentOS)2️⃣ 客户端配置(MobaXterm)3️⃣ 验证X11 Forwarding4️⃣ 运行自定义GUI程序(Python示例)5️⃣ 成功效果![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/55aefaea8a9f477e86d065227851fe3d.pn…...

Redis数据倾斜问题解决

Redis 数据倾斜问题解析与解决方案 什么是 Redis 数据倾斜 Redis 数据倾斜指的是在 Redis 集群中&#xff0c;部分节点存储的数据量或访问量远高于其他节点&#xff0c;导致这些节点负载过高&#xff0c;影响整体性能。 数据倾斜的主要表现 部分节点内存使用率远高于其他节…...

企业如何增强终端安全?

在数字化转型加速的今天&#xff0c;企业的业务运行越来越依赖于终端设备。从员工的笔记本电脑、智能手机&#xff0c;到工厂里的物联网设备、智能传感器&#xff0c;这些终端构成了企业与外部世界连接的 “神经末梢”。然而&#xff0c;随着远程办公的常态化和设备接入的爆炸式…...