安装harbor 需要安装docker
Harbor的所有服务组件都是在Docker中部署,所以官方安装使用Docker-compose快速部署,所以我们需要安装Docker、Docker-compose。由于Harbor是基于Docker Registry V2版本,所以就要求Docker版本不小于1.10.0,Docker-compose版本不小于1.6.0。
1.docker-ce
已安装:
docker-ce.x86_64 3:20.10.17-3.el7 docker-ce-cli.x86_64 1:20.10.17-3.el7
作为依赖被安装:
containerd.io.x86_64 0:1.6.6-3.1.el7 docker-ce-rootless-extras.x86_64 0:20.10.17-3.el7 docker-scan-plugin.x86_64 0:0.17.0-3.el7
完毕!
[root@ap-harbor01 ~]# systemctl start docker && systemctl enable docker && systemctl status docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since 五 2022-08-05 11:42:39 CST; 86ms ago
Docs: https://docs.docker.com
Main PID: 1538 (dockerd)
[root@ap-harbor01 ~]# docker version
Client: Docker Engine - Community
Version: 20.10.17
API version: 1.41
Go version: go1.17.11
Git commit: 100c701
Built: Mon Jun 6 23:05:12 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.17
API version: 1.41 (minimum version 1.12)
Go version: go1.17.11
2.docker-compose
[root@ap-harbor01 ~]# curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 16.3M 100 16.3M 0 0 1151k 0 0:00:14 0:00:14 --:--:-- 1932k
[root@ap-harbor01 ~]# chmod +x /usr/local/bin/docker-compose
[root@ap-harbor01 ~]# ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
[root@ap-harbor01 ~]# docker-compose --version
docker-compose version 1.25.4, build 8d51620a