码农街博客

不忘初心,牢记使命

Linux 快速安装Harbor

一、前提条件

已安装docker和docker-compose 电梯直达: yum下docker安装教程 pip安装docker-compose

二、解压harbor 离线包

$ curl -O https://github.com/goharbor/harbor/releases/download/v2.2.2/harbor-offline-installer-v2.2.2.tgz
$ tar -zxvf harbor-offline-installer-v2.2.2.tgz
$ cd harbor

三、修改 harbor.yml hostname配置

$ vi harbor.yml

一般修改 ”hostname“、”http.port“ 需要https则配置”https“,不需要需要则注释

# 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.1.101

# http related config
http:
 # port for http, default is 80. If https enabled, this port will redirect to https port
 port: 80

# https related config
#https:
 # https port for harbor, default is 443
#  port: 443
 # The path of cert and key files for nginx
#  certificate: /your/certificate/path
#  private_key: /your/private/key/path

# # 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

四、执行安装

$ ./prepare
$ ./install.sh

五、访问

访问你所配置的 http(s)://hostname:port 我这里就是 http://192.168.1.101 默认账号/密码:

admin/Harbor

点赞

本文标签: linuxharbor

版权声明:本博客所有文章除特别声明外,本文皆为《githubwyj》原创,转载请保留文章出处。

本文链接:Linux 快速安装Harbor - https://www.mnjblog.cn/article/65