1.安装最新版本的docker

更新docker方法:
1.查找主机上关于Docker的软件包
# rpm -qa | grep docker – – 列出包含docker字段的软件的信息2.使用yum remove卸载软件
# yum remove docker-1.13.1-53.git774336d.el7.centos.x86_64
# yum remove docker-client-1.13.1-53.git774336d.el7.centos.x86_64
# yum remove docker-common-1.13.1-53.git774336d.el7.centos.x86_64
在使用docker命令会提示docker不存在3.使用curl升级到最新版
# curl -fsSL https://get.docker.com/ | sh4.重启Docker
# systemctl restart docker

2.安装比较新版本的docker-compose

(1)需要安装docker-compose
curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o/usr/local/bin/docker-compose(2)给docker-compose执行权限,运行命令
chmod +x /usr/local/bin/docker-compose(3)检查运行docker-compose --version,如下:
[root@master ~]# docker-compose --version
version 1.23.2, build 1110ad01

3.修改并准备相关文件

3.1 /usr/local/harbor/harbor.yml

# Configuration file of Harbor# The IP address or hostname to access admin UI and registry service.
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname: 192.168.244.142# http related config
http:# port for http, default is 80. If https enabled, this port will redirect to https portport: 80# https related config
https:# https port for harbor, default is 443port: 8443# The path of cert and key files for nginxcertificate: /data/cert/harbor.crtprivate_key: /data/cert/harbor.key# # Uncomment following will enable tls communication between all harbor components
# internal_tls:
#   # set enabled to true means internal tls is enabled
#   enabled: true
#   # put your cert and key files on dir
#   dir: /etc/harbor/tls/internal# Uncomment external_url if you want to enable external proxy
# And when it enabled the hostname will no longer used
# external_url: https://reg.mydomain.com:8433# The initial password of Harbor admin
# It only works in first time to install harbor
# Remember Change the admin password from UI after launching Harbor.
harbor_admin_password: Harbor12345# Harbor DB configuration
database:# The password for the root user of Harbor DB. Change this before any production use.password: root123# The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained.max_idle_conns: 100# The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections.# Note: the default number of connections is 1024 for postgres of harbor.max_open_conns: 900# The default data volume
data_volume: /data# Harbor Storage settings by default is using /data dir on local filesystem
# Uncomment storage_service setting If you want to using external storage
# storage_service:
#   # ca_bundle is the path to the custom root ca certificate, which will be injected into the truststore
#   # of registry's and chart repository's containers.  This is usually needed when the user hosts a internal storage with self signed certificate.
#   ca_bundle:#   # storage backend, default is filesystem, options include filesystem, azure, gcs, s3, swift and oss
#   # for more info about this configuration please refer https://docs.docker.com/registry/configuration/
#   filesystem:
#     maxthreads: 100
#   # set disable to true when you want to disable registry redirect
#   redirect:
#     disabled: false# Trivy configuration
#
# Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases.
# It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached
# in the local file system. In addition, the database contains the update timestamp so Trivy can detect whether it
# should download a newer version from the Internet or use the cached one. Currently, the database is updated every
# 12 hours and published as a new release to GitHub.
trivy:# ignoreUnfixed The flag to display only fixed vulnerabilitiesignore_unfixed: false# skipUpdate The flag to enable or disable Trivy DB downloads from GitHub## You might want to enable this flag in test or CI/CD environments to avoid GitHub rate limiting issues.# If the flag is enabled you have to download the `trivy-offline.tar.gz` archive manually, extract `trivy.db` and# `metadata.json` files and mount them in the `/home/scanner/.cache/trivy/db` path.skip_update: false## insecure The flag to skip verifying registry certificateinsecure: false# github_token The GitHub access token to download Trivy DB## Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough# for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000# requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult# https://developer.github.com/v3/#rate-limiting## You can create a GitHub token by following the instructions in# https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line## github_token: xxxjobservice:# Maximum number of job workers in job servicemax_job_workers: 10notification:# Maximum retry count for webhook jobwebhook_job_max_retry: 10chart:# Change the value of absolute_url to enabled can enable absolute url in chartabsolute_url: disabled# Log configurations
log:# options are debug, info, warning, error, fatallevel: info# configs for logs in local storagelocal:# Log files are rotated log_rotate_count times before being removed. If count is 0, old versions are removed rather than rotated.rotate_count: 50# Log files are rotated only if they grow bigger than log_rotate_size bytes. If size is followed by k, the size is assumed to be in kilobytes.# If the M is used, the size is in megabytes, and if G is used, the size is in gigabytes. So size 100, size 100k, size 100M and size 100G# are all valid.rotate_size: 200M# The directory on your host that store loglocation: /var/log/harbor# Uncomment following lines to enable external syslog endpoint.# external_endpoint:#   # protocol used to transmit log to external endpoint, options is tcp or udp#   protocol: tcp#   # The host of external endpoint#   host: localhost#   # Port of external endpoint#   port: 5140#This attribute is for migrator to detect the version of the .cfg file, DO NOT MODIFY!
_version: 2.3.0# Uncomment external_database if using external database.
# external_database:
#   harbor:
#     host: harbor_db_host
#     port: harbor_db_port
#     db_name: harbor_db_name
#     username: harbor_db_username
#     password: harbor_db_password
#     ssl_mode: disable
#     max_idle_conns: 2
#     max_open_conns: 0
#   notary_signer:
#     host: notary_signer_db_host
#     port: notary_signer_db_port
#     db_name: notary_signer_db_name
#     username: notary_signer_db_username
#     password: notary_signer_db_password
#     ssl_mode: disable
#   notary_server:
#     host: notary_server_db_host
#     port: notary_server_db_port
#     db_name: notary_server_db_name
#     username: notary_server_db_username
#     password: notary_server_db_password
#     ssl_mode: disable# Uncomment external_redis if using external Redis server
# external_redis:
#   # support redis, redis+sentinel
#   # host for redis: <host_redis>:<port_redis>
#   # host for redis+sentinel:
#   #  <host_sentinel1>:<port_sentinel1>,<host_sentinel2>:<port_sentinel2>,<host_sentinel3>:<port_sentinel3>
#   host: redis:6379
#   password:
#   # sentinel_master_set must be set to support redis+sentinel
#   #sentinel_master_set:
#   # db_index 0 is for core, it's unchangeable
#   registry_db_index: 1
#   jobservice_db_index: 2
#   chartmuseum_db_index: 3
#   trivy_db_index: 5
#   idle_timeout_seconds: 30# Uncomment uaa for trusting the certificate of uaa instance that is hosted via self-signed cert.
# uaa:
#   ca_file: /path/to/ca# Global proxy
# Config http proxy for components, e.g. http://my.proxy.com:3128
# Components doesn't need to connect to each others via http proxy.
# Remove component from `components` array if want disable proxy
# for it. If you want use proxy for replication, MUST enable proxy
# for core and jobservice, and set `http_proxy` and `https_proxy`.
# Add domain to the `no_proxy` field, when you want disable proxy
# for some special registry.
proxy:http_proxy:https_proxy:no_proxy:components:- core- jobservice- trivy# metric:
#   enabled: false
#   port: 9090
#   path: /metrics

