代表自己配置的地方
1. 系统要求
On a Linux host: docker 17.06.0-ce+ and docker-compose 1.18.0+ .
docker : 17.06.0-ce以上版本
docker-compose :1.18.0+以上版本
2. 安装步骤
Step 1 :Download the installer; Step 2 : Configure harbor.yml; Step 3:Run install.sh to install and start Harbor;
Step1:Download the installer
安装wget:
yum -y install wget
wget https://storage.googleapis.com/harbor-releases/release-1.8.0/harbor-offline-installer-v1.8.1.tgz
[root@YZ-25-25-25 ~]# tar zxvf harbor-offline-installer-v1.8.1.tgz harbor/harbor.v1.8.1.tar.gz harbor/prepare harbor/LICENSE harbor/install.sh harbor/harbor.yml [root@YZ-25-25-25 ~]# ls harbor harbor-offline-installer-v1.8.1.tgz spark-2.4.0-bin-hadoop2.7 spark-2.4.0-bin-hadoop2.7.tgz [root@YZ-25-25-25 ~]# cd harbor [root@YZ-25-25-25 harbor]# ls harbor.v1.8.1.tar.gz harbor.yml install.sh LICENSE prepare
Step2:Configure harbor.yml;
配置Let's Encrypt证书,这里我就直接acme了,方便快捷。
yum -y install socat
curl https://get.acme.sh | sh
sh acme.sh --issue -d reg.xxx.com --standalone
mkdir -p /opt/certs
cd ~/.acme.sh/
sh acme.sh --installcert -d 123.com --key-file /opt/certs/123.com.key --fullchain-file /opt/certs/fullchain.cer
修改配置文件
#vi harbor.yml
域名:
hostname = 123.com(自己申请的域名)
协议:
ui_url_protocol = https
证书配置:
ssl_cert = /opt/certs/fullchain.cer
ssl_cert_key = /opt/certs/123.com.key(自己域名的key)
默认为mysql数据库方式:
db_password = root数据库密码
设置harbor登录密码:
harbor_admin_password = Harbor12345(默认)
Step3:Run install.sh to install and start Harbor;
./install.sh
3. 测试结果
查看是否所有容器都已经创建成功并处于UP状态
docke ps -a