表明本身配置的地方 mysql
1. 系統要求 sql
On a Linux host: docker 17.06.0-ce+ and docker-compose 1.18.0+ .docker
docker : 17.06.0-ce以上版本數據庫
docker-compose :1.18.0+以上版本api
2. 安裝步驟curl
Step 1 :Download the installer; Step 2 : Configure harbor.yml; Step 3:Run install.sh to install and start Harbor;oop
Step1:Download the installer測試
安裝wget:ui
yum -y install wgetgoogle
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