在Fedora 30安装Harbor 1.9.0
最近在专题学习Kubernetes, 涉及部署本地registry。以下记录Harbor安装的过程。
在Fedora 30安装Harbor 1.9.0过程摘要
依赖软件包
yum install docker-ce docker-compose
docker
使用docker-ce
软件源
dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
cfssl 工具集生成ssl证书
harbor软件下载url
https://github.com/goharbor/harbor/releases
安装采用了离线包
https://storage.googleapis.com/harbor-releases/release-1.9.0/harbor-offline-installer-v1.9.0.tgz
安装
tar xzf harbor-offline-installer-v1.9.0.tgz
cd harbor
修改harbor.yml
示例
--- harbor.yml.orig 2019-09-11 16:10:29.000000000 +0800
+++ harbor.yml 2019-10-05 17:14:08.788961192 +0800
@@ -2,7 +2,7 @@
# 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: reg.mydomain.com
+hostname: 192.168.100.100
# http related config
http:
@@ -10,12 +10,12 @@
port: 80
# https related config
-# https:
+https:
# # https port for harbor, default is 443
-# port: 443
+ port: 443
# # The path of cert and key files for nginx
-# certificate: /your/certificate/path
-# private_key: /your/private/key/path
+ certificate: /opt/harbor/ssl/harbor.pem
+ private_key: /opt/harbor/ssl/harbor-key.pem
# Uncomment external_url if you want to enable external proxy
# And when it enabled the hostname will no longer used
@@ -24,7 +24,7 @@
# 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_admin_password: Redhat1234
# Harbor DB configuration
database:
访问Harbor
根证书设置
/etc/docker/certs.d//ca.crt
docker
docker login