harbor仓库部署
[root@localhost ~]# DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
[root@localhost ~]# mkdir -p $DOCKER_CONFIG/cli-plugins
[root@localhost ~]# curl -SL https://github.com/docker/compose/releases/download/v2.7.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
[root@localhost cli-plugins]# ls
docker-compose
[root@localhost cli-plugins]# pwd
/root/.docker/cli-plugins
[root@localhost cli-plugins]# systemctl enable --now docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
[root@localhost cli-plugins]# ls
docker-compose
[root@localhost cli-plugins]# chmod +x docker-compose
[root@localhost cli-plugins]# ll
total 25188
-rwxr-xr-x. 1 root root 25792512 Aug 11 18:56 docker-compose
[root@localhost cli-plugins]#
[root@localhost cli-plugins]# ln -s /root/.docker/cli-plugins/docker-compose /usr/bin/
[root@localhost cli-plugins]# cd
[root@localhost ~]# which docker-compose
/usr/bin/docker-compose
[root@localhost ~]# docker compose version
Docker Compose version v2.7.0
[root@localhost ~]# ls
anaconda-ks.cfg
//传输harbor-offline-installer-v2.5.3.tgz
[root@localhost ~]# ls
anaconda-ks.cfg harbor-offline-installer-v2.5.3.tgz
[root@localhost ~]# tar xf harbor-offline-installer-v2.5.3.tgz -C /usr/local/
[root@localhost ~]# cd /usr/local/
[root@localhost local]# ls
bin etc games harbor include lib lib64 libexec sbin share src
[root@localhost local]# cd harbor/
[root@localhost harbor]# ls
common.sh harbor.v2.5.3.tar.gz harbor.yml.tmpl install.sh LICENSE prepare
[root@localhost harbor]# cp harbor.yml.tmpl harbor.yml
[root@localhost harbor]# vi harbor.yml
[root@localhost harbor]# hostnamectl set-hostname harbor.example.com
[root@localhost harbor]# bash
[root@harbor harbor]# hostname
harbor.example.com
[root@harbor harbor]# vim harbor.yml
hostname: harbor.example.com
#https:
# https port for harbor, default is 443
# port: 443
# The path of cert and key files for nginx
# certificate: /your/certificate/path
# private_key: /your/private/key/path
[root@harbor harbor]# ./install.sh
[Step 0]: checking if docker is installed ...
Note: docker version: 20.10.17
[Step 1]: checking docker-compose is installed ...
......
[+] Running 9/9
⠿ Container harbor-log Started 0.6s
⠿ Container registry Started 2.7s
⠿ Container harbor-portal Started 2.8s
⠿ Container harbor-db Started 2.8s
⠿ Container registryctl Started 2.8s
⠿ Container redis Started 2.8s
⠿ Container harbor-core Started 3.2s
⠿ Container harbor-jobservice Started 4.3s
⠿ Container nginx Started 4.4s
✔ ----Harbor has been installed and started successfully.----
[root@harbor harbor]# ss -anlt
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 127.0.0.1:1514 0.0.0.0:*
LISTEN 0 128 0.0.0.0:80 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 [::]:80 [::]:*
LISTEN 0 128 [::]:22 [::]:*
[root@harbor harbor]#