CAPTAINS - HARBOR
type: channel
link: https://www.captains.top/index.php/tag/HARBOR/
items: HARBOR 部署

HARBOR 部署
type: item
date: 2021-07-20T15:08:00+00:00
description: 1. docker1.1 部署流程1.2 修改docker数据存储位置1.3 安装docker-compose1.4 部署harbor1.5 访问地址- 服务器环境要求 - centos7 - 4核8G - 100G硬盘1. docker1.1 部署流程#安装docker或参考阿里https://developer.aliyun.com/mirror/docker-ce?spm=a2c6h.13651102.0.0.3e221b11MtvYOT #Step 1：安装依赖包 [root@docker-node01 ~]# sudo yum install -y yum-utils device-mapper-persistent-data lvm2 #Step 2: 添加软件源信息 [root@docker-node01 ~]# sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # Step 3: 更新并安装Docker-CE [root@docker-node01 ~]# sudo yum makecache fast [root@docker-node01 ~]# sudo yum -y install docker-ce # Step 4: 开启Docker服务 [root@docker-node01 ~]# sudo service docker start1.2 修改docker数据存储位置# 创建数据目录 mkdir /home/docker_data #修改docker数据目录位置 [root@host173 docker_data]# vim /usr/lib/systemd/system/docker.service 14 ExecStart=/usr/bin/dockerd --graph /home/docker_data -H fd:// --containerd=/run/containerd/containerd.sock # 重启docker systemctl daemon-reload systemctl restart docker1.3 安装docker-composeyum -y install python-pip yum install epel-release yum install docker-compose1.4 部署harbor#下载harbor离线安装包 wget https://github.com/goharbor/harbor/releases/download/v1.10.4/harbor-offline-installer-v1.10.4.tgz #修改配置 vim harbor.yml #域名 5 hostname: 192.168.1.173 #密码 27 harbor_admin_password: 1q@W3e4r5t6y #数据目录 40 data_volume: /home/harbor/data # 安装harbor服务 ./install.sh1.5 访问地址http://192.168.1.173/