harbor服务安装-和https方式安装
https://juejin.im/post/5c4c12e5f265da615e05ce4c
http:安装
https://www.cnblogs.com/nulige/p/10778554.html
1docker环境提前部署
yum install python-pip -y pip install -U -i https://pypi.tuna.tsinghua.edu.cn/simple docker-compose #安装服务
pip install --upgrade pip wget http://harbor.orientsoft.cn/harbor-v1.5.0/harbor-offline-installer-v1.5.0.tgz #下载habor包
2.
tar zxvf harbor-offline-installer-v1.5.0.tgz -C /opt #解压文件
vi /opt/harbor/harbor.cfg
[root@jenkins219 ~]# cat /opt/harbor/harbor.cfg | egrep -v "^#|^$" _version = 1.5.0 hostname = 192.168.120.219 ui_url_protocol = http max_job_workers = 50 customize_crt = on ssl_cert = /data/cert/server.crt ssl_cert_key = /data/cert/server.key secretkey_path = /data #注意需要创建目录 admiral_url = NA log_rotate_count = 50 log_rotate_size = 200M http_proxy = https_proxy = no_proxy = 127.0.0.1,localhost,ui email_identity = email_server = smtp.mydomain.com email_server_port = 25 email_username = sample_admin@mydomain.com email_password = abc email_from = admin <sample_admin@mydomain.com> email_ssl = false email_insecure = false harbor_admin_password = 12345 #登录密码 auth_mode = db_auth ldap_url = ldaps://ldap.mydomain.com ldap_basedn = ou=people,dc=mydomain,dc=com ldap_uid = uid ldap_scope = 2 ldap_timeout = 5 ldap_verify_cert = true ldap_group_basedn = ou=group,dc=mydomain,dc=com ldap_group_filter = objectclass=group ldap_group_gid = cn ldap_group_scope = 2 self_registration = on token_expiration = 30 project_creation_restriction = everyone db_host = mysql db_password = root123 #默认数据库密码 db_port = 3306 db_user = root redis_url = redis:6379 clair_db_host = postgres clair_db_password = password clair_db_port = 5432 clair_db_username = postgres clair_db = postgres uaa_endpoint = uaa.mydomain.org uaa_clientid = id uaa_clientsecret = secret uaa_verify_cert = true uaa_ca_cert = /path/to/ca.pem registry_storage_provider_name = filesystem registry_storage_provider_config =
mkdir /data #创建目录
cd /opt/harbor/
./prepare
./install.sh #安装服务
登录
http://192.168.120.219
admin
12345
注意服务器重启后要先启动harbor 再重启docker
167 cd /opt/harbor/
168 docker-compose start
172 docker restart 4bf2987177ba
https配置方式
参考连接
https://jingyan.baidu.com/article/fcb5aff71fadf9edaa4a7103.html
https://www.cnrancher.com/docs/rancher/v2.x/cn/install-prepare/registry/configure-https/
https://www.cnrancher.com/docs/rancher/v2.x/cn/install-prepare/self-signed-ssl/
mkdir /data/cert -p cd /data/cert openssl genrsa -out /data/cert/ca_harbor.key 2048
#注意ip修改成自己的访问的ip或者域名 openssl req -x509 -new -nodes -key /data/cert/ca_harbor.key -subj "/CN=192.168.120.219" -days 500000 -out /data/cert/ca_harbor.crt # 修改配置文件 harbor.cfg # 访问的地址 hostname = 192.168.120.219 #修改为https ui_url_protocol = https # 设置为on customize_crt = on # 配置crt和key的位置 ssl_cert = /data/cert/ca_harbor.crt ssl_cert_key = /data/cert/ca_harbor.key #停止旧服务 docker-compose down 重新安装 数据不会变 ./install.sh
https://github.com/goharbor/harbor/blob/master/docs/configure_https.md
https://blog.csdn.net/ccy19910925/article/details/80271207
岁月的长河 我只是一粒尘埃

浙公网安备 33010602011771号