Centos安装harbor并配置https访问

1、安装docker

yum install -y yum-utils

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    
yum install docker-ce docker-ce-cli docker-compose

2、启动服务并设置开机启动

systemctl restart docker
systemctl enable docker

3、下载harbor 并配置docker-compose

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

3.1解压

tar zxvf  harbor-offline-installer-v2.5.3.tgz 

3.2 创建证书

mkdir -p /root/harbor/cert
openssl genrsa -out ca.key 4096
openssl req -x509 -new -nodes -sha512 -days 3650 -subj "/C=CN/ST=Beijing/L=Beijing/O=example/OU=Personal/CN=harbor.jd.com" -key ca.key -out ca.crt

harbor.jd.com 注意替换域名


openssl genrs

你可能感兴趣的:(centos,https,docker)