[root@VM_0_13_centos reg.niewx.club]# ls
ca.crt ca.key ca.srl extfile.cnf server.crt server.csr server.key
修改harbor配置项
[root@VM_0_13_centos harbor]# cat 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: 1.1.1.1
# 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: /etc/docker/certs.d/reg.niewx.club/server.crt
private_key: /etc/docker/certs.d/reg.niewx.club/server.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: 123456
主要需要修改上面标记的选项。
启动harbor
# cd /opt/harbor
# ./ prepare
# ./install.sh --with-clair (启动扫描器)
启动日志显示上面则启动成功
如果修改了配置项需要重新启动harbor则重新执行以下命令即可
# cd /opt/harbor
# ./ prepare
# ./install.sh --with-clair (启动扫描器)