Get the App
SLTechnology News&Howtos  ›  Servers  › 

Deploy harbor (centos-7) https connection method

Shulou Source: shulou.com Published: 2022-06-02 07:15:39 11月12日 Update

Harbor is an enterprise-class Registry server for storing and distributing Docker images

Deployment guide refer to the official website: https://github.com/goharbor/harbor/blob/master/docs/installation_guide.md

Hardware requirements:

Resource Capacity Description

CPU 2CPU 4CPU is preferred

Mem 4GB 8GB is preferred

Disk 40GB 160GB is preferred

Software requirements

Software Version

Python version 2.7or higher (included)

Docker engine version 1.10 or higher

Docker Compose version 1.6.0 or higher

Openssl latest latest (built-in)

1. Install docker "docker compose"

Install docker refer to my other article (https://blog.51cto.com/9406836/2314122)

Install docker compose

Sudo curl-L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname-s)-$(uname-m)"-o / usr/local/bin/docker-compose

Sudo chmod + x / usr/local/bin/docker-compose

two。 Download the harbor offline installation package

Mkdir / harbor

Cd / harbor

Wget https://storage.googleapis.com/harbor-releases/harbor-offline-installer-v1.5.4.tgz

Tar xvf harbor-offline-installer-v1.5.4.tgz

Cd harbor

3. Generate the secret key using openssl

3.1 generate a self-signed certificate and a private key. (this step is repeated with the next step, because I re-authorized it as CA.)

Mkdir / pri

Cd / pri

Openssl req-new-newkey rsa:2048-nodes-keyout ca.key-x509-days 365-out ca.crt

/ C=CN

/ ST=GUANGDONG

/ L=SZ

/ O=example

/ OU=Personal

/ CN=yourdomain.com

#-newkey generates private key-node does not encrypt-keyout generates private key-x509 certificate structure file-out generates public key-days validity time

3.2Editing the certificate extension file v3.ext (the main purpose is to add multi-domain name authentication, for example, under the google.com certificate, you can associate trust certificates such as youku.com)

Cat > v3.ext

Tags: Certificate generation server service file authentication host password user user name visa structure mirror reference login configuration valid misleading children enterprise location Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi vpn NVidia Linux Shulou Information