3.2 /data/cert/harbor.crt

[root@wknode harbor]# more /data/cert/harbor.crt
-----BEGIN CERTIFICATE-----
MIIDMjCCAhoCCQCiqUaZA5xeMTANBgkqhkiG9w0BAQsFADBbMQswCQYDVQQGEwJD
TjELMAkGA1UECAwCSlMxCzAJBgNVBAcMAldYMQwwCgYDVQQKDAN6d3gxDTALBgNV
BAsMBGpobXkxFTATBgNVBAMMDGh1Yi5qaG15LmNvbTAeFw0yMjAyMjIwNTQ3NTda
Fw0yMzAyMjIwNTQ3NTdaMFsxCzAJBgNVBAYTAkNOMQswCQYDVQQIDAJKUzELMAkG
A1UEBwwCV1gxDDAKBgNVBAoMA3p3eDENMAsGA1UECwwEamhteTEVMBMGA1UEAwwM
aHViLmpobXkuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx13G
8daXfwY/Jf41As/4F2/fEEzpLo1w88B0ZPgQTvi/UbMuXYBbdkmO0vdMdnZExKxe
Uwp+g6HSnosNqeIN4JQEhFaCG16s0wOSQ5iQqf960D3lDxWi+Sy/cAIjD65C3Rj+
sASStBbsFaAq89+T4BCPpn86SkoT7H3DlEosOlhVrmqNTJfZozbSjtulAKZZ3jkj
oph9P2Htj3yPMMC4FvelPzL5zAOcmFlqXArPJlWYKDdxBBhBj/Ld4k5C10U2kauI
V9BLhbeSb0bn2/9ga1rKDwlSkyXxZ55Il/35nClUgnHFDonoBe5O/nXBl0stcGXy
vlor3GvTvxl+SzPRxQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBWA3SNtxALBQZL
aayz+3Btrn4vD4HE+WYh8eD5T7boz1BWUEvGpbERJGIj3wJvkL9g9KoSgpMP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3ZG
6HsbYIERAoGBAPTEBvE/dzhMg33p76qeph6957CuRPd2fdnuFp5jXnlXvUwf5Ok2
SZPmEgLFuX1mineMeHAVuVZeT4HHIuVh2cGebEuVQiWLzXsJ2ZCVnh2wm+wDFLVt
4SSNaebmMzjqv5G+QKs859h51aGmRpYbhugkkMevXwu6NTxRlcIjM9urAoGBANCE
T7npDqtdnGLTjmFvtlYYEyEKu5Yk20YVu5HnBqqYVFU8ZmG4FKA8Py9kTfgN3cXt
xgsV222jRQxzrnxafmsCz3xm+EIwoaDLwVWOY0wdESk1Z/Gm3PcbFIwH0ESkE5br
TJqQudOtB5vsOu59D5qJOoFqru9B2jBj/DOx0RhPAoGAN6umUJS4zwtIFQlyQ4JW
EkPrQJpCgW5n7XtjlZ7QTBUSrw/KBukcDxGTIyJJsCX0dIB0nDm0r9o/hyr92uJI
nusjgoVuSA/mKofw/hupnOMgc6u3uBRH0wJ/Bc9x8w4hiEqXdtsheHEtj9i70URt
iLtYWrKekZJGrXN49nD/SIUCgYAlyeS893yeF8/wpRBnnhw4TBKjaVOHqVRHxkaA
8ZJmtkaKT/DqArdSNrjouM/chX7MkQPUHHjwzKcF060qgifo8tBxZiPVswSHpIV8
INrj/1yN0EzvIWNoMPMvUXcwCWA3eJsgY9wZfYEkg9JGSEncosQEkjXzzEZjgKtD
HxWaxwKBgQDxrqaV7s+kGZHwRqyMjGPzxsOkmtc/YbtN7X4XDE1Sj2PnIVjOmvTz
VHYa81oLwwgSTXuEYyDDdqvPFdwGmaq3weLqshwZYnO58vRUs7GiPNCO7Vw13eG+
6tsslAE8UHpMvxDYTvWsnYBJpZCrjgiGogYJqZynLoDKUqIWa8FcEQ==
-----END RSA PRIVATE KEY-----

