How to Install Harbor on CentOS 7

Prerequisites

  • You must have Alibaba Cloud Elastic Compute Service (ECS) activated and verified your valid payment method. If you are a new user, you can get a free account in your Alibaba Cloud account. If you don’t know about how to setup your ECS instance, you can refer to this tutorial or quick-start guide. Your ECS instance must have at least 1GB RAM and 1 Core processor.
  • A domain name registered from Alibaba Cloud. If you have already registered a domain from Alibaba Cloud or any other host, you can update its domain nameserver records.
  • Domain name must be pointed to your Alibaba Cloud ECS’s IP address
  • Server’s hostname is set up.
  • Access to VNC console in your Alibaba Cloud or SSH client installed in your PC

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

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Gandhi and the Nuclear Option

Troubleshooting RDS Performance (MySQL, SQL SERVER and MongoDB)

Understanding the Azure Plan vs. Microsoft Azure

How to Setup AWS VPN EndPoint

Explore All i18n Advantages of Babel for Your Python App

Is It Done Yet?: My Journey Into Digital Project Management

Implementing Interactive, Dynamic Charts on iOS — Without Breaking a Sweat

Mock server in under a minute

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
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

Guide to DevSecOps pipelines with Gitlab CI

Allowing access to a Linux web app (app service) via Front Door using Terraform

Create a project and an app in Openshift

Docker Architecture, Life Cycle of Docker Containers and Data Management