1.GitHub的官方地址
https://github.com/goharbor/harbor
2.下载harbor
[root@centos201 ~]# wget https://github.com/goharbor/harbor/releases/download/v2.8.2/harbor-offline-installer-v2.8.2.tgz #
3.解压软件包
[root@centos201 ~]# tar xf harbor-offline-installer-v2.8.2.tgz -C /linuxmc/softwares/
4.修改配置文件
[root@centos201 ~]# cd /linuxmc/softwares/harbor/
[root@centos201 harbor]# vim harbor.yml
# 添加主机名称
hostname: harbor.linuxmc.com
...
# 注意掉https的相关配置
# 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
...
# 设置管理员密码
harbor_admin_password: 1
5.安装harbor
[root@centos201 harbor]# ./install.sh
登录harbor
# echo 1 | docker login -u admin --password-stdin harbor.linuxmc.com
# docker login -u admin -p 1 harbor.linuxmc.com
# docker login harbor.linuxmc.com
退出harbor:
# docker logout harbor.linuxmc.com