Harbor + Https 部署

关闭防火墙和selinux

systemctl stop firewalld
sed -i 's/SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux

安装docker

官方文档:https://docs.docker.com/v18.09/install/linux/docker-ce/centos/
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce -y
systemctl start docker
systemctl enable docker

安装docker-compose(docker编排工具)

yum -y install epel-release
yum install python-pip -y
pip install docker-compose
docker-compose version

安装Harbor

官方文档:https://github.com/goharbor/harbor
yum install wget -y
wget -P /usr/local/src/ https://github.com/goharbor/harbor/releases/download/v1.9.2/harbor-online-installer-v1.9.2.tgz
cd /usr/loca/src/
tar xvf harbor-online-installer-v1.9.2.tgz -C /usr/local/
cd /usr/local/harbor/
cp harbor.yml harbor.yml.bak
./prepare
./install.sh

Harbor默认http协议,出于安全考虑,使用https访问

#只列出需要修改的参数,证书为阿里云购买,可以自己生成
hostname: harbor.keji.com
http:
  port: 80

https:
    port: 443
    certificate: /usr/local/harbor/ssl/keji.com.pem
    private_key: /usr/local/harbor/ssl/keji.com.key
posted @ 2019-06-18 17:56  于欢水  阅读(851)  评论(1编辑  收藏  举报