3.4 /etc/docker/daemon.conf

[root@wknode harbor]# more /etc/docker/daemon.conf
{"registry-mirrors": ["https://registry.docker-cn.com","https://y4xpdpoy.mirror.aliyuncs.com"],"insecure-registries": [ "192.168.244.142:8443" ]
}[root@wknode harbor]#

4.安装与登录

base路径是:/usr/local/harbor

4.1 执行./prepare

4.2  执行./install.sh

4.3 登录选择accpet the risk and continue

https://192.168.244.142:8443/harbor/projects (8443这个端口地图忘截了,暂时用 443端口这个旧图代替下)

4.4 看图好了

4.5 终端登录一下harbor

[root@wknode harbor]# docker  login https://192.168.244.142:8443/harbor -uadmin
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-storeLogin Succeeded
[root@wknode harbor]# 

安装HARBOR-v2.3.5相关推荐

  1. 简单安装Harbor私有镜像仓库

    安装准备 Docker 17.06.0-ce+ Docker-compose 1.18.0+ 安装Docker 安装工具 yum install -y yum-utils device-mapper- ...

  2. docker harbor 域名_docker 安装Harbor

    docker 安装harbor 1.下载镜像依赖docker pull vmware/harbor-jobservice:v1.1.2 docker pull vmware/harbor-ui:v1. ...

  3. 在kubernetes集群用helm离线安装harbor

    背景说明 在公司内部局域网环境kubernetes集群(未连接互联网)通过helm离线安装harbor 实施步骤 一.kubernetes集群安装helm(已安装的直接跳过此节) 1. 关于helm ...

  4. dashboard 安装harbor

    Kubernetes-dashboard: (所有节点)下载镜像: docker pull kubernetesui/dashboard:v2.0.3 docker pull kubernetesui ...

  5. 【三】K8s安装-Harbor搭建

    一.硬件要求 硬件资源 最低配置 推荐配置 处理器 2 4 CPU 4 8 硬件 40 160 二.软件要求 软件 版本 描述 Docker-engine v17.06.1-ce 或更高版本 有关安装 ...

  6. Linux 安装Harbor镜像仓库,最新教程,细到极致

      大家下午好,今天给大家带来的是Docker镜像仓库Harbor的安装,希望能给大家带来一点帮助   闲话不说了,开始安装 1.首先下载安装包,官网下载地址是:Harbor下载 2.上传安装包 [r ...

  7. Kubernetes - - k8s - v1.12.3 使用Helm安装harbor

    1,Helm 介绍 核心术语: Chart:一个helm程序包 Repository:Charts仓库,https/http 服务器 Release:特定的Chart部署与目标集群上的一个实例 Cha ...

  8. Linux在线安装harbor镜像仓库

    前言 在之前的文章中已经搭建好了k8s集群跟KubeSphere的可视化系统,但是在实际应用上我们服务的镜像推送都需要在集群的所有节点上手动进行docker build,非常不方便.所以我们需要一个私 ...

  9. IDEA 安装JUnitGenerator V2.0 插件 帮助生成单元测试

    IDAE作为一款智能的开发工具,便利的插件丰富,提高我们的开发效率,作为后台开发人员,单元测试是必不可少的,服务层呢么多的方法要一个一个去写单元测试方法?NO!我们可以使用JUnitGenerator ...

  10. CentOS7安装harbor仓库+修改默认用户+仓库登录报错

    Docker安装和简单的使用_hrj的博客-CSDN博客 下面 搭建harbor仓库 1.安装docker-compose Linux 上我们可以从 Github 上下载它的二进制包来使用,最新发行的 ...

最新文章

  1. Dell PowerVault TL4000 磁带机卡带问题
  2. “Hey Siri” 背后的黑科技大揭秘!
  3. 如何评判一个深度学习框架?
  4. Python-SQLAlchemy:第4节:级联
  5. 谈点技术吧,6万人在线每秒实时更新的解决方案
  6. Anaconda安装找不到的依赖包,以DBUtils包为例
  7. 做了5年程序员才明白,这项能力原来这么重要
  8. 20100823工作记录
  9. 2021-01-11
  10. javaweb项目通过F5负载,获取客户端真实ip
  11. 计算机需要无线网卡进行网络连,电脑连接无线网络时,提示"你没有首选无线网络"怎么办...
  12. 瑞晟蓝牙来电语音软件下载_语音导出app手机最新版-语音导出app安卓免费版下载v8.3-领航下载站...
  13. layedit html源码编辑,Kz.layedit-layui.layedit富文本编辑器拓展
  14. 句子迷 APP,MVP 架构,Okhttp + Retrofit + RxJava,图片加载 Glide,数据库 Object-box
  15. java caller_java中callee获取caller
  16. DPC(Defect Pixel Correction)——坏点检测
  17. java架构模式与设计模式(四)--事件风暴
  18. 多年前的我,一如既往
  19. 用于 CPX、CPX-VF 和 CRX-VF 探针台的新手提箱选项
  20. Xml和Json之间相互转化知多少?

热门文章

  1. 使用C++中类和指针进行记账系统的设计
  2. win10 休眠不读u盘_Win10系统下U盘不能读写怎么办?
  3. 结构型-享元模式-02-实例实现(围棋)
  4. excel打开空白不显示内容
  5. Navicat 导出链接中获取密码
  6. com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not?
  7. android 刷第三方recovery
  8. Linux服务器系统
  9. (2356)忙里偷闲-封装汇编编写的水波特效供C++调用
  10. 注册域名时的注意事项有哪些?