环境信息:node
操做系统 | 主机名 | IP地址 |
---|---|---|
CentOS7.6 | harbor | 192.168.61.238 |
官方发布地址:<https://github.com/goharbor/harbor/releases>;
程序版本依赖:docker-ce docker-compose 1.18.0+ .linux
Harbor支持在线安装及离线安装,此文章采用在线离线安装的形式,且安装版本为1.8.3。git
# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo # yum install -y yum-utils # yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # yum install docker-compose -y # yum install docker-ce –y # systemctl enable docker # systemctl start docker
# 下载 # wget https://storage.googleapis.com/harbor-releases/release-1.8.0/harbor-offline-installer-v1.8.3.tgz # 解压 # tar -zxvf harbor-offline-installer-v1.8.3.tgz #
配置参数位于文件harbor.yml中。github
可根据本身的需求设定。docker
这里的https证书是我在腾讯云申请的免费SSL证书,你若是在腾讯云注册有域名也能够在这里 <https://console.cloud.tencent.com/ssl>; 直接申请,固然你也能够使用免费证书的申请。centos
也能够自签证书:api
openssl req -x509 -nodes -days 36500 -newkey rsa:2048 -keyout /date/cert/server.key -out /date/cert/server.crt
hostname: 192.168.61.238 # https related config https: port: 443 certificate: /data/cert/server.crt private_key: /data/cert/server.key harbor_admin_password: youpassword # The default data volume data_volume: /data/harbor/data
./install