online版本: online版本里面不包含docker镜像文件,在执行install文件时,会到hub.docker上去下载。
offline版本:
offline安装包里面包含需要的docker镜像文件,在执行install文件的时候,将需要的docker镜像文件导入docker。
环境需要可查看往期文档,再此不再演示。
环境需要:
docker-ce
docker-compose
1.这里我安装的是online1.10.0
wget https://github.com/goharbor/harbor/releases/download/v1.10.0/harbor-online-installer-v1.10.0.tgz
2.解压tar包
[root@harbor ~]# ls
anaconda-ks.cfg harbor-online-installer-v1.10.0.tgz
[root@harbor ~]# tar xf harbor-online-installer-v1.10.0.tgz
[root@harbor ~]# ls
anaconda-ks.cfg harbor harbor-online-installer-v1.10.0.tgz
[root@harbor ~]#
3.配置hosts文件
[root@harbor harbor]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.11.30.122 harbor test.harbor.com
[root@harbor harbor]#
4.为harbor配置ssl,以https访问
[root@harbor harbor]# mkdir /ssl
[root@harbor harbor]# openssl req -x509 -nodes -days 36500 -newkey rsa:2048 -keyout /ssl/harbor.key -out /ssl/harbor.crt
5.修改harbor目录中的harbor.yml,主机名及证书文件
6.执行当前目录下的prepare文件
7.执行install文件
8.修改 Windows hosts文件 ,path: C:\Windows\System32\drivers\etc
9.打开浏览器访问此域名