【教程】安装Harbor


前置准备

安装

下载 Linux 离线安装包

cd /tmp

wget https://github.com/goharbor/harbor/releases/download/v2.14.0/harbor-offline-installer-v2.14.0.tgz

tar -zxvf harbor-offline-installer-*.tgz 

cd ./harbor

启动

cp harbor.yml.tmpl harbor.yml
vim harbor.yml
#修改hostname的值,如果没有域名就使用本机IP地址
hostname: 192.168.2.122

#配置启动端口号
# http related config 
http:
  # port for http, default is 80. If https enabled, this port will redirect to https port
  port: 5000

# 如果没有申请证书,需要将 https 注释掉
#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

# 启动成功后,admin用户登录密码
# Remember Change the admin password from UI after launching Harbor.
harbor_admin_password: AdminHarbor12345

# 修改 db 密码
database:
  # The password for the user('postgres' by default) of Harbor DB. Change this before any production use.
  password: needadjust this password

# Global proxy
proxy:
  http_proxy:
  https_proxy:
  no_proxy:
  components:
    - core
    - jobservice
    - trivy
# 设置 metric, 方便后续由 Prometheus 进行数据采集
metric:
   enabled: true
   port: 9090
   path: /metrics

配置文件修改成功后,执行 install.sh 脚本进行安装harbor

./install.sh 

设置

根据之前预设的端口,打开页面,比如 http://192.168.2.122:80

使用 Harbor

[[Docker 设置 http 仓库]]
[[Containerd 设置 http 仓库]]


如果本文帮助到了你,帮我点个广告可以咩(o′┏▽┓`o)


评论
  目录