Harbor安装和配置
1. 安装Docker并启动Docker(已完成)
2. 安装docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) \ -o /usr/local/bin/docker-compose
3. 给docker-compose添加执行权限
sudo chmod +x /usr/local/bin/docker-compose
4. 查看docker-compose是否安装成功
# docker-compose -version docker-compose version 1.21.2, build a133471
5. 下载Harbor压缩包并解压
下载地址:https://github.com/goharbor/harbor/releases
wget https://github.com/goharbor/harbor/releases/download/v2.4.1/harbor-offline-installer-v2.4.1.tgz tar -xzf harbor-offline-installer-v2.4.1.tgz -C /opt/install
6. 修改Harbor的配置
cd /opt/install/harbor/ cp harbor.yml.tmpl harbor.yml # vim harbor.yml hostname: 192.168.1.29 port: 85 --将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
7. 安装Harbor
进入/opt/install/harbor/文件夹。
运行以下命令
./prepare ./install.sh
8. 启动Harbor
--启动。 ps. 如果下面的命令启动失败则用该命令 docker-compose -f /opt/install/harbor/harbor.yml up -d 启动 docker-compose up -d --停止 docker-compose stop --重启 docker-compose restart
9. 浏览器访问Harbor:http://192.168.1.29:85
默认账户admin
,默认密码Harbor12345
。