How to Install Harbor on CentOS 7

Prerequisites

Setting Up Your Alibaba Cloud ECS Instance

Add a User with Root Privileges

#  adduser aareez
#  passwd aareez
#  visudo
#  usermod -aG wheel aareez
#  groups aareez
#  su - aareez
#  whoami

Install wget

#  sudo yum install wget

Install nano-editor

#  sudo yum install nano

Install epel-release

#  sudo yum install epel-release

Update Your CentOS 7 System

#  sudo yum clean all
#  sudo yum -y update

Install yum-utils

#  sudo yum install yum-utils

Installing Docker CE and Docker Compose

Install Docker CE

#  su - root
#  yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
#  yum install docker-ce

Install python-pip

#  yum install python-pip

Install Docker Compose

#  pip install docker-compose
#  systemctl start docker
#  docker run hello-world

Installing Harbor

#  su - aareez
#  wget https://github.com/vmware/harbor/releases/download/v1.2.0/harbor-online-installer-v1.2.0.tgz
#  wget https://github.com/vmware/harbor/releases/download/v1.2.0/harbor-offline-installer-v1.2.0.tgz
#  tar -xvf harbor-online-installer-v1.2.0.tgz
#  tar -xvf harbor-offline-installer-v1.2.0.tgz

Generate SSL Certificate

#  mkdir cert && cd cert 
# openssl req -sha256 -x509 -days 365 -nodes -newkey rsa:4096 -keyout harbor.imarslan.com.key -out harbor.imarslan.com.crt

Configuring Harbor

#  su - aareez
#  cd harbor
#  sudo nano harbor.cfg
hostname = harbor.imarslan.com
ui_url_protocol = https
ssl_cert = /root/cert/harbor.imarslan.com.crt
ssl_cert_key = /root/cert/harbor.imarslan.com.key
#  sudo ./install.sh
#  sudo docker-compose up -d

